Replies: 2 comments 4 replies
-
@GrKoR conditional transitions are not yet supported. I have not had a use case for them yet, and as you said it's possible to work around the limitation with separate inputs. Out of curiosity, in what circumstance would a transition from As a side note, a disadvantage of conditional transitions IMO is that conditions are not explicitly depicted on the state diagram, so it make it harder to reason about the state machine. |
Beta Was this translation helpful? Give feedback.
3 replies
-
There's a feature request with proposed implementation for conditions: #38 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@muxa
Hi!
Thnx for your work! It's cool! =)
Is there any way for conditional transitions?
In the simple example below I can go into two different states from state ON by transition BTN_PRESSED. How can I specify that transition ON -> OFF should be performed if some variable is set true? ON -> UNKNOWN transition should be performed in all other cases.
Yes, I can divide BTN_PRESSED input into two separated inputs: BTN_PRESSED_ONOFF and BTN_PRESSED_UNKNOWN. But... it looks strange :)
Is it possible to do this in more convenient way?
Beta Was this translation helpful? Give feedback.
All reactions