Access to FSM instance from main.cpp
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 193
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
How is the best way to access the **FSM instance** (for example in the elevator project)?
We would like to be able to modify or get state machine values from outside the machine? Is this possible?
In main.cpp, the FSM is initializated like [this](https://github.com/digint/tinyfsm/blob/01908cab0397fcdadb0a14e9a3187c308e2708ca/examples/elevator/main.cpp#L8C3-L8C21). Where is the instance or the object? For example, if we may want to update motor direction directly from the main function, how it would be done?
I miss something like:
_fsm_object->motor.direction = 1_
Thank you for this application and for your response.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.