FSM process flow 1.60 (Power User)
Note for onboarding: This chapter is for advanced users. You can skip it during initial Brautomat setup and return later if needed. Start first with The Control and PID instructions.
Why FSM
Since 1.60, control algorithm (PID/AutoTune) and process orchestration (start, stop, pause, step transitions, mode transitions) are intentionally separated. FSM guarantees that each action is processed in a clear state context.
Practical benefits:
fewer repeated triggers,
fewer stuck intermediate states,
cleaner separation between UI actions and heating behavior.
Global modes
Exactly one mode is active at any time:
MODE_NONEMODE_MASHMODE_MANUALMODE_AUTOTUNEMODE_FERM
On mode changes, the old mode is cleanly stopped before the new mode starts.
Process states
MASH_IDLEMASH_WAIT_TEMPMASH_RUNNING_STEPMASH_PAUSEDMASH_WAIT_USERMASH_FINISHEDMASH_AUTOTUNE_RUNNING
Each UI action and internal event therefore has defined state input and transition output.
Events and queue
Typical events:
MASH_EVT_START,MASH_EVT_STOPMASH_EVT_PLAYMASH_EVT_PAUSE_START,MASH_EVT_PAUSE_STOPMASH_EVT_NEXT_STEP,MASH_EVT_PREV_STEPMASH_EVT_TEMP_TICKMASH_EVT_TIMEOUTMASH_EVT_AUTOTUNE_START,MASH_EVT_AUTOTUNE_STOP
Robustness relies on event prioritization:
stop-related events are prioritized,
frequent idempotent events (
TEMP_TICK) are coalesced.
Virtual step timer
Step timing is explicit state:
runningperiodMsremainingMsdeadline
Pause/resume, timeout handling, step changes, and UI timing all use the same time source.
Typical flow
STARTactivates mode/state.system enters
WAIT_TEMP.TEMP_TICKchecks temperature gate.on gate release, timer starts and state becomes
RUNNING_STEP.TIMEOUTends the step.flow continues via AutoNext or
WAIT_USER.PLAYresumes flow.STOPreturns to clean end state.
FSM and PID role split
FSM decides when control/heating is allowed.
PID engine decides how control is applied inside that window.
See also
Last updated