mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-14 00:13:48 +08:00
a2645f7575
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
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