docs: P4-Nano controller and simulator, users API, README screenshots
README, API, help, P4_NANO and the sub-READMEs now describe the ESP32-P4-Nano controller and the simulator on it. API.md gains the users and permissions routes; BENCH_TEST and SPECIFICATION are marked historical. Screenshots of the simulator, sequence editor and pattern gallery. Graph rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8756315a7b
commit
e0c6c36996
32 files changed
+269751
-683
No files matched your search
+14
-8
@@ -1,7 +1,7 @@
|
||||
# led-simulator
|
||||
|
||||
A whole LED rig in the browser, served by **led-controller itself**. The host build of the controller
|
||||
(`sim-controller`, and the desktop build) serves the rig at **`/sim/`**:
|
||||
A whole LED rig in the browser, served by **led-controller itself**. The controller on the ESP32-P4-Nano, the desktop
|
||||
program and the `sim-controller` build all serve the rig at **`/sim/`**:
|
||||
|
||||
- Every LED bar is its own led-driver: the real **C++ firmware** (`led-driver/main`) built to **WebAssembly**
|
||||
(`../sim-driver/`), one module worker per bar. The worker runs what the board's pattern task and ESP-NOW link task
|
||||
@@ -36,6 +36,11 @@ their places from the room. Only one tab runs the rig: opening it in a second ta
|
||||
Settings > Network > Bridges or with the page's *Add the browser bridge* button. `make sim-web` starts the host build
|
||||
with `LED_SIM_BRIDGE=browser`. With no bridge configured, `browser` is the default.
|
||||
|
||||
On the **ESP32-P4-Nano** the rig is part of the firmware (`make sim-wasm`, then `make build`) at
|
||||
`http://192.168.50.20/sim/`. The `browser` bridge is always on there, next to the real radio, so a preset plays on the
|
||||
real drivers and the simulated bars together. Frames addressed to simulated bars (MACs starting `02:51:4d`) are not sent
|
||||
over the air.
|
||||
|
||||
## Rooms
|
||||
|
||||
The spatial config follows the stage maps of the qlcplus simulator: one file per room, a size in metres,
|
||||
@@ -67,7 +72,8 @@ strip types in `definitions`, and `fixtures` keyed by id, each placed by positio
|
||||
- The first run makes the `default` room: 16 bars × 119 LEDs in 2 columns × 8 rows, pixel 0 at the centre line,
|
||||
`sim-01` … `sim-16` = `02:51:4d:00:00:01` … `…:10`. The rig's bridge is `02:51:4d:00:00:00`.
|
||||
|
||||
Everything is kept in the controller's store folder (`LED_SIM_DB`; `sim-controller/data` for `make sim-web`):
|
||||
Everything is kept in the controller's store folder (`LED_SIM_DB`; `sim-controller/data` for `make sim-web`; `/db` on the
|
||||
board):
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
@@ -145,17 +151,17 @@ On the page, in Edit mode:
|
||||
## How it fits together
|
||||
|
||||
```
|
||||
led-controller (host build) ──"browser" bridge──▶ WS /sim/ws ──▶ page ──postMessage──▶ driver worker × N
|
||||
rel, beats, sequences ◀── src_mac+pkt ───── ◀── tx, px, flash ── (led_driver.wasm:
|
||||
/sim/ page + rooms (sim_rig.c) sim_tick: link + patterns)
|
||||
led-controller ──"browser" bridge──▶ WS /sim/ws ──▶ page ──postMessage──▶ driver worker × N
|
||||
rel, beats, sequences ◀── src_mac+pkt ── ◀── tx, px, flash ── (led_driver.wasm:
|
||||
/sim/ page + rooms (sim_rig.c) sim_tick: link + patterns)
|
||||
```
|
||||
|
||||
| Where | What |
|
||||
| --- | --- |
|
||||
| `sim-controller/components/sim/sim_rig.c` | serves the page and the wasm from `www_dist/sim.pack`, the page's WebSocket, rooms and flash |
|
||||
| `sim-controller/components/sim/sim_rig.c` | serves the page and the wasm from `www_dist/sim.pack`, the page's WebSocket, rooms and flash. Also compiled into the board's firmware (`main/CMakeLists.txt`) |
|
||||
| `sim-controller/components/sim/sim_net.c` | receives Art-Net and DDP for the network fixtures and passes them to the page |
|
||||
| `main/bridge.c` | the `browser` bridge kind next to UDP and serial |
|
||||
| `tools/build_sim_web.sh` | packs `web/` and `web/wasm/` into `www_dist/sim.pack`. It is empty when the drivers are not built, so `make desktop` works without Emscripten. |
|
||||
| `tools/build_sim_web.sh` | packs `web/` and `web/wasm/` into `www_dist/sim.pack`. It is empty when the drivers are not built, so `make build` and `make desktop` work without Emscripten. |
|
||||
| `../sim-driver/` | the Emscripten build of the driver (`led_driver`) and the pattern engine for the gallery (`led_fx`) |
|
||||
| `web/app.js` | the room canvas, editor, power control, packet routing by MAC, and placements for `POST /devices/layout` |
|
||||
| `web/driver-worker.js` | loads `led_driver.mjs` and boots one bar |
|
||||
|
||||
Reference in new issue
Block a user