feat: dashcamd trip lifecycle, status indicator, CLAUDE.md updates
Some checks failed
prebuilt / build prebuilt (push) Has been cancelled
badges / create badges (push) Has been cancelled

dashcamd now waits for valid system time + GPS fix + drive gear before
starting a trip. Returns to waiting state on 10-min park timeout or
ignition off. Publishes DashcamState and per-trip DashcamFrames to
memory params. Status window shows stopped/waiting/recording states.

Updated CLAUDE.md with current display mode behavior, OmxEncoder port
details, speed limit warning thresholds, and dashcam param docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 01:26:58 -05:00
parent dfb7b7404f
commit 2331aa00a0
7 changed files with 106 additions and 130 deletions

View File

@@ -264,8 +264,8 @@ static StatusWindow::StatusData collectStatus() {
d.telemetry = readFile("/data/params/d/TelemetryEnabled");
// Dashcam
QString dashcam_pid = shellCmd("pgrep -x dashcamd");
d.dashcam_status = dashcam_pid.isEmpty() ? "stopped" : "recording";
d.dashcam_state = readFile("/dev/shm/params/d/DashcamState");
if (d.dashcam_state.isEmpty()) d.dashcam_state = "stopped";
d.dashcam_frames = readFile("/dev/shm/params/d/DashcamFrames");
// Panda: checked on UI thread in applyResults() via scene.pandaType
@@ -383,11 +383,14 @@ void StatusWindow::applyResults() {
telemetry_label->setStyleSheet("color: grey; font-size: 38px;");
}
if (d.dashcam_status == "recording") {
if (d.dashcam_state == "recording") {
QString text = "Recording";
if (!d.dashcam_frames.isEmpty() && d.dashcam_frames != "0") text += " (" + d.dashcam_frames + " frames)";
dashcam_label->setText(text);
dashcam_label->setStyleSheet("color: #17c44d; font-size: 38px;");
} else if (d.dashcam_state == "waiting") {
dashcam_label->setText("Waiting");
dashcam_label->setStyleSheet("color: #ffaa00; font-size: 38px;");
} else {
dashcam_label->setText("Stopped");
dashcam_label->setStyleSheet("color: #ff4444; font-size: 38px;");