Decode the real CAN map: gear, temps, battery, driveline speeds

Ingest HeinrichG-V12/E65_ReverseEngineering (per-ID DBC-style docs with
worked examples) and re-analyse our own 2026-07-15 capture against it.
Resolves both outstanding scaling disputes, closes the engine-state
question, and adds the driveline speeds.

Resolved:
- Gearbox oil temp = raw - 40 (not offset 0, not +40). Source's worked
  example plus our own cross-check: the box read 31 C while coolant was
  at 37 C and climbing; offset 0 would have the transmission warming
  faster than the engine.
- Battery = 12-bit LE * 0.015 (0x3B4 U_BT); the E90 24-bit BE reading is
  wrong for us. The high nibble of byte 1 is ST_BTSW, not voltage.
- Engine was running during the 2026-07-15 capture (ST_ENGINE_RUN = 2 in
  397/397 frames), so its coolant trace is genuine warm-up data and the
  planned cold-start capture is unnecessary.
- Engaged gear = 0x1D2 byte 1, gear = (D1>>4)-4. No drive capture needed.

New signals (0x1A2 turbine, 0x0BA output shaft, 0x0AA RPM/pedal). Turbine
speed physically proves engagement: it free-spins at ~engine speed in P/N
and collapses to ~0 when the box loads up. Output shaft is the only
road-speed source on this bus - there is no DSC module - so it is the
feedback variable any future cruise-control work would need. Scaling is
uncalibrated; it is carried as raw counts with no physical unit.

Corrects three of my own earlier claims:
- 0x1D2 D1 is the engaged gear, not a "drive-gate flag" (it only ever
  showed two values because the car was stationary in 1st).
- 0x1D2 D4 0xF2 is a persistent Manual mode, not a "downshift event" - it
  holds across gears 2-6.
- 0x0BA was dismissed on the strength of D7, which is an alive counter.
  The gear is in D0's low nibble, and it is the only source of engaged
  reverse: 0x1D2 D1 stays 0x0F in R.

Firmware: real IDs replace the placeholder map (all 11-bit standard now,
so the extended-ID assumption is gone), full gear decode incl. Sport vs
Manual, and a debounced lever-vs-gearbox mismatch fault - the "lever says
R but the box never took it" case. Engine oil temp reads 0xFF here (sensor
not populated), so its valid flag is left clear rather than publishing
-207 C. Driveline speeds are kept out of automotive_data_t deliberately:
that struct is the UART wire format and widening it would break
Controller B.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 12:33:31 +02:00
parent 0a58afca9a
commit bb87b3d6da
13 changed files with 428331 additions and 132 deletions
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
PID,LEN,D0,D1,D2,D3,D4,D5,Actual Gear
1D2,6,120,95,255,Fluctuation,240,255,Drive 1
1D2,6,120,111,255,Fluctuation,240,255,Drive 2
1D2,6,120,127,255,Fluctuation,240,255,Drive 3
1D2,6,120,143,255,Fluctuation,240,255,Drive 4
1D2,6,120,159,255,Fluctuation,240,255,Drive 5
1D2,6,120,175,255,Fluctuation,240,255,Drive 6
1D2,6,120,95,255,Fluctuation,241,255,M/S 1
1D2,6,120,111,255,Fluctuation,242,255,M/S 2
1D2,6,120,127,255,Fluctuation,242,255,M/S 3
1D2,6,120,143,255,Fluctuation,242,255,M/S 4
1D2,6,120,159,255,Fluctuation,242,255,M/S 5
1D2,6,120,175,255,Fluctuation,242,255,M/S 6
1 PID LEN D0 D1 D2 D3 D4 D5 Actual Gear
2 1D2 6 120 95 255 Fluctuation 240 255 Drive 1
3 1D2 6 120 111 255 Fluctuation 240 255 Drive 2
4 1D2 6 120 127 255 Fluctuation 240 255 Drive 3
5 1D2 6 120 143 255 Fluctuation 240 255 Drive 4
6 1D2 6 120 159 255 Fluctuation 240 255 Drive 5
7 1D2 6 120 175 255 Fluctuation 240 255 Drive 6
8 1D2 6 120 95 255 Fluctuation 241 255 M/S 1
9 1D2 6 120 111 255 Fluctuation 242 255 M/S 2
10 1D2 6 120 127 255 Fluctuation 242 255 M/S 3
11 1D2 6 120 143 255 Fluctuation 242 255 M/S 4
12 1D2 6 120 159 255 Fluctuation 242 255 M/S 5
13 1D2 6 120 175 255 Fluctuation 242 255 M/S 6
Binary file not shown.