Added missing checks for fuel gauge being present
This commit is contained in:
parent
76252f6f8d
commit
6333907f5a
|
@ -147,12 +147,16 @@ void loop() {
|
|||
if (DEBUG) {
|
||||
Serial.println("SLEEPING!");
|
||||
}
|
||||
fuelGauge.sleep();
|
||||
if (max_found) {
|
||||
fuelGauge.sleep();
|
||||
}
|
||||
neopix.setBrightness(0);
|
||||
neopix.show();
|
||||
delay(250); // Be sure that everything is settled before going to sleep
|
||||
Sleepy::loseSomeTime(SLEEP_INTERVAL);
|
||||
fuelGauge.awake();
|
||||
if (max_found) {
|
||||
fuelGauge.awake();
|
||||
}
|
||||
neopix.setBrightness(brightness);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue