Add serial dev commands and a serial log helper

The firmware accepts burst, key <name>, sound on|off and short|normal
over serial, so UI behaviour can be reproduced on the device without
the keyboard. scripts/serial_log.sh records (and drives) it in a named
container that flash.sh removes before uploading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-02 13:38:25 +02:00
co-authored by Claude Opus 5.5
parent 9218a34c3e
commit 05c9d9cc56
5 changed files with 86 additions and 0 deletions
+13
View File
@@ -36,3 +36,16 @@ This runs the host-side unit tests (`test/`, `native` environment), then builds
```sh
sudo usermod -aG dialout "$USER"
```
## Development aids
`scripts/serial_log.sh [seconds] [command…]` records the serial output, and can send commands to the firmware first. For example, `scripts/serial_log.sh 30 short sleep:12 burst` sets short screen timeouts, waits 12 s, then sends a burst of Toasts.
| Command | Effect |
|---|---|
| `burst` | Publishes 5 Notifications at once |
| `key up\|down\|left\|right\|select\|back\|home` | Injects a logical key press |
| `sound on` / `sound off` | Toggles the Sound setting (beep + LED) |
| `short` / `normal` | Screen timeouts 5 s / 10 s, or 30 s / 60 s |
`scripts/flash.sh` stops a running serial log first, since it would hold the port.