If I run the example the serial console output is as follows:
Entering State 1
State 1
Exiting State 1
State 1 -> State 2
Entering State 2
Exiting State 2
State 2 -> State 1
Entering State 1
Exiting State 1
State 1 -> State 2
Entering State 2
Exiting State 2
(...)
The "in state" callback function for state 1 on_state_1_in_state() is executed only once, implicitly as part of Fsm fsm(&state_1);. The callback function for state 2 on_state_2_in_state() is not executed at all. Have I not used the API correctly?
I've created the following example.
If I run the example the serial console output is as follows:
The "in state" callback function for state 1
on_state_1_in_state()
is executed only once, implicitly as part ofFsm fsm(&state_1);
. The callback function for state 2on_state_2_in_state()
is not executed at all. Have I not used the API correctly?