From a419850e536f00549120255a627137faffded47a Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 3 Sep 2017 14:58:22 -0600 Subject: Got the 4th PWM channel to work, ish. (channel 4 is inverted though) Moved go_to_suspend thing into main() instead of making each UI handle that during loop(). Made default_state() optional. Fixed bug where battcheck and other number readouts could interfere with the state which interrupted them. (they would sometimes turn the LED off after the new state had already started) Updated darkhorse's moon levels to match new ramp on D4 hardware. --- spaghetti-monster/fsm-standby.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spaghetti-monster/fsm-standby.h') diff --git a/spaghetti-monster/fsm-standby.h b/spaghetti-monster/fsm-standby.h index baeb6af..a23bd0c 100644 --- a/spaghetti-monster/fsm-standby.h +++ b/spaghetti-monster/fsm-standby.h @@ -20,7 +20,14 @@ #ifndef FSM_STANDBY_H #define FSM_STANDBY_H +// deferred "off" so we won't suspend in a weird state +// (like... during the middle of a strobe pulse) +// set this to nonzero to enter standby mode next time the system is idle +volatile uint8_t go_to_standby = 0; + #define standby_mode sleep_until_eswitch_pressed void sleep_until_eswitch_pressed(); +// TODO: half-sleep "twilight" mode with WDT on but running slowly + #endif -- cgit v1.2.3