aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-standby.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-09-03 14:58:22 -0600
committerSelene ToyKeeper2017-09-03 14:58:22 -0600
commita419850e536f00549120255a627137faffded47a (patch)
tree60976f561f189d6e5e08a581bdc3824f163f65be /spaghetti-monster/fsm-standby.h
parentAdded UI2. UI2 is weird. (diff)
downloadanduril-a419850e536f00549120255a627137faffded47a.tar.gz
anduril-a419850e536f00549120255a627137faffded47a.tar.bz2
anduril-a419850e536f00549120255a627137faffded47a.zip
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.
Diffstat (limited to 'spaghetti-monster/fsm-standby.h')
-rw-r--r--spaghetti-monster/fsm-standby.h7
1 files changed, 7 insertions, 0 deletions
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