diff options
| author | Selene ToyKeeper | 2018-11-11 05:14:47 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2018-11-11 05:14:47 -0700 |
| commit | e942fa7c47f446891e3bb0a07316d22cc32c00c2 (patch) | |
| tree | a74c2cbe1a48554f66d8ca18a0dbc1bf0d69ebdc /spaghetti-monster/fsm-states.c | |
| parent | calibrated Sofirn SP36 config (diff) | |
| download | anduril-e942fa7c47f446891e3bb0a07316d22cc32c00c2.tar.gz anduril-e942fa7c47f446891e3bb0a07316d22cc32c00c2.tar.bz2 anduril-e942fa7c47f446891e3bb0a07316d22cc32c00c2.zip | |
Rewrote the event system to use a single byte for each event instead of an array of actions.
Not thoroughly tested yet, not done yet, have only updated Anduril to fit, and only partially.
Diffstat (limited to '')
| -rw-r--r-- | spaghetti-monster/fsm-states.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-states.c b/spaghetti-monster/fsm-states.c index 09ae804..f91dc4b 100644 --- a/spaghetti-monster/fsm-states.c +++ b/spaghetti-monster/fsm-states.c @@ -32,7 +32,7 @@ // TODO: function to call stacked callbacks until one returns "handled" void _set_state(StatePtr new_state, uint16_t arg, - EventPtr exit_event, EventPtr enter_event) { + Event exit_event, Event enter_event) { // call old state-exit hook (don't use stack) if (current_state != NULL) current_state(exit_event, arg); // set new state @@ -82,7 +82,7 @@ uint8_t set_state(StatePtr new_state, uint16_t arg) { #ifndef DONT_USE_DEFAULT_STATE // bottom state on stack // handles default actions for LVP, thermal regulation, etc -uint8_t default_state(EventPtr event, uint16_t arg) { +uint8_t default_state(Event event, uint16_t arg) { if (0) {} // this should get compiled out #ifdef USE_LVP |
