aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-standby.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-12-11 19:56:15 -0700
committerSelene ToyKeeper2017-12-11 19:56:15 -0700
commitd50c46d08a6d7f52dffb9b43784c62b11d78df8c (patch)
treeba93cc6fa1d3f681e850d57ed92721e859b4ff30 /spaghetti-monster/fsm-standby.c
parentWorking toward a FW3A release now. Made strobes use Nx7135 (when available) ... (diff)
downloadanduril-d50c46d08a6d7f52dffb9b43784c62b11d78df8c.tar.gz
anduril-d50c46d08a6d7f52dffb9b43784c62b11d78df8c.tar.bz2
anduril-d50c46d08a6d7f52dffb9b43784c62b11d78df8c.zip
Greatly improved button debouncing. Helps a lot on FW3A and my light saber.
Debouncing isn't 100% yet though.
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/fsm-standby.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c
index 5ef666f..eb631d6 100644
--- a/spaghetti-monster/fsm-standby.c
+++ b/spaghetti-monster/fsm-standby.c
@@ -37,6 +37,7 @@ void sleep_until_eswitch_pressed()
// make sure switch isn't currently pressed
while (button_is_pressed()) {}
empty_event_sequence(); // cancel pending input on suspend
+ PCINT_since_WDT = 0; // ensure PCINT won't ignore itself
PCINT_on(); // wake on e-switch event