rjwilliams wrote:
just wanted to say I was having a similar problem but thanks to this thread have gotten it sorted out!
This is a very old thread. I would strongly suggest NOT to implement such a beast, but use a plain event driven state machine architecture instead.
Especially the original question has a few very silly things that make absolutely no sense, for example there is no reason to have this re-entrant, and "stop if true" is not a feature of any stop button, but of a while loop termination terminal. There is probably no sequence needed. You never want to spin an empty loop for no reason.
If you don't mind, show us your code and we might be able to suggest improvements to make the code dramatically simpler, more scalable, amd more readable. 🙂