Visual State Machine Editor for Embedded GUI

Define how your embedded display responds to events — which screen is active, which widgets are visible, what animations play — using Flint's UML-based visual state machine editor. Sparklet generates a complete C hierarchical state machine. No flag variables, no if-else chains, no manual state management.

What Is a Visual State Machine Editor for Embedded GUI?

A visual state machine editor for embedded GUI is a tool that lets developers define an application's screen navigation logic, event responses, and UI state transitions as a UML state diagram — rather than as hand-written if-else chains and flag variables in C code. Flint UI Designer, Sparklet's PC-based design tool, includes a fully integrated UML-based hierarchical state machine (HSM) editor. States, transitions, guards, and actions are drawn visually. On export, Flint generates a complete C state machine implementation using Sparklet's RS_MIN layer, which the application drives by sending events — with no UI logic to maintain in application code.

Every non-trivial embedded GUI has state. A medical patient monitor shows different screens depending on whether the device is in standby, measuring, alarming, or configuration mode. An automotive cluster shows different data layouts depending on the vehicle drive mode and warning status. An industrial HMI navigates between overview, detail, and settings screens based on operator input. Managing this state correctly — handling event priorities, ensuring valid transitions, coordinating widget updates and animations — is one of the most error-prone parts of embedded GUI development when done manually.

Flint's state machine editor makes this logic visible, auditable, and automatically implemented in C. The Flint UI Designer integrates the state machine directly with widget designs and animation sequences, so the full UI behaviour is defined in one place.

Three Layers of the Flint State Machine

Features Image

Hierarchical States, Guards, and Animation Coordination

Hierarchical States — Controlling State Explosion

A hierarchical state machine (HSM) organises states into parent-child relationships. A child state inherits all event handlers and properties of its parent and only overrides what differs. A vehicle cluster might have a top-level DRIVING state with child states NORMAL, ECO, and SPORT that all share the same base screen layout but differ in colour theme and gauge range. Only the differences are specified in the child state. States can carry timeout events: if the UI stays in a state longer than a configured duration, a timeout transition fires automatically — used for screen dimming, auto-return to home, and idle detection.

Transitions — Guard Conditions and Action Calls

Transitions connect states and are triggered by events: a widget touch event (button press, swipe, scroll), a timer expiry, a data threshold crossing, an external application message (CAN message received, RTOS queue post), or a system event (power on, power off, communication error). Each transition carries two optional elements. A guard condition is a boolean expression that must evaluate true for the transition to fire — for example, a settings screen transition that only fires if the user is authenticated. An action is a function call that executes when the transition fires — calling a data API to reset a counter, starting an animation sequence, or logging an event.

Guards and actions are specified in Flint by referencing C function stubs that Flint generates in the exported code. The developer implements the function body; Flint generates the call site and the state machine wiring. The interface is always consistent with what is drawn in the diagram.

Animation Coordination

Flint's state machine editor integrates directly with the animation designer. Entry and exit animations are assigned to states in the same tool. When the state machine transitions, Sparklet automatically plays the exit animation of the leaving state and the entry animation of the arriving state — in the correct order, with correct timing, and with no application code required to coordinate them. This coordination would require significant manual synchronisation code if implemented without the integrated toolchain.

Visual State Machine Editor vs Manual Flag-Based State Management

AspectManual Flag VariablesFlint State Machine Editor
State representationBoolean flags, mode integers scattered across filesExplicit states in a visual UML diagram
Transition logicNested if-else chains — hard to traceArrows with guard labels — readable at a glance
Guard conditionsInline boolean expressions in event handlersNamed guard functions, stubs generated by Flint
Animation coordinationManual animation start/stop calls in state codeEntry/exit animations assigned in Flint — auto-played
Safety documentationReviewers must read C source to understand flowUML diagram is directly readable by safety engineers
Parallel developmentUI and firmware developers share mutable state codeInterface defined by diagram — teams work independently
Test coverageHard to enumerate all flag combinationsStates and transitions are enumerable and testable
Data-driven transitionsPolling loops or manual threshold checksData binding with threshold guards — declarative

State Machine Editor — Key Capabilities

Four features that make Flint's state machine editor practical for production embedded GUI projects.
UML Diagram

Visual UML State Diagram

Draw states and transitions on a canvas using UML statechart conventions. The diagram is the authoritative specification — Flint generates C directly from it.

Hierarchical States

Hierarchical States (HSM)

Child states inherit parent behaviour and override only differences. Eliminates state explosion in complex multi-mode embedded GUIs. Maps directly to Sparklet's RS_MIN HSM layer.

Guards & Actions

Guards, Actions & Timeouts

Attach guard conditions and action calls to transitions. Define state timeout events for idle detection and auto-navigation. Guards and actions compile to C function stubs for the developer to implement.

Data Binding

Data Binding to Widget Properties

Bind widget properties to application data variables. Automatic widget update on data change. Data thresholds trigger state transitions. Live data injection in the PC simulator for testing.

Frequently Asked Questions

A visual state machine editor for embedded GUI is a tool that lets developers define application screen states, transitions between states, event triggers, guard conditions, and data bindings as a UML state diagram. Flint UI Designer's state machine editor generates a complete C hierarchical state machine (HSM) implementation from the diagram — so the developer never writes manual state management code. The diagram is always consistent with the running code because the code is generated from the diagram.

Try Flint's State Machine Editor Free

Download the Sparklet evaluation package — includes Flint UI Designer with the full state machine editor, data binding, animation integration, and PC simulator. Evaluate on Windows without any embedded hardware.