DU bench drive + learn: sim BMS/ESP/DAS/RCM, dash HV panels, dir_learn DIF, vapi_probe #28

Merged
outlandnish merged 36 commits from feat/du-bench-drive-learn into main 2026-10-12 18:12:02 -05:00
Owner
  • sim: BMS pack limits as params (+0x2B2/0x3B2), ESP 0x105 drive-torque limit + 0x155 pulses, DAS ACC state, RCM accel, UI summon/regen; drive.toml bench defaults
  • tm3web: HV power panel, BMS limits, ESP torque limit, brake state from ESP/IBST/VCLEFT, UI_regenTorqueMax
  • dir_learn: --node DIF, background park, 5 min coast wait
  • candata_to_dbc: probe every message through the VAPI decoder (vapi_probe.py)

Public counterparts: GitHub #25 (sim/dash), #27 (vapi_probe).

🤖 Generated with Claude Code

- sim: BMS pack limits as params (+0x2B2/0x3B2), ESP 0x105 drive-torque limit + 0x155 pulses, DAS ACC state, RCM accel, UI summon/regen; drive.toml bench defaults - tm3web: HV power panel, BMS limits, ESP torque limit, brake state from ESP/IBST/VCLEFT, UI_regenTorqueMax - dir_learn: `--node DIF`, background park, 5 min coast wait - candata_to_dbc: probe every message through the VAPI decoder (`vapi_probe.py`) Public counterparts: GitHub #25 (sim/dash), #27 (vapi_probe). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Bench: resolver-error SUCCESS, then tm3web disconnected after P -> traceback.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Waiting out the coast inside the ws loop left it unread > tm3web's 30 s heartbeat,
so tm3web closed it after P.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
20 s was never enough for a free DU spinning down from ~630 axle rpm.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Zero wheel speeds under a spinning motor trip active damping (DIR_a014) and the VDC
(DI_a199/a200/a215/a232) once traction control is on.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The DIR reads 0x155 as 4x8-bit rolling wheel pulse counters and 4x2-bit directions
(1 = backward). Static zeros under moving 0x175 speeds -> DI_a135 WHEEL_SPDS_INVAL.
~120 pulses/rev inferred from the DIR's per-pulse distance scale.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0x105 was fixed at 0 bar while 0x38D followed the brake slider -> DI_a198; a slider
left up after release kept reporting pressure.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
All-zero accelerations under moving wheel speeds raise DI_a204/a205/a206 vdcRcm*.
Vertical +9.81 m/s^2 (ISO z-up, sign assumed); longitudinal = filtered d/dt of DIR_axleSpeed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
+9.81 tripped the DI's VERT_ACCEL plausibility check (a216 case 16).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Bench: +9.81 and -9.81 both trip DI_a216 VERT_ACCEL; 0 clears it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Backward = 1 is firmware-pinned; forward (0 or 2) isn't. D cuts out at ~1 km/h while R
drives, so make it testable.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The DIR reads it into its brake-state supervisor (ACTIVE = mismatch) and flags SNA as missing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restores a client-local setting a checkout discarded; release from the dashboard after boot.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Same ODIN scripts with the DIF task names, UDS node and DIF_torque/hvStatus frames. Offset/flux
refused: the front is an induction motor and its 0x406 is a stub.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- dir_learn: --node DIF, background parking, tm3web dropping the run, standstill wait;
  _park tests follow the no-P-while-spinning rule.
- sim: ESP 0x175/0x155/0x105, RCM 0x111, UI 0x3B3 summon state, drive.toml startup brake.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Build it from named fields instead of a captured log frame.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2022+ DIRs always send DI_brakePedalState INVALID. The BRAKE telltale now lights on a
source mismatch, and dir_learn waits for all three sources before shifting.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
vapi_probe flips one payload bit at a time; probed layouts outrank donors. --no-probe skips it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0x2B2 moves from UNKNOWN to BMS; 0x3B2 is a 2022 PCS bmsMIA member; 0x312 muxed on 2026.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The PMR builds both frames (0x1E5 = PM_locState). Sending them from the sim
collides with the DU's own transmitter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With the ESP present, traction control holds drive torque at 0 in D on a stand.
Rolls mode clears it (bench-confirmed).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0x105 words 0/1 are the ESP's fwd/rev drive-torque limits (13-bit, 2 Nm),
valid via bits 34/35. Sending 0 with the bits set capped TC torque at 0 in
D (the hum). Send 8190 Nm; drop the rolls-mode stopgap from drive.toml.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ESP torque_limit (Nm, 2 Nm steps, none = 8190) packs both 0x105 limits.
Scenario key, control-server command, POST /api/torque-limit, dash slider.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
max_bus_voltage / max_regen_power join min_bus_voltage / max_charge_current
as scenario keys and dash inputs (POST /api/bms-limit). Regen past the supply's
sink rate spikes the bus (DI_a021 pack OV, DIR_a021 HW bus OV).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
max_discharge_current / max_discharge_power (were fixed 500 A / 150 kW) join
the dash BMS limits. A DI drawing past the supply's current limit sags then
overshoots the bus (DIR_a021 HW bus OV on acceleration).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
10 A / 3 kW discharge, no regen current, 0.5 kW regen power, 370 V ceiling
for a lab supply of unknown rating.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
kW (+ discharge / - regen) from DIR_vBat x DIR_dcCableCurrentEst (0x126),
bar scaled to DI_sysDrivePowerMax / DI_sysRegenPowerMax (0x268), with bus V,
DC current and DIR_elecPower (0x266).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
feat(sim): UI_regenTorqueMax as a UI setting (dash + scenario)
Some checks failed
Tests / test (pull_request) Has been cancelled
12ef509758
drive.toml defaults it to 10 % so the DI's regen demand fits the
bench BMS regen limit (DI_a201 decelTorqueLimited).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
outlandnish/tm3diag!28
No description provided.