diff options
| author | Selene ToyKeeper | 2017-08-24 16:21:45 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2017-08-24 16:21:45 -0600 |
| commit | 32eaeddee34c76dda5456ed960be6278ed68e48d (patch) | |
| tree | 44cbbcfb3e1b47c777eacd1a707bba653bb4b49e /spaghetti-monster/fsm-main.c | |
| parent | Fixed repeating blinks at ends of ramp -- only blinks once now. (diff) | |
| download | anduril-32eaeddee34c76dda5456ed960be6278ed68e48d.tar.gz anduril-32eaeddee34c76dda5456ed960be6278ed68e48d.tar.bz2 anduril-32eaeddee34c76dda5456ed960be6278ed68e48d.zip | |
Added loop() to API, executes constantly.
Added nice_delay_ms() to process events while waiting, and abort on state change.
Converted ramping-ui strobe to smoothly variable with party and tactical modes.
Diffstat (limited to 'spaghetti-monster/fsm-main.c')
| -rw-r--r-- | spaghetti-monster/fsm-main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c index 2faaeda..1a0c425 100644 --- a/spaghetti-monster/fsm-main.c +++ b/spaghetti-monster/fsm-main.c @@ -97,10 +97,9 @@ int main() { // TODO: check voltage? // TODO: check temperature? // if event queue not empty, process and pop first item in queue? - if (emissions[0].event != NULL) { - emit_now(emissions[0].event, emissions[0].arg); - delete_first_emission(); - } + process_emissions(); + + loop(); } } |
