Reverse lights on DO0, Sport + Vehicle screens, per-DDE live data, ECU identification
Firmware / build (push) Successful in 10m49s

- ReverseLight: isolated output DO0 (CH422G OC0 -> PC817 -> NPN sink) drives the
  reverse-lamp relay while the lever is in R on a live bus with ignition on; 10 Hz
  decision confirmed over 200 ms, written through the panel library's expander
  object so the backlight cannot undo it; `reverse status|on|off|force` console,
  default ON (NVS `revlight_en`). Wiki page reverse-lights-output with the wiring.
- Sport screen: BMW-style power + torque gauges (lv_meter on a dial-face image,
  image needle); PNG sources in assets/, tools/png2lvgl.py converter.
- Vehicle: final drive ratio + tyre circumference -> road speed, hp from torque;
  Settings > Vehicle page; `vehicle` console.
- Bench simulation (`sim` console) overlays torque / rpm / shaft on the snapshot.
- EcuIdent: KWP 1A 86 / 1A 80 read once, stored in NVS, shown on Settings >
  Vehicle, passive ECU CHANGED? check; `ecu` console.
- Ignition fallback from the 0x1D2 lever byte on buses without 0x3B4 (Patrol 2).
- Engine data: per-DDE `2C 10` identifier profiles (Patrol 1 vs Patrol 2
  rail 00C2 / boost 003A / battery 002F); DiagProbe liveConfigure().
- Wiki: Patrol 2 captures, vehicles page, obd identifier table per DDE, logs.
This commit is contained in:
2026-10-28 16:46:42 +01:00
parent 8ded9c2a08
commit 1cba9f30bc
60 changed files with 70386 additions and 100 deletions
+18 -10
View File
@@ -1,7 +1,7 @@
---
type: concept
tags: [can-bus, dde, egs, diagnostics, kwp2000, uds, obd, design-decision, rail-pressure]
updated: 2026-10-07
updated: 2026-10-18
---
# OBD / Diagnostic Polling
@@ -123,20 +123,28 @@ Run via `tools/diag_session.py` (one serial session, logs straight into `wiki/ra
5. `diag status` once at the end (counters, tester guard), then stop the monitor.
6. Copy the log into `raw/`, write a `sources/` page with the supported-PID list and the VIN, update this page (Route A verified / refuted) and [[open-questions]] #2 and #7.
## Known live-data identifiers (`2C 10 <id>` → `6C 10 HH LL`)
## Known live-data identifiers (`2C 10 <id>` → `6C 10 HH LL`) — PER DDE
| Value | ID | Scaling | Status |
|---|---|---|---|
| Rail pressure, actual | `00DF` | bar = raw × 0.03 | `(verified 2026-09-23)`, two points |
| Charge-air pressure, actual (boost, absolute) | `0091` | mbar = raw ÷ 8 | `(unverified)` one point, engine off |
| Charge-air temperature | `16A8` | °C = raw × 0.01 − 15 | `(unverified)` one point, engine off |
| Battery voltage | `0093` | V = raw × 0.002455 | `(unverified)` one point, engine off |
> [!warning] The identifiers belong to one DDE software, not to the M57N `(verified 2026-10-18)`
> With the board on Patrol 2 (DDE 7794904) and Patrol 1's set in the firmware, the Engine data screen showed **no rail pressure, a flat "2800 mbar" boost and a charge-air temperature above 300 °C** (user). The Launch, which re-reads `1A 80` on every cycle precisely to pick its data set, polled **`00C2`** for rail pressure on that car instead of `00DF`. So `2C 10 <id>` is an address inside each unit's software (the "define" `15 E0` was not seen on Patrol 2 either). The firmware now keeps **one identifier set per DDE part number** (`(repo)` `engine_screen.cpp` `PROFILES[]`, keyed by `EcuIdent`) and asks nothing for a slot it has no identifier for. Every value on a new DDE must be captured with the Launch again (recipe below).
Evidence: [[launch-capture-2026-09-23]], [[launch-captures-2026-10-07]]. Each provisional scaling needs one more capture at a different operating point.
| Value | DDE 7796678 / 7799764 (Patrol 1) | DDE 7794904 / 7796156 (Patrol 2) | Scaling | Status |
|---|---|---|---|---|
| One-time define sent by the Launch | `15E0` | none seen | — | — |
| Rail pressure, actual | `00DF` | `00C2` | bar = raw × 0.03 | Patrol 1 `(verified 2026-09-23)`, two points; Patrol 2 `(unverified)` — raw 11 016–11 304 at idle = 330–339 bar at the same scale, the Launch showed "rail pressure" while polling it (label/value not noted) |
| Charge-air pressure, actual (boost, absolute) | `0091` | **`003A`** | mbar = raw ÷ 8 | Patrol 1 `(unverified)` one point, engine off; Patrol 2 `(unverified scale)` — 1 018 mbar idle → 1 186 on a rev blip, physically right, Launch value not noted ([[launch-captures-2026-10-18-patrol-2]]) |
| Charge-air temperature | `16A8` | not captured | °C = raw × 0.01 − 15 | `(unverified)` one point, engine off |
| Battery voltage | `0093` | **`002F`** | V = raw × 0.002455 | Patrol 1 `(unverified)` one point; Patrol 2 `(unverified scale)` — 14.0 V running, 12.7 V after the engine stop, Launch value not noted ([[launch-captures-2026-10-18-patrol-2]]) |
Evidence: [[launch-capture-2026-09-23]], [[launch-captures-2026-10-07]], [[can-capture-2026-10-18-patrol-2]], [[launch-captures-2026-10-18-patrol-2]]. Each provisional scaling needs one more capture at a different operating point; the remaining empty Patrol 2 cell (charge-air temperature) needs one Launch session. Note how every identifier moved between the two DDEs while the scalings stayed the same — expect the same on setup 3.
## ECU identification (`1A 80` / `1A 86`) `(verified 2026-09-23 / 2026-10-18)`
The Launch re-reads `1A 80` on every cycle and both Patrols' DDEs answer it in their default state (31 / 37-byte replies); our own probe's `1A 80` was silent on Patrol 1 on 2026-09-23 while `1A 86` answered with 65 bytes. Observed layouts (field names `(unverified)`): `1A 80` → BCD part number at payload bytes 4–7, BCD date YY MM DD at 15–17; `1A 86` → ASCII `"@B892524 "`, date at 11–13, three 6-byte BCD part-number fields from byte 16, VIN prefix at 53–62. The firmware stores both blocks once per setup ([[vehicles]], `(repo)` `EcuIdent`) and compares the Launch's `1A 80` passively.
## Engine data screen `(repo, 2026-10-07)`
**Decision (user, 2026-10-07):** the four values above get their own screen on Controller A, opened by an **"Engine data" button on the Driveline screen**, **no password**. This replaces the 2026-09-23 plan of a password-protected Diagnostics screen for these reads. Guard rails kept: polling runs **only while the screen is shown** (stops ~1.5 s after it is left), one request in flight, ~100 ms apart (each value ~2.5 Hz), **pauses while another tester is on the bus** (3 s guard), only these fixed frames - `2C` stays forbidden from the `diag` console. Sends the Launch's `2C 10 15 E0` once per start, then the four reads in turn. Provisional scalings are tagged on screen and every value shows its raw number for calibration against the Launch. A password can still come with a future Diagnostics screen for anything beyond these reads.
**Decision (user, 2026-10-07):** the four values above get their own screen on Controller A, opened by an **"Engine data" button on the Driveline screen**, **no password**. This replaces the 2026-09-23 plan of a password-protected Diagnostics screen for these reads. Guard rails kept: polling runs **only while the screen is shown** (stops ~1.5 s after it is left), one request in flight, ~100 ms apart (each value ~2.5 Hz), **pauses while another tester is on the bus** (3 s guard), only these fixed frames - `2C` stays forbidden from the `diag` console. Sends the profile's define once per start (Patrol 1: `2C 10 15 E0`), then its reads in turn. **Since 2026-10-18 the identifier set is chosen per identified DDE** (table above): an unidentified ECU or one without a profile polls nothing and the status line says so; a slot without an identifier reads "identifier not known for this ECU yet". Provisional scalings are tagged on screen and every value shows its raw number and identifier for calibration against the Launch. A password can still come with a future Diagnostics screen for anything beyond these reads.
## Beyond the probe `(repo)`