Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light Example doesn't work unless run_machine() is called #25

Open
WayneKeenan opened this issue Apr 6, 2018 · 2 comments
Open

Light Example doesn't work unless run_machine() is called #25

WayneKeenan opened this issue Apr 6, 2018 · 2 comments

Comments

@WayneKeenan
Copy link

Internally m_initilaised is never set unless aforementioned function is called prior to entering loop()

@JanHendrikStam
Copy link

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

@fkromer
Copy link

fkromer commented May 11, 2021

#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants