File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -30,19 +30,20 @@ void checkBattery(void)
3030
3131 delay (sdPowerDownDelay); // Give the SD card time to finish writing ***** THIS IS CRITICAL *****
3232
33+ #ifdef noPowerLossProtection
34+ SerialPrintln (F (" *** LOW BATTERY VOLTAGE DETECTED! RESETTING... ***" ));
35+ SerialPrintln (F (" *** PLEASE CHANGE THE POWER SOURCE TO CONTINUE ***" ));
36+
37+ SerialFlush (); // Finish any prints
38+
39+ resetArtemis (); // Reset the Artemis so we don't get stuck in a low voltage infinite loop
40+ #else
3341 SerialPrintln (F (" *** LOW BATTERY VOLTAGE DETECTED! GOING INTO POWERDOWN ***" ));
3442 SerialPrintln (F (" *** PLEASE CHANGE THE POWER SOURCE AND RESET THE OLA TO CONTINUE ***" ));
3543
3644 SerialFlush (); // Finish any prints
3745
38- #ifdef noPowerLossProtection
39- // Leave the WDT running so it will reset the Artemis is required
40- // Don't go into deep sleep. Just keep running. Draining the battery...
41- // User can prevent this by disabling settings.enableLowBatteryDetection
42- while (1 )
43- ;
44- #else
45- powerDownOLA (); // power down and wait for reset
46+ powerDownOLA (); // Power down and wait for reset
4647#endif
4748 }
4849 }
You can’t perform that action at this time.
0 commit comments