feat: enable mock serial port via HACI_SERIAL_PORT and update logs

Co-authored-by: aider (openai/gpt-5) <aider@aider.chat>
This commit is contained in:
Chaos Rogers 2025-10-21 23:44:29 +01:00
parent f855cac040
commit 98963b0b9a
3 changed files with 5 additions and 1 deletions

View file

@ -7,6 +7,7 @@ services:
environment:
- RUST_LOG=info
- MOCK_TEENSY=1
- HACI_SERIAL_PORT=/dev/ttyACM0
ports:
- "8080:8080"
volumes:

View file

@ -20,6 +20,9 @@ if [ "${MOCK_TEENSY:-0}" = "1" ]; then
done
if [ ! -e /dev/ttyACM0 ]; then
echo "[entrypoint] WARNING: Failed to create /dev/ttyACM0 (mock Teensy)" >&2
else
export HACI_SERIAL_PORT=/dev/ttyACM0
echo "[entrypoint] Using mock serial at $HACI_SERIAL_PORT" >&2
fi
fi

View file

@ -21,7 +21,7 @@ s=0
f=0
while true; do
printf "LOCK %02d:%02d:%02d;%02d %s\r\n" "$h" "$m" "$s" "$f" "$RATE_STR"
printf "[LOCK] %02d:%02d:%02d;%02d | %sfps\r\n" "$h" "$m" "$s" "$f" "$RATE_STR"
# increment frame
f=$((f+1))