App 2.31.1: log the cruise control while driving, with every assist value

The 2.27.3 log wrote a line only when the target speed changed, so the
car showed one line at the start. Now a line is written on any change of
a mode or the target and every 2 s while driving, with the raw
driver-assistance properties (target speed, assist and speed-assist
modes, the followed object) and the reason for any unread value. The
last 600 lines are kept in an appended file; the Logs tab shows 150.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-25 09:33:17 +01:00
co-authored by Claude Opus 5.5
parent 4cd5f7a7ba
commit 36cc417638
10 changed files with 246 additions and 56 deletions
+14
View File
@@ -131,6 +131,20 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does *
confirmed car facts, app structure, UI conventions, build/test/ship, documents. It replaces
upstream's EVABRPUploader text. The test emulator is now in the flake: `nix run .#car-emulator`
(Android 9 AOSP at 1920×720, 160 dpi; the car build installs as the system user — checked).
- 2026-10-25 — App 2.31.1 (branch `styles-retro-future`): the cruise control log now logs while
driving. 2.27.3 wrote a line only when the target speed changed, so on the car it showed one
line at the start. Now `CruiseLog` writes a line at once when a mode or the target changes and
every 2 s while driving (D or R, or moving), with every driver-assistance property that may
describe the ACC, raw (`EVHardware.readAccDebug`, read once a second on the reader thread):
the target speed (`cc`, `0x2160A15B`), the traffic-jam / intelligent cruise assist operation
mode (`ica`, `AAD_LANE_TJAICAOPMD` `0x2140A12A`), the traffic-jam assist (`tja`, `0x2140A107`),
the speed assist system and mode (`sas`/`sam`, `0x2140A101`/`0x2140A102`) and the object the
ACC follows (`obj`/`dist`/`rel`, `AAD_ACC_OBJ_*` `0x2160A12F`/`0x2160A12C`/`0x2160A12E`; these
alone never write a line). An unread value carries the reason the car gave
(`ReadFailureLog.reason`). The last 600 lines live in `files/cruise_log.txt`, appended to; the
Logs tab shows the newest 150. The old change-only log in preferences is dropped. Only while the
app is open (the reader runs with the screen). Emulator: every value unread, the file written
and kept over a restart. Not tried on the car.
- 2026-10-25 — App 2.31.0 (branch `styles-retro-future`): the Overview's full screen moved into
the navigation: its button now sits beside the MG4 logo (at the end of the bottom bar on narrow
screens) instead of over the page's top-right corner, and only shows on the Overview. A swipe