09-09-2013 09:14 AM
inuyasha84 wrote:
2- if i do this, the driver will flow each case of the state machine. I want to give to the user a chance to choose in which state of the state machine he wants to be.
This is sounding more like an Action Engine. If that is your goal, then all of these events make no sense at all.
From what I can gather from your code, you don't need a state machine. All you need is 1 while loop with an event structure inside. This single event structure can handle all of your events. When a command needs executed, send that command to the unit inside of the specific event case.