-
Notifications
You must be signed in to change notification settings - Fork 176
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
State update loop #22
Comments
The state is updated in transit:
You can e.g. call such a methon in exit/entry functions, these are always called before / after transit. |
Hello @digint could you maybe elaborate a little bit further on this? I'm a novice C programmer so maybe you could give me some hint? I'd love to implement this state machine on an ESP8266. The ESP is currently connected to a LED matrix and I implemented two featrues: display a clock and display animated Gifs. Now i want to combine both and be able to switch between the two states The state machine itself is working, but I'm not sure how to update the state in the ESP
|
These methods don't really call on for the duration of the state. Presumably one could loop inside the entry and exit methods, but ideally those methods would execute once and return. My use case is that I'd like to poll a device in order to get the conditions to transit to other states. I'm thinking something like Is this something of interest, or am I thinking of a use case that is ill suited for this library? edit: |
Old topic but I'll add this for anyone passing through: |
Might be a dumb question. But my understanding is that the
react
method of each state is used to update the current state.Is there some way of including an update method that is called on each loop of the main program? Making it possible to perform an operation for the duration of the state?
The text was updated successfully, but these errors were encountered: