jrullan / StateMachine

State machine library for Arduino
MIT License
138 stars 26 forks source link

Unclear documentation #15

Open surdu opened 3 years ago

surdu commented 3 years ago

Hello,

Just started using your library and this puzzles me:

S0->addTransition(&transitionS0,S0);    // Transition to itself (see transition logic for details)

Where exactly is the "transition logic" explained ?

olehvavryniv commented 4 months ago

Good point. I figured out that the transitionS0 function should always return false. In other cases, you will loop in S0 forever. Also, from the source code, I see that transition to itself for the first state is not required.