-
Notifications
You must be signed in to change notification settings - Fork 1
Add Raspberry Pi Sample #43
base: main
Are you sure you want to change the base?
Conversation
a8d7776
to
93af14d
Compare
Did you miss my comments? Also I looked at Machine::Goto and I do see that it executes onExit and onEnter immediately. I believe that leads to infinite recursion if you call GotoState("self") from onExit or onEnter. The simplicity to your GotoState is nice, but so easily shooting yourself in the foot isn't. Also, as I mentioned before, I believe exiting the current child/parent states and then entering new parent/child states is more logical is desirable. But even if you don't like the entering/exiting the hierarchy, delaying the actual transition until after the current message is "processed" eliminates that self inflicted wound. One last point, it can be useful if the message that is associated with the onExit/onEnter is passed to those routines so they can do different things based on the message. |
Yeah sorry I was in the flow; editing on my laptop, (force) pushing here, pulling onto RPi and testing, should have marked this as a draft from the start
In any system transitioning to "self" is an infinite loop and it will not be lively, but I see your point that this is recursive and will blow the stack.
Yeah I agree, created #45 |
No description provided.