feat: sequences v2, bridges, and sim-controller

Rework sequences (engine, seqplay, envelope, API, web UI), add bridge
support, add the host sim-controller and rig simulation tests, and
update docs, presets and project tooling config.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Sonnet 5.5 committed 2026-11-10 17:47:27 +13:00
1 parent d664026ee5
commit 2543673bd8
68 files changed
+5761 -460

No files matched your search

+57 -5
View File
@@ -349,13 +349,14 @@
<div id="sequences-modal" class="modal">
<div class="modal-content">
<div class="modal-head">
<h2>Sequences</h2>
<h2>Sequences &amp; animations</h2>
<div class="modal-top-actions">
<button type="button" class="btn btn-secondary" id="sequences-close-btn">Close</button>
</div>
</div>
<div class="modal-actions">
<button type="button" class="btn btn-primary" id="sequence-add-btn">Add</button>
<button type="button" class="btn btn-primary" id="sequence-add-btn">Add sequence</button>
<button type="button" class="btn btn-primary" id="animation-add-btn">Add animation</button>
<button type="button" class="btn btn-secondary" id="sequences-open-presets-btn">Presets</button>
</div>
<div id="sequences-list" class="profiles-list"></div>
@@ -368,6 +369,7 @@
<div class="modal-head">
<h2>Sequence</h2>
<div class="modal-top-actions">
<button type="button" class="btn btn-secondary" id="sequence-editor-try-btn" title="Save, then play it in the current zone">Save &amp; play</button>
<button type="button" class="btn btn-primary" id="sequence-editor-save-btn">Save</button>
<button type="button" class="btn btn-secondary" id="sequence-editor-close-btn">Close</button>
</div>
@@ -377,7 +379,15 @@
<input type="text" id="sequence-editor-name" placeholder="Sequence name" style="width:100%;max-width:24rem;">
</div>
<div class="preset-editor-field">
<label for="sequence-editor-mode">Steps last</label>
<label for="sequence-editor-kind">Kind</label>
<select id="sequence-editor-kind" class="zone-device-add-select">
<option value="sequence">Sequence</option>
<option value="animation">Animation (one shot)</option>
</select>
<div id="sequence-editor-kind-hint" class="muted-text"></div>
</div>
<div class="preset-editor-field">
<label for="sequence-editor-mode">Steps last (lanes can override)</label>
<select id="sequence-editor-mode" class="zone-device-add-select">
<option value="beats">Beats</option>
<option value="time">Time (seconds)</option>
@@ -389,6 +399,18 @@
Loop
</label>
</div>
<details class="seq-targets-panel" open>
<summary><strong>Targets</strong> <span class="muted-text">— the drivers this sequence plays to, in order. Lanes, steps and chases pick from them.</span></summary>
<div id="sequence-editor-targets" class="profiles-list"></div>
<div class="modal-actions">
<button type="button" class="btn btn-secondary btn-small" id="sequence-editor-add-target-btn">Add target</button>
<button type="button" class="btn btn-secondary btn-small" id="sequence-editor-per-driver-btn" title="One target for each driver in this zone's groups">One per driver</button>
</div>
</details>
<div class="modal-actions">
<button type="button" class="btn btn-secondary btn-small" id="sequence-editor-view-btn">Show grid</button>
</div>
<div id="sequence-editor-grid" class="seq-grid" hidden></div>
<div id="sequence-editor-lanes"></div>
<div class="modal-actions preset-editor-modal-actions">
<button type="button" class="btn btn-secondary btn-small" id="sequence-editor-add-lane-btn">Add lane</button>
@@ -426,7 +448,16 @@
</div>
<div class="preset-editor-field">
<label for="preset-delay-input">Delay (ms)</label>
<input type="number" id="preset-delay-input" placeholder="Delay" min="0" max="10000" value="0">
<input type="number" id="preset-delay-input" placeholder="Delay" min="0" max="60000" value="0">
</div>
<div class="preset-editor-field">
<label for="preset-fade-input">Fade in (ms)</label>
<input type="number" id="preset-fade-input" placeholder="0" min="0" max="10000" step="50" value="0" title="Crossfade from what the strip showed when this preset is selected (needs updated drivers)">
</div>
<div class="preset-editor-field">
<label for="preset-beat-time-input" title="Delay and timing parameters count quarter beats instead of ms, so the preset follows the tempo">
<input type="checkbox" id="preset-beat-time-input"> Times in ¼ beats
</label>
</div>
<div class="preset-editor-field">
<label for="preset-background-input">Background</label>
@@ -954,6 +985,10 @@
<ul>
<li><strong>Sequences</strong> (Edit mode): build multi-step shows with one or more <strong>lanes</strong> (each lane targets a device group).</li>
<li>Add presets as steps per lane; open from the zone editor to attach a sequence to a zone.</li>
<li><strong>Targets</strong>: list the drivers the sequence plays to (groups or single drivers; <em>One per driver</em> fills it from the zone). Each lane picks its targets, and a step can light just some of them.</li>
<li><strong>Lane options</strong>: timing in beats or seconds (beat and time lanes run side by side), <em>Start after</em> to offset a lane, <em>Speed</em> ¼×–4×, and <em>Chase</em> to move each step to the next target (forward, reverse, bounce, random).</li>
<li><strong>Animations</strong>: a one-shot clip. Its zone tile (⚡) plays it once over whatever runs, then the drivers go back; the sequence underneath keeps time. A step can fire an animation too.</li>
<li><strong>Show grid</strong>: all lanes on one time line, with the playing steps lit; click a cell to change it.</li>
<li><strong>Beat</strong> / <strong>Downbeat</strong> toggle (header): when starting a sequence, wait for beat or downbeat before step 1.</li>
<li>Tap <kbd>S</kbd> or the BPM button during playback to sync step timing to music (with Audio running).</li>
</ul>
@@ -1153,11 +1188,12 @@
<h2>Device Settings</h2>
<div class="settings-tabs" role="tablist" aria-label="Settings sections">
<button type="button" class="settings-tab-btn active" role="tab" id="settings-tab-controller" data-settings-tab="controller" aria-selected="true" aria-controls="settings-panel-controller">Controller</button>
<button type="button" class="settings-tab-btn" role="tab" id="settings-tab-network" data-settings-tab="network" aria-selected="false" aria-controls="settings-panel-network">Network</button>
<button type="button" class="settings-tab-btn" role="tab" id="settings-tab-led-tool" data-settings-tab="led-tool" aria-selected="false" aria-controls="settings-panel-led-tool">Driver</button>
</div>
<div id="settings-panel-controller" class="settings-tab-panel active" data-settings-panel="controller" role="tabpanel" aria-labelledby="settings-tab-controller">
<p class="muted-text">Controller name, ESP-NOW channel and network.</p>
<p class="muted-text">Controller name and ESP-NOW channel.</p>
<div id="settings-message" class="message"></div>
@@ -1181,6 +1217,14 @@
</form>
</div>
</div>
<div id="settings-panel-network" class="settings-tab-panel" data-settings-panel="network" role="tabpanel" aria-labelledby="settings-tab-network" hidden>
<div class="settings-section">
<h3>Connected</h3>
<div id="network-status" class="muted-text">Loading…</div>
</div>
<!-- Network -->
<div class="settings-section">
<h3>Network</h3>
@@ -1204,6 +1248,11 @@
<input type="text" id="ap-password-input" placeholder="open (no password)" minlength="8" maxlength="63" autocomplete="off">
<small>8 to 63 characters (WPA2). Leave empty for an open network.</small>
</div>
<div class="form-group">
<label for="bridge-input">Simulator bridge</label>
<input type="text" id="bridge-input" placeholder="off (drivers over the radio)" maxlength="63" autocomplete="off">
<small><code>host:port</code> of led-simulator (UDP, port 8766). While set, the controller talks to the simulated drivers instead of the radio. Leave empty for the real rig.</small>
</div>
<div class="form-group">
<label>Static IPs</label>
<small>Tried in order each time the Ethernet link comes up; the first whose gateway answers is used. If none does, or the list is empty, DHCP is used. With no DHCP server, as on a cable straight to a PC, the controller is at <code>192.168.4.1</code>; give the PC a static IP such as <code>192.168.4.2</code>.</small>
@@ -1214,6 +1263,9 @@
<button type="submit" class="btn btn-primary btn-full">Save network settings</button>
</div>
<small>Network changes apply after the controller restarts.</small>
<div class="btn-group">
<button type="button" class="btn btn-secondary btn-full" id="reboot-btn">Reboot controller</button>
</div>
</form>
</div>
</div>