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
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Dev helper: record the Cardputer's serial output for N seconds (follows port changes).
# Usage: scripts/serial_log.sh [seconds] [command...] — stop early with: docker rm -f roro9stack-serial
set -euo pipefail
source "$(dirname "$0")/_docker.sh"
docker rm -f roro9stack-serial >/dev/null 2>&1 || true
DOCKER_EXTRA=(--name roro9stack-serial --group-add "$(getent group dialout | cut -d: -f3)" --privileged -v /dev:/dev)
run_in_container /pio/penv/bin/python scripts/serial_log.py "${1:-60}" "${@:2}"