From 6333907f5ac9b929faabc85381d9ddad9aec52de Mon Sep 17 00:00:00 2001 From: Mike C Date: Tue, 4 Aug 2015 23:33:35 -0400 Subject: [PATCH] Added missing checks for fuel gauge being present --- src/src.ino | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/src.ino b/src/src.ino index 571fd87..d8ab73b 100644 --- a/src/src.ino +++ b/src/src.ino @@ -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); } }