Files
clearpilot/launch_openpilot.sh
Brian Hanson 4f16a8953a GPS fix + log directory redesign + dashcamd binary
GPS: fix AT response parsing (strip mmcli `response: '...'` wrapper),
fix capnp field names (horizontalAccuracy, hasFix), set system clock
directly from first GPS fix when time is invalid, kill system gpsd on
startup.

Logging: replace module-level log dir creation with init_log_dir()
called from manager_init(). Active session always at /data/log2/current
(real dir until time resolves, then symlink to timestamped dir). Add
LogDirInitialized param. Redirect both stdout+stderr for all processes.

Also: thorough process cleanup in launch scripts, dashcamd binary,
CLAUDE.md updates for GPS/telemetry/bench/logging docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 04:51:33 +00:00

27 lines
790 B
Bash
Executable File

#!/usr/bin/bash
# Kill other instances of this script, launch chain, and all managed processes
for pid in $(pgrep -f 'launch_openpilot.sh' | grep -v $$); do
kill -9 "$pid" 2>/dev/null
done
for pid in $(pgrep -f 'launch_chffrplus.sh' | grep -v $$); do
kill -9 "$pid" 2>/dev/null
done
pkill -9 -f 'python.*manager.py' 2>/dev/null
# Kill all processes started by the manager (run as comma user, in openpilot tree)
pkill -9 -f 'selfdrive\.' 2>/dev/null
pkill -9 -f 'system\.' 2>/dev/null
pkill -9 -f './ui' 2>/dev/null
pkill -9 -f 'selfdrive/ui/text' 2>/dev/null
sleep 1
bash /data/openpilot/system/clearpilot/on_start.sh
# CLEARPILOT: pass --bench flag through to manager via env var
if [ "$1" = "--bench" ]; then
export BENCH_MODE=1
fi
cd /data/openpilot
exec ./launch_chffrplus.sh