Fixo Studio

Manager activities and editors

Reference for the Studio activity tree — the entry point for browsing, editing, and authoring every Fixo resource.

Where it lives

FixoStudioActivity is reachable from the Hub utilities menu and the Agent configuration menu. It's a MenuActivity whose buttons push specific manager activities onto the activity stack. Studio runs Node-independently (it takes a FixoLibrary* and a couple of helpers, not an Agent*) so Hub and Remote can author presets too.


Manager activities

Every Book has a manager. They share a common base (FixoItemManagerActivity) and a uniform UI:

  • Presets: manager FixoPresetManager, editor FixoPresetEditorActivity.
  • Boards: manager FixoBoardTypeManager, editor BoardManagerActivity (in libboard).
  • Actuator types: manager FixoActuatorTypeManager, editor FixoActuatorTypeEditorActivity.
  • Sensor types: manager FixoSensorTypeManager, editor FixoSensorTypeEditorActivity.
  • Lobe types: manager FixoLobeTypeManager, editor FixoLobeTypeEditorActivity.
  • Stanza templates: manager FixoStanzaTemplateManager, inline edit.
  • Preset templates: manager FixoPresetTemplateManager, inline edit.

Common manager UI

Element Behaviour
List view Items in FixoBook::list() order. Built-ins greyed out and read-only.
New Auto-numbered name suggestion ("New preset 1", etc.). Calls book->create().
Rename Disabled for built-ins. Inline edit with collision check.
Duplicate Creates "Copy of X". Always enabled — duplicate-to-edit is the workflow for editing built-ins.
Delete Disabled for built-ins. Confirmation dialog.
Import File picker; calls book->importFile().
Export Writes the selected item via book->exportFile().
From template Visible only on FixoPresetManager. Pushes the preset-template wizard.
Done Pops the manager off the stack.
Double-click on item Opens the matching editor activity.

Built-in items

Items with builtin: true in their fixo.json are read-only. The manager:

  • Greys out the row in the list
  • Disables Rename and Delete
  • Allows Duplicate (the recommended way to customise a built-in)
  • Opens the editor in read-only mode (all fields disabled, Save greyed out, tooltip explains)

Type editors

FixoActuatorTypeEditorActivity, FixoSensorTypeEditorActivity, and FixoLobeTypeEditorActivity share a common base (FixoTypeEditorActivity) and look like this:

Common fields

  • Type id — unique identifier (e.g. my-custom-servo)
  • Title — human-readable
  • Description — one-line description
  • Main header — the .hpp filename the firmware generator includes (e.g. my-custom-servo.hpp)
  • C++ source — full-screen code editor with CppSyntaxHighlighter and WidgetCodeEditor (line numbers, error squigglies, auto-indent on Enter, Tab indent, Ctrl+Shift+Up/Down to move lines)
  • Save / Cancel buttons (Save is greyed for built-ins)

Per-type fields

Editor Extra fields
Actuator type pinCount, pinPurposes, wire valueRep (totalBits, fractionalBits, isSigned, isFloat)
Sensor type pinCount, pinPurposes
Lobe type placement (board-only / native-only / both), inputParameters

Debounced source change signal

The base class emits sourceDebouncedChanged(QString) 500 ms after the user stops typing in the C++ editor. A status line under the editor reads editing… → changes pending save. The future live-compile path hooks this signal to a background LLVM build that maps compiler diagnostics back to line annotations via WidgetCodeEditor::setLineMessage().

Live error feedback is currently scaffolded but inactive — a type in isolation has no preset context, so the background build needs a Phase 6 FixoRuntime instance (or a Phase 4 preset context) to produce meaningful diagnostics. Editing types still works fine; you just don't get inline compile errors yet.


Preset editor

FixoPresetEditorActivity opens when the user double-clicks a preset in FixoPresetManager (or via New / Duplicate / From template). Layout:

Section What it edits
Name Free-text id
Board QComboBox populated from FixoBoardTypeBook. Mandatory.
Actuators Table; one row per actuator with columns: type (combo), name, pin, trim, min, max, reverse. Add / Remove buttons.
Sensors Table; columns: type, name, pin, pinB (for two-pin sensors). Add / Remove buttons.
Stanzas List id — lobeType (N mappings). Add / Edit / Remove. The full per-stanza pose-mapping editor arrives with StanzaEditorActivity.
Stanza sets QLabel summarising derived stanza sets. Recomputed automatically when actuators or stanzas change.
Save / Cancel Save persists via FixoPresetBook::create(); Cancel pops without writing.

Built-in presets load read-only with all inputs disabled and Save greyed out (tooltip points at Duplicate).

Stanza-set visualisation

The "Stanza sets" label lists each derived set, e.g.:

Set 1: walk, idle           (share leg actuators)
Set 2: drive                 (uses wheels only)

Two stanzas end up in the same set when they share any actuator. Only one stanza per set can run at a time — the Remote-side stanza picker enforces this with a conflict-disabling combo.


How the Studio composes

FixoStudioActivity (MenuActivity)
├── Presets
│   ├── FixoPresetManager        ─▶ FixoPresetEditorActivity
│   └── FixoPresetTemplateManager ─▶ inline edit / wizard
├── Hardware
│   ├── FixoBoardTypeManager     ─▶ BoardManagerActivity (libboard)
│   ├── FixoActuatorTypeManager  ─▶ FixoActuatorTypeEditorActivity
│   └── FixoSensorTypeManager    ─▶ FixoSensorTypeEditorActivity
├── Control
│   ├── FixoLobeTypeManager      ─▶ FixoLobeTypeEditorActivity
│   └── FixoStanzaTemplateManager ─▶ inline edit
└── Build
    └── (FixoRuntime view — see fixo-runtime reference)

Source code

Each header has the name of its class. The exception is FixoManagers.hpp, which holds FixoPresetManager and the other managers.

These components are in libfixo/fixo/studio/:

  • FixoStudioActivity
  • FixoItemManagerActivity
  • FixoPresetManager and the other managers, in FixoManagers.hpp
  • FixoPresetEditorActivity
  • FixoPresetTemplateWizardActivity

These components are in libfixo/fixo/type/:

  • FixoTypeEditorActivity
  • FixoActuatorTypeEditorActivity
  • FixoSensorTypeEditorActivity
  • FixoLobeTypeEditorActivity

See also

In this section
Topics
reference hardware fixo studio ui manager editor
See also