Added wrapper for PowerScheduler
This commit is contained in:
@@ -9,6 +9,7 @@ Dezibot::Dezibot() : multiColorLight() {};
|
||||
|
||||
void Dezibot::begin(void)
|
||||
{
|
||||
Power.begin();
|
||||
Wire.begin(SDA_PIN, SCL_PIN);
|
||||
infraredLight.begin();
|
||||
lightDetection.begin();
|
||||
@@ -17,10 +18,4 @@ void Dezibot::begin(void)
|
||||
colorDetection.begin();
|
||||
multiColorLight.begin();
|
||||
display.begin();
|
||||
Power.begin();
|
||||
this->power = Power::getPowerManager();
|
||||
if (!this->power.tryAccquirePowerAllowance(CONSUMPTION_ESP_BASE);)
|
||||
{
|
||||
throw "Could not allocate power for the base consumption of the ESP32";
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user