battery management
This commit is contained in:
@@ -130,7 +130,7 @@ void handlePowerState(void)
|
||||
if (getLowBatt())
|
||||
{
|
||||
log_w("on: Lowbat");
|
||||
// powerstate = lowBatt;
|
||||
powerstate = lowBatt;
|
||||
SetLedColor(CRGB::Red, true);
|
||||
break;
|
||||
}
|
||||
@@ -184,10 +184,14 @@ void handlePowerState(void)
|
||||
case lowBatt:
|
||||
{
|
||||
// add delay
|
||||
powerstate = off;
|
||||
for (int i = 0; i < 6; i++)
|
||||
//powerstate = off;
|
||||
if(!getLowBatt())
|
||||
{
|
||||
powerstate = on;
|
||||
SetLedColor(CRGB::Green);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_w("lowbatt");
|
||||
SetLedColor(CRGB::Red, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user