feat(sim): fix three ESP/VCFRONT signal bugs, and give ESP/IBST/VCFRONT/GTW real node state #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/sim-node-state"
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?
Bench work from trying to get a real rear drive unit into Drive. Three sim signal
bugs, and the node state to control what they exposed.
ESP / IBST / VCFRONT (cherry-picked from the public tree,
01d2f49)0x145set bit 23 and bit 48 instead of the four QF bits 24-27. Bit 23 isthe HIGH BIT of
ESP_absBrakeEvent2(@22 w2), so the sim continuously told theDI
ACTIVE_FRONT; bit 48 isESP_ebrStandstillSkid. Both were bench-observed.Two QF signals were reading
UNDEFINABLE_ACCURACYas a result.stabilityControlSts2now defaults to ON, bench-confirmed as required.12vStatusForDrivewas bundled into thehv_charge_enablebranch, so itonly read READY while HV charging was on -- but it is the drive-start LV gate the
DI checks, which is what produced "Not ok to start drive / DI a174". Now
independent, defaults READY.
0x3C2was sent aszeros(8). It isVCLEFT_switchStatusand the DIcross-checks its brake bits against its own GPIO, so the node sources the physical
switch line now.
GTW car config
GTW sent
GTW_carConfigwith two signals set and no way to reach the rest; the DIRreads fifteen. All fifteen are now scenario parameters with setters and
configure().Firmware variance shaped the design: nine of the fifteen moved between 2020,
2022 and 2026 (
tpmsTypem2@11|1 -> m7@49|2,cabinPTCHeaterTypem2@31|1 ->m1@10|1,
brakeHWTypem2@59|2 -> m1@43|4 -> m1@43|5), so encoding stays by namethrough the loaded database. Parameters take enum labels, because the same number
means different things per revision (
performancePackage4 is BASE_PLUS_AWD in 2020and BASE_2022 after). Signals a revision lacks -- 2020 has no
compressorType,diBurnInType,packPerformanceDeviationorcabinPTCHeaterType-- land inunsupportedand are skipped; setting one explicitly warns rather than killing thebench.
Defaults hold the same value on every revision (all zero but
chassisType), so theidle frame is byte-identical to before, verified across a full mux cycle on the 2022
and 2026 databases.
3153 passed, ruff clean.
🤖 Generated with Claude Code