-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Hi!
In state machines, the FPP specification currently only supports the following pattern for state transitions:
on identifier [ if identifier ] transition-or-do
It would be great, and I don't think too hard, to enable the use of an else in that transition specifier. Here is a pattern that we would like to use in our flight sequencer:
guard guard_sensors_read_nominal_values
signal tick
action current_state_action
state CURRENT_STATE {
on tick if guard_sensors_read_nominal_values do { current_state_action } else enter ABORT_STATE
}
state ABORT_STATE {}
In essence, we want something like the choice, but that supports both the transition-expression and the do-expression. This would allow a more solid and intuitive logic flow in the state machine.
Let me know if you believe it would be possible and acceptable for you to add that syntax to FPP.
Thank you for your work and have a great day,
Etienne
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog