Light Example doesn't work unless run_machine() is called
Opened this issue · 2 comments
WayneKeenan commented
Internally m_initilaised
is never set unless aforementioned function is called prior to entering loop()
JanHendrikStam commented
There are two ways around this,
The dirty way being: changing something in the the fsm.cpp file for now.
The nice way to have function like 'on_light_off_run(){}' which is inserted in the code:
State state_light_off(&on_light_off_enter, &on_light_off_run, &on_light_off_exit);
does nothing, but still ensures that m_initialised is set to true.
The fsm library assumes that the start state, referenced in the declaration of the state, is run first