Commit Graph
4 Commits
Author SHA1 Message Date
Quintine 2b743a3a59 Remove accidentally committed .serena tool metadata 2026-07-25 17:38:06 +10:00
Quintine bd58431b9b byd: fix canError ("Unknown Vehicle Variant") from strict parser alive checks
Explicit parser frequencies made canValid=False when state-dependent
messages are absent (PCM_BUTTONS is event-driven; MPC_LKAS_CMD/ACC_CMD
only flow when stock ADAS is active), tripping EventName.canError.

- Alive-check only control-critical messages, at a conservative 10Hz
  (1s timeout): ESC, BRAKE_APPLIED, PEDAL, STEER_MODULE, STEERING_TORQUE,
  DRIVE_STATE, ACC_HUD_ADAS
- Parse-but-don't-alive-check (nan) the rest: STALKS, METER_CLUSTER,
  MPC_LKAS_CMD, ACC_CMD
- PCM_BUTTONS is parsed on both pt and cam parsers (bus assignment is
  harness dependent); MADS reads LKAS_ON_BTN from whichever bus sees it

Verified: canValid=True with idle stock ADAS, LKAS button events work
from either bus, canValid stays True throughout.
2026-07-25 17:37:52 +10:00
Quintine 1a4f296aa8 tools: add deploy_to_device.sh — git-archive-over-ssh deploy that preserves symlinks
Copying the tree to a device with scp/file managers mangles symlinks
(car_list.json et al become text files containing the target path),
crashing the UI with JSONDecodeError. This script deploys via
'git archive HEAD | ssh tar -x', which preserves symlinks, verifies
them on-device, and keeps the previous install for rollback.
2026-07-25 16:53:38 +10:00
Quintine c8903e592c byd: add BYD car port (HAN EV 23 / Seal Performance 2025) with MADS support
Car port adapted from HotIce0/openpilot develop_byd_comma4 to sunnypilot's
opendbc API (CP_SP signatures, (ret, ret_sp) carstate returns):

- opendbc/car/byd/: interface, carstate, carcontroller, bydcan, values,
  fingerprints (BYD_SEAL_PERFORMANCE_25 with full 91-msg fingerprint)
- opendbc/dbc/byd_common.dbc
- Brand registration: car/values.py, car/fingerprints.py (+MIGRATION),
  car.capnp SafetyModel byd @35, torque_data/params.toml
- safety/modes/byd.h: SAFETY_BYD 35U with real TX checks (steer torque
  cmd checks, longitudinal accel checks), MADS LKAS button from
  PCM_BUTTONS (944), pcm_cruise_check, ESC vehicle_moving. MISRA clean.
- safety/tests/test_byd.py: 120 tests (stock + longitudinal variants)
- opendbc/sunnypilot/car/byd/mads.py: MadsCarState tracking the
  dedicated LKAS steering wheel button
- sunnypilot/mads/mads.py: allow_always for byd (dedicated LKAS button)
- panda: restore SConstruct/SConscript build system, rebuild
  panda_h7.bin.signed (TIZI) with SAFETY_BYD + MADS lateral gating

Known limitation: BYD_HAN_EV_23 fingerprint is a subset of the Seal's,
so HAN requires FINGERPRINT=BYD_HAN_EV_23 env var (live fingerprint
cannot distinguish it; Seal fingerprints natively).
2026-07-25 15:09:00 +10:00