Add web dashboard configuration for master and slaves.

Expose deadzone and unicast-test via HTTP API and UI, reusing the same UART commands as the CLI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-19 00:10:33 +02:00
co-authored by Cursor
parent caf1b8d0d8
commit 85aeab85c0
6 changed files with 397 additions and 18 deletions
+10
View File
@@ -58,6 +58,16 @@ Open [http://localhost:8080](http://localhost:8080) — shows master firmware in
If the UART device is unplugged or the port disappears, `serve` keeps running and retries on each poll interval; the UI shows **UART off** until the port is available again.
The dashboard can configure nodes using the same UART commands as the CLI:
| UI action | CLI equivalent |
|-----------|------------------|
| Master / slave deadzone | `deadzone -set -value N -client ID` |
| Alle Slaves | `deadzone -set -value N -all` |
| Unicast test | `unicast-test -client ID` |
HTTP API (used by the web UI): `GET/POST /api/deadzone`, `POST /api/unicast-test`.
```bash
go run . -port /dev/ttyUSB0 unicast-test -client 16 -seq 42
```