aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/off-mode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c
index a640b5c..2defc27 100644
--- a/spaghetti-monster/anduril/off-mode.c
+++ b/spaghetti-monster/anduril/off-mode.c
@@ -22,6 +22,10 @@
#include "off-mode.h"
+#ifdef USE_SUNSET_TIMER
+#include "sunset-timer.h"
+#endif
+
uint8_t off_state(Event event, uint16_t arg) {
// turn emitter off when entering state
if (event == EV_enter_state) {
@@ -31,6 +35,9 @@ uint8_t off_state(Event event, uint16_t arg) {
#elif defined(USE_AUX_RGB_LEDS)
rgb_led_update(rgb_led_off_mode, 0);
#endif
+ #ifdef USE_SUNSET_TIMER
+ sunset_timer = 0; // needs a reset in case previous timer was aborted
+ #endif
// sleep while off (lower power use)
// (unless delay requested; give the ADC some time to catch up)
if (! arg) { go_to_standby = 1; }