From 8c9ee2cde28f67d1b81a881592e411c54a2742ef Mon Sep 17 00:00:00 2001 From: Julian Cuni Date: Fri, 17 Jul 2026 18:39:35 +0200 Subject: [PATCH] Note 0x3B4 ignition nibble is on-change (instant), not 5 s lag User-verified: 0x3B4's ignition nibble flips the instant the key toggles, even though the message is nominally 5 s periodic - it transmits on-change too. So the ignition-off screen reset is effectively immediate, correcting the earlier assumption that it could lag by a few seconds. Comment/doc only, no logic change. Co-Authored-By: Claude Opus 4.8 --- include/protocol/automotive_data.h | 3 +++ src/modules/driveline_screen.cpp | 3 ++- wiki/sources/e65-reverse-engineering-repo.md | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/protocol/automotive_data.h b/include/protocol/automotive_data.h index 73d40f9..2f9bcea 100644 --- a/include/protocol/automotive_data.h +++ b/include/protocol/automotive_data.h @@ -236,6 +236,9 @@ static inline uint16_t can_output_shaft_rpm(uint16_t raw) { // calls it an engine-running flag with 0x09=running — BOTH ARE WRONG FOR US. // Verified on this bus 2026-07-17: it tracks IGNITION, inverted, and does not // move when the engine starts. Use 0x1D0 ST_ENGINE_RUN for engine state. +// Although 0x3B4 is nominally a 5 s periodic message, it ALSO transmits +// on-change: the ignition nibble flips instantly when the key toggles (user- +// verified), so an ignition-driven reset is effectively immediate. #define CAN_BYTE_IGNITION 2 #define IGNITION_ON 0x00 #define IGNITION_OFF 0x09 diff --git a/src/modules/driveline_screen.cpp b/src/modules/driveline_screen.cpp index 0cf5c6c..0c95546 100644 --- a/src/modules/driveline_screen.cpp +++ b/src/modules/driveline_screen.cpp @@ -320,7 +320,8 @@ void tick() { // Blank every readout when there's nothing live to show: CAN off, or the key // is off. The user asked for a full reset on ignition-off so the screen goes - // quiet with the car rather than freezing the last frame. + // quiet with the car rather than freezing the last frame. 0x3B4 sends its + // ignition nibble on-change, so this reset is effectively instant. if (!can_up || !dl.ignition_on) { lv_label_set_text(g_gear_lbl, "--"); lv_label_set_text(g_coolant_lbl, "--"); diff --git a/wiki/sources/e65-reverse-engineering-repo.md b/wiki/sources/e65-reverse-engineering-repo.md index ac4a3c1..476b4c1 100644 --- a/wiki/sources/e65-reverse-engineering-repo.md +++ b/wiki/sources/e65-reverse-engineering-repo.md @@ -44,6 +44,9 @@ Worked example: `D9 03 00 53 FE 18 32 08` → `0x3D9` = 985 × 0.015 = **14.775 ### ✅ Engine-run state — open question closed +> [!note] Ignition state, found on `0x3B4` byte 2 (2026-07-17) +> Separately from engine-run: `0x3B4` byte 2 low nibble tracks **ignition** — `0x00`=on, `0x09`=off (inverted, and unmoved by the engine starting). Both this repo (`ST_ENGINE_RUN`) and the E60 VFL sheet (engine flag, `0x09`=running) mislabel it — wrong signal *and* wrong polarity for our bus. It restores ignition sensing that was thought lost with CAS/`0x130` absent from the swap. Despite `0x3B4`'s nominal 5 s cycle, it transmits this nibble **on-change** — the flip is instant when the key toggles (user-verified). Drives the driveline screen's ignition-off reset. → [[driveline-speed-signals]] + `0x1D0` carries `ST_ENGINE_RUN` at **bits 20–21** (byte 2): `0x0`=off, `0x1`=starting, `0x2`=**running**, `0x3`=invalid. Checked across our capture: **`ST_ENGINE_RUN` = 2 in 397 of 397 frames** (verified, 2026-07-17). The engine was definitively running during the 2026-07-15 session, so its coolant trace is genuine warm-up data. This retires the "engine state unconfirmed" caveat that was blocking [[open-questions]] #1.