Added wrapper for PowerScheduler

This commit is contained in:
2024-12-22 22:07:54 +01:00
parent 915ad85526
commit fbe205035e
7 changed files with 219 additions and 127 deletions

View File

@@ -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";
}
};