aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-08-30 22:16:37 -0600
committerSelene ToyKeeper2017-08-30 22:16:37 -0600
commitf881184e490bc13bb5d2436fc67ede0c1eb0c4c0 (patch)
tree861344c11023c306bcec260f8b01fc5f9825b0b7 /spaghetti-monster
parentAdded goodnight mode. Rearranged blinkies in battcheck group. (diff)
downloadanduril-f881184e490bc13bb5d2436fc67ede0c1eb0c4c0.tar.gz
anduril-f881184e490bc13bb5d2436fc67ede0c1eb0c4c0.tar.bz2
anduril-f881184e490bc13bb5d2436fc67ede0c1eb0c4c0.zip
Made event handling a bit more reliable while asleep.
(was sometimes having difficulty getting out of soft lockout mode)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/fsm-standby.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c
index bef0533..86c5f0d 100644
--- a/spaghetti-monster/fsm-standby.c
+++ b/spaghetti-monster/fsm-standby.c
@@ -36,6 +36,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_on(); // wake on e-switch event
@@ -45,7 +46,8 @@ void sleep_until_eswitch_pressed()
// something happened; wake up
sleep_disable();
- PCINT_on();
+ //PCINT_on(); // should be on already
+ // FIXME? if button is down, make sure a button press event is added to the current sequence
ADC_on();
WDT_on();
}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.