feat: browser simulator served by the controller, desktop build, browser bridge
- led-simulator: the rig runs the C++ led-driver as WebAssembly (sim-driver/), one single-threaded worker per bar, no cross-origin isolation needed. Rooms (one JSON per room) with an on-page editor, and a pattern gallery. The Python server, Pyodide boot and ring buffer are removed. - sim-controller sim_rig.c: serves /sim/ from an embedded pack, the page's WebSocket and the rooms/flash API. The desktop build embeds it too. - bridge.c: a "browser" bridge kind that carries ESP-NOW frames to the page; devices announced through it are marked sim. - UI: Simulator in the Menu, split view with resize and pop-out, swipe between controller and rig on phones; SIM/REAL badges in Devices. - Fades: preset pushes and Wi-Fi driver bodies always carry fade and beat_time, so "off" no longer inherits an earlier fade. - Also the sequences-v2 work in progress: desktop port, bridge firmware, serial bridge, Wi-Fi drivers, sequence timeline, audio and API changes. - led-driver: ESP-NOW link, beat sync, control messages, sim hooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
698c1463c0
commit
581b751904
506 files changed
+42336
-3599
No files matched your search
@@ -152,6 +152,31 @@ static const struct {
|
||||
{ "spin", "{\"n1\":\"Arms\",\"n2\":\"Arm width (degrees)\",\"n3\":\"Tail (degrees)\",\"n4\":\"1 = clockwise\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "grow", "{\"n1\":\"From: 0 centre, 1 edges, 2 round, 3 across\",\"n2\":\"Then: 0 stay, 1 empty back, 2 empty on, 3 off\",\"n3\":\"Direction (degrees, from = 3)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "field_wave", "{\"n1\":\"Direction (degrees)\",\"n2\":\"Wavelength (‰ of rig)\",\"n3\":\"Kind: 0 linear, 1 rings, 2 swirl, 3 plasma\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "blink", "{\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "aurora", "{\"n1\":\"Bands (wave: period in LEDs)\",\"n2\":\"Shimmer (wave: contrast)\",\"n3\":\"Drift\",\"n6\":\"Style: 0 bands, 1 northern wave\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "bar_graph", "{\"n1\":\"Level (0-100 %)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "blizzard", "{\"n1\":\"Flake density (0-255)\",\"n2\":\"Speed\",\"n3\":\"Wind (128 still, below/above blows one way/other)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "candle_glow", "{\"n1\":\"Candles\",\"n2\":\"Candle width (LEDs)\",\"n3\":\"Flicker (0-255)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "chase", "{\"n1\":\"Segment on (LEDs)\",\"n2\":\"Segment off (LEDs)\",\"n3\":\"Step (LEDs, negative = backwards)\",\"n4\":\"Step B, chase only (negative = backwards)\",\"n6\":\"Style: 0 chase, 1 marquee\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "circle", "{\"n1\":\"Head speed (LEDs/s)\",\"n2\":\"Max length (LEDs)\",\"n3\":\"Tail speed (LEDs/s)\",\"n4\":\"Min length (LEDs)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "clock_sweep", "{\"n1\":\"Hand width (LEDs)\",\"n2\":\"Marker every (LEDs, 0 = none)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "colour_cycle", "{\"n1\":\"Step\",\"n6\":\"Style: 0 colours, 1 rainbow wheel\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "flame", "{\"n1\":\"Min brightness (0-255)\",\"n2\":\"Breath period (ms)\",\"n3\":\"Spark gap min (ms)\",\"n4\":\"Spark gap max (ms, 0 and 0 = 10-30 s)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "flicker", "{\"n1\":\"Min level (0-255)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "gradient_wipe", "{\"n1\":\"From LED\",\"n2\":\"To LED\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "icicles", "{\"n1\":\"Spacing (LEDs)\",\"n2\":\"Max length (LEDs)\",\"n3\":\"Growth step\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "meteor", "{\"n1\":\"Tail (LEDs; scanner: width)\",\"n2\":\"Speed (scanner: end pause ms)\",\"n3\":\"Fade (meteor) / gap (comet)\",\"n6\":\"Style: 0 meteor, 1 comet, 2 scanner\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "orbit", "{\"n1\":\"Orbits\",\"n2\":\"Speed\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "palette_morph", "{\"n1\":\"Morph time (ms)\",\"n2\":\"Warp\",\"n3\":\"Turbulence\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "particles", "{\"n1\":\"Density (snow) / rate (starfall)\",\"n2\":\"Speed\",\"n3\":\"Tail (starfall)\",\"n6\":\"Style: 0 snow, 1 starfall\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "plasma", "{\"n1\":\"Scale\",\"n2\":\"Speed\",\"n3\":\"Contrast\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "pulse", "{\"n1\":\"Attack (ms)\",\"n2\":\"Hold (ms)\",\"n3\":\"Decay (ms)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "radiate", "{\"n1\":\"Spacing (LEDs)\",\"n2\":\"Outward (ms)\",\"n3\":\"Return (ms)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "rain_drops", "{\"n1\":\"Rate\",\"n2\":\"Width (LEDs)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "rime", "{\"n1\":\"Chill (1-255)\",\"n2\":\"Melt (1-255)\",\"n3\":\"Sparkle cap (LEDs)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "sparkle", "{\"n1\":\"Density (trail) / rate (ice) / count (fireflies)\",\"n2\":\"Decay (trail, ice) / speed (fireflies)\",\"n3\":\"Halo 0-3 (ice)\",\"n6\":\"Style: 0 trail, 1 ice, 2 fireflies\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "strobe_burst", "{\"n1\":\"Flashes\",\"n2\":\"Flash gap (ms)\",\"n3\":\"Cooldown (ms)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
{ "twinkle", "{\"n1\":\"Rate (1-255)\",\"n2\":\"Density (0-255)\",\"min_delay\":10,\"max_delay\":60000,\"max_colors\":10}" },
|
||||
};
|
||||
|
||||
// Stored metadata plus the built-ins and {} for every other pattern file, as {name: {...}}
|
||||
|
||||
Reference in new issue
Block a user