mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 10:22:02 +00:00
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:
parent
f855cac040
commit
98963b0b9a
3 changed files with 5 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ services:
|
|||
environment:
|
||||
- RUST_LOG=info
|
||||
- MOCK_TEENSY=1
|
||||
- HACI_SERIAL_PORT=/dev/ttyACM0
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue