refactor(display): extract tile layout logic to library helper class
This commit is contained in:
40
mise.toml
40
mise.toml
@@ -27,14 +27,27 @@ arduino-cli compile --fqbn "$FQBN" --libraries ./libraries $LIBS --build-propert
|
||||
|
||||
[tasks.upload]
|
||||
description = "Upload (uses BOARD env var)"
|
||||
depends = ["compile"]
|
||||
run = """
|
||||
# Kill any processes using the serial port first
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
PORT="${PORT:-$PORT}"
|
||||
fuser -k "$PORT" 2>/dev/null || true
|
||||
for pid in $(pgrep -f "monitor-agent.py" 2>/dev/null || true); do
|
||||
kill "$pid" 2>/dev/null || true
|
||||
done
|
||||
rm -f "/tmp/doorbell-${BOARD}.lock" 2>/dev/null || true
|
||||
sleep 1
|
||||
|
||||
source ./scripts/lockfile.sh
|
||||
|
||||
FORCE=1 TASK_NAME=upload acquire_lock || exit 1
|
||||
|
||||
PORT="${PORT:-$PORT}"
|
||||
arduino-cli compile --fqbn "$FQBN" --libraries ./libraries $LIBS --build-property "compiler.cpp.extra_flags=$OPTS" --warnings default ./boards/$BOARD && \
|
||||
arduino-cli upload --fqbn "$FQBN" --port "$PORT" ./boards/$BOARD
|
||||
|
||||
# Restart monitor in background
|
||||
python3 ./scripts/monitor-agent.py "$BOARD" &
|
||||
echo "[OK] Monitor restarted in background"
|
||||
"""
|
||||
|
||||
[tasks.monitor-raw]
|
||||
@@ -62,10 +75,25 @@ tio --map INLCRNL "$TARGET" -e
|
||||
|
||||
[tasks.kill]
|
||||
description = "Kill running monitor/upload for BOARD"
|
||||
run = """
|
||||
source ./scripts/lockfile.sh
|
||||
kill_locked
|
||||
"""
|
||||
run = '''
|
||||
set +e
|
||||
# Kill any processes using the serial port
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
PORT="${PORT:-$PORT}"
|
||||
fuser -k "$PORT" 2>/dev/null
|
||||
|
||||
# Kill monitor-agent processes for this board
|
||||
for pid in $(pgrep -f "monitor-agent.py"); do
|
||||
kill "$pid" 2>/dev/null
|
||||
done
|
||||
|
||||
# Also clean up lockfile
|
||||
rm -f "/tmp/doorbell-${BOARD}.lock" 2>/dev/null
|
||||
|
||||
sleep 1
|
||||
echo "[OK] Killed processes for $BOARD"
|
||||
exit 0
|
||||
'''
|
||||
|
||||
[tasks.monitor]
|
||||
description = "Monitor agent with JSON log + command pipe (Python-based)"
|
||||
|
||||
Reference in New Issue
Block a user