feat(sim): drive the brake vote from the DI's hardwired switch (DI_VC_SHARED) #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/sim-di-wired-brake-switch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Models the stock DI_VC_SHARED brake-switch topology so the DI's own hardwired brake switch drives
DI_brakePedalStateon the bench — the mechanism an add-on inverter controller uses over CAN (it doesn't change the DIR's vote logic; it bridges CAN signals).Firmware basis (12803, gen-28 2022.45.15)
The DIR broadcasts its own wired brake switch (GPADAT bit1, active-low) on 0x1D6 bit 33 (TX-table builder
FUN_000a70f4), and votesDI_brakePedalStateon VCLEFT 0x3C2 + iBooster 0x39D + ESP 0x38D.GTW_brakeLineSwitchType(0=DI_VC_SHARED, 1=VC_ONLY) is a VC-side wiring-topology flag — the DIR itself never reads it.Sim changes
VCLEFT_brakeSwitchPressed(0x3C2) whenGTW_brakeLineSwitchType == DI_VC_SHARED(read live fromGTW_carConfig0x7FF mux3); in VC_ONLY it sources its own switch and ignores the DI report.tesla_frames:DI_BRAKE_SWITCH_ID/DI_BRAKE_SWITCH_BIT+di_brake_switch_pressed().Tests: DI 0x1D6 broadcast, VCLEFT relay (shared) vs ignore (vc_only), carconfig mux3 read, ESP/IBST mirror, facade→DI. Full suite green (3163), ruff clean on changed files.
🤖 Generated with Claude Code