Driveline screen: boot into it, add engine torque, revise shaft scaling
Boot screen: land on the Driveline data screen instead of the SquareLine gauges Home screen. Done in display_init after ui_init while the backlight is still off (no flash of the wrong screen); Home stays reachable by swiping off Driveline. Engine torque added to the screen, decoded from 0x0A8 TORQ_AVL (available/ delivered torque), bits 12-23, signed x0.5 Nm. The user identified the ID and supplied the spreadsheet formula (D2*256+D1)/32, which is algebraically bits12-23 x0.5; confirmed against the repo's 0x0A8 worked example (24 Nm). Firmware masks D1's low nibble (that's the alive counter, not torque - the repo example shows ALIV=8 there) and sign-extends so overrun reads negative. 0x0AA TORQ_DVCH is the same layout but driver demand - identical at idle, diverges under load - so the delivered value is the right one to show. Output-shaft scaling revised: a direct Launch reference (output speed 128 rpm at our raw 1192) implies ~0.107, contradicting the earlier x0.125 (which would predict 149). One eyeballed cross-tool point, so nothing is adopted - the field stays raw counts - but 0.125 is downgraded in firmware and wiki, and the Launch now gives a direct rpm reference so calibration is just a multi-point sweep and a linear fit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,10 @@ User confirmed: donor chassis is **E60/E65 (2003+)**, transmission is a **BMW au
|
||||
|
||||
User captured steady byte values per lever detent (`raw/gear_box_can_revealings.csv`) → [[gear-box-can-revealings]]. **0x1D2 verified as the gear source**: byte0 = P `0xE1` / R `0xD2` / N `0xB4` / D `0x78` (all match documented codes exactly); byte0 can't split D from S/M (shared `0x78`) so byte4 does it (`0xF0` auto / `0xF1` Sport-Manual / `0xF2` downshift −); byte1 is a drive-gate flag (`0x0F`→`0x5F`); byte3 = rolling counter (confirms prediction). 0x0BA also tracks the lever but is messier (D/S-M collide) — don't use. Promoted 0x1D2 gear row to VERIFIED and rewrote the encoding-dispute section in [[can-id-candidates]]; updated index. Still open: actual engaged gear number (needs a drive capture) and the manual up-shift (+) value. Next: rewrite firmware gear map to 0x1D2 byte0 (+byte4).
|
||||
|
||||
## [2026-07-17] update | Driveline screen live; torque decoded; output-shaft scaling revised
|
||||
|
||||
Firmware flashed and running on the car. Built a hand-coded Driveline screen (src/, boot screen, swipe to reach Home) showing gear + coolant + gearbox temp + RPM + torque + turbine + output-shaft + status chips. Three findings from the user testing it: (1) **Torque decoded & verified** — on **0x0A8 TORQ_AVL** (available engine torque; user-identified the ID). User's Excel `(D2*256+D1)/32` is algebraically bits12-23 ×0.5; confirmed against the repo's 0x0A8 worked example (24 Nm, ALIV=8 in D1 low nibble), ~27-28 Nm at idle. Firmware masks D1's low nibble (alive counter, not torque) and sign-extends. Note 0x0AA TORQ_DVCH is the same layout but driver *demand* — identical at idle, diverges under load. → [[can-id-candidates]], [[driveline-speed-signals]]. (2) **Output-shaft scaling revised**: a direct Launch reference (output speed 128 rpm at our raw 1192) **contradicts the earlier ×0.125** (would predict 149) and points to ~0.107. One eyeballed cross-tool point, so not adopted — but 0.125 is downgraded, and the Launch now gives a direct rpm reference so calibration is just a multi-point sweep + linear fit. Firmware keeps raw counts. (3) Fixed a latent display bug: main.cpp showed DEFAULT_* placeholder temps/voltage as if measured; now gated on valid_flags. Ignition decoded from 0x3B4 byte2 (user: 0x00=on/0x09=off, tracks ignition not engine — both published sources wrong here).
|
||||
|
||||
## [2026-07-17] ingest | First drive capture — 0x0BA gear ladder verified, output-shaft scaling narrowed
|
||||
|
||||
`raw/log_20260717_145930.txt` (CANNY 5.3 Pico, 1,857 frames / ~34 s, filtered to 0x0BA + 0x1D2) → [[can-capture-2026-07-17-drive]]. **First capture with the vehicle actually moving.** Closes the inference left open yesterday: **`ST_GR_GRB` values 6/7/8/9/A observed directly** (238/77/93/127/94 frames) = 2nd–6th, so **`0x0BA` D0's low nibble is a complete gear source on its own** — P/R/N + 1st–6th, reverse included; `0x1D2` is now needed only for lever + mode. Also caught `ST_CCLT` (converter lockup) live — 422 frames "controlling" in the higher gears, which matters because a locked clutch makes turbine = engine exactly, so the engagement-ratio test needs to read it before trusting a ratio ≈ 1.0 at road speed. **Output shaft identification VERIFIED** (rises monotonically 1139→16702 across gears 1→6, zero whenever the output is held). **Scaling narrowed to ×0.125** `(unverified)`: implies a coherent 901→1872 rpm upshift schedule across five independent ratios, vs 7,200–15,000 rpm for raw-as-rpm against a ~4,500 redline. User confirmed the box is a **ZF 6HP26X** — same gearset as 6HP26 so the ratio table holds, and the xDrive output variant **dates the donor to E60/E61, not E65** (partly answers open Q#2). New question #11: was the transfer case retained? The X box measures output **upstream** of it, so a Patrol transfer case in the path would make road speed high/low-range dependent. Remaining assumption on the scaling: max-output-per-gear = upshift point — **one capture including `0x1A2` closes it** (turbine ÷ output = ratio directly). Updated [[driveline-speed-signals]], [[gear-box-can-revealings]], [[can-id-candidates]], [[nissan-patrol-swap]], [[open-questions]], index.
|
||||
|
||||
Reference in New Issue
Block a user