When a software grows keeping track of states and transitions becomes more and more difficult. When simple enumeration – switch – case statemachine is not feasible anymore it is time to look at some UML (statechart) modelling tool. There are tons of them around the Web but unfortunately most of them are not able to generate code for created statemachines in C or C++. If there is some, it costs a fortune like Rhapsody or when free like Quantum Leaps it brings it’s own framework (for pedants, Rhapsody has it’s framework too).
But when you want to have full control of event flow and generation and statemachine execution. It is a problem. Finally I have found a possible solution. It is called Yakindu. After few tests it looks good enough. I’ll look how to incorporate it to the heli system.