From 0499082b50b00d942e00d2d272a0c74b4c5ca1cd Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 22 Aug 2018 23:28:35 -0600 Subject: Reduced ROM size by making successive nice_delay_ms calls collapse any time the user completes an input sequence. All nice delays then get aborted until the next trip through the main() loop. Eliminates the need to wrap nice_delay_ms() calls and handle the exit condition. Also eliminates the risk of getting the UI out of sync with button events. --- spaghetti-monster/fsm-main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spaghetti-monster/fsm-main.c') diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c index b0b44fb..6f74e9b 100644 --- a/spaghetti-monster/fsm-main.c +++ b/spaghetti-monster/fsm-main.c @@ -132,6 +132,8 @@ int main() { // give the recipe some time slices loop(); + // in case we fell through, turn delays back on + nice_delay_interrupt = 0; } } -- cgit v1.2.3