Added missing checks for fuel gauge being present

This commit is contained in:
Mike C 2015-08-04 23:33:35 -04:00
parent 76252f6f8d
commit 6333907f5a

View file

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