Files
sunnypilot/docs
Claude a2645f7575 achievements: count driving stats and unlock achievements on the device
Phase 1 of the community plan: everything stays on the device.

achievementsd (onroad, 10 Hz, read-only) feeds a pure-Python engine from
carState, selfdriveState, selfdriveStateSP, modelV2, driverMonitoringState and
GPS. It counts engaged distance and time, days and streaks, MADS-only km,
assisted lane changes, km per driving model, km on dev builds, the longest run
without a red DM alert, and ~5 km areas (salted hashes, never coordinates).
14 achievements / 32 tiers live in catalog.json, with ids like odometer.silver
that a later backend can map to badges.

Progress is saved to /data/media/0/achievements/state.json every 30 s and at
the end of the drive, so no Params key is added and the prebuilt ARM64 params
library is not rebuilt. The UI keeps its own seen.json for "new" markers.

UI: an "achievements" button on the comma four settings (shows "N new") opening
a card per achievement, and an Achievements panel after Trips on the comma 3X.

26 tests pass for the engine and the UI store. The screens and the process
were only compiled and linted here (the UI and cereal libraries are ARM64
builds); not yet run on a device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATDgLQkU5wERA2wwBF15wr
2026-11-13 05:16:26 +00:00
..
2026-08-06 21:57:56 -04:00
2026-10-29 00:38:25 -04:00
2026-04-15 18:37:23 -07:00
2026-09-04 15:20:43 -07:00
2026-06-21 18:28:35 -07:00
2026-07-26 14:34:43 -07:00
2026-07-26 14:34:43 -07:00

Docs development

The docs/ tree is the source for docs.comma.ai. The site is updated on pushes to master by this workflow.

1. Build the site

op docs --build

2. Run the site locally (rebuilds on change)

op docs