Commit Graph

149 Commits

Author SHA1 Message Date
Comma Device 7d262eb5fd registration: never skip into the OS until the backend authorizes the device
A fresh MR.ONE C3XL that was not yet authorized by the backend used to give
up after ~60s and boot into the OS with DongleId=UnregisteredDevice (the
60s hotfix return in the retry loop). From then on every boot skipped
registration entirely.

- remove the 60s give-up: keep retrying the registration screen until the
  backend returns a valid dongle id
- only treat HTTP 200 + a real dongle_id as authorized; 402/403, other
  statuses, bad JSON or a missing/unregistered dongle id all keep waiting
  on the registration screen (\ contact MR.ONE\)
- a device with no key pair is likewise not authorized and stays on the
  registration screen instead of booting in
2026-09-08 20:19:44 +08:00
Comma Device 4914609b2d bundle default CD210 pkl: usable on first boot without download
- replace the bundled openpilot/selfdrive/modeld/models/driving_tinygrad.pkl
  (compiled with an old tinygrad, unloadable by the current runtime) with the
  freshly compiled CD210 pkl (vision+policy split, run_policy format)
- modeld_v2: fall back to the bundled default pkl when no active bundle is
  selected, so a fresh install drives immediately even offline
- helpers: when no bundle is selected but the bundled default pkl exists, the
  active model runner is tinygrad (modeld_v2), not stock modeld (which requires
  a run_model-format pkl)
2026-09-07 20:42:32 +08:00
Comma Device d6bdf9e745 models: make default model reliable on first boot
- models_manager: always run so the first-boot/upgrade default model (CD210)
  download continues even when onroad (was only_offroad, stalling the download)
- modeld_v2: _pkl_exists now requires the pkl or every chunk file to exist; a
  bare chunkmanifest is written eagerly for all catalog models and must not be
  treated as downloaded (fixes loading half-downloaded models)
- models UI: only synthesize the Default row when the default model is not
  already listed in the catalog (avoids two CD210 entries)
2026-09-07 20:32:20 +08:00
Comma Device 20609763ea modeld_v2: realize frames on npy -> amd (#1993) 2026-09-06 15:52:21 +08:00
Comma Device 6b0fc48635 modeld_v2: one dev warp and enqueue (#1990)
Port from master-dev (047ae41c0). Drops legacy pkl branch; warp/run_policy
read from metadata/run_policy + per-res warp (TSFDOM pkl is compatible).
after_enqueue hook for chestnut state send; fetcher chestnut catalog v24.
CI-only parts skipped.
2026-09-05 15:06:42 +08:00
Comma Device f23b755e6a Revert ui streamer low-latency /ctrl changes (back to original MJPEG view)
Low-latency canvas/WS version felt choppier on this device; restore the
original <img> MJPEG /ctrl + defaults (fps10, quality50, full-res).
2026-09-04 21:20:14 +08:00
Comma Device f470e9e86e ui streamer: low-latency /ctrl (canvas + WS binary, latest-frame, half-res)
- /ctrl: replace <img> MJPEG with WebSocket binary frames + canvas
  (createImageBitmap), cutting browser buffering latency
- capture: only encode the newest frame (drop backlog)
- encode at STREAM_SCALE (default 0.5) + configurable fps/quality
- add /config endpoint for live tuning without restart
- launch_env defaults: STREAM_FPS=20, STREAM_QUALITY=45, STREAM_SCALE=0.5
2026-09-04 21:08:17 +08:00
Comma Device efb93b4ec3 models: fallback to hf-mirror.com when huggingface.co download fails 2026-09-04 19:55:08 +08:00
Comma Device 7d7508b968 models: auto-download default model (CD210) when no qcom bundle selected
Mirror upstream first-boot behavior: with nothing selected on qcom, queue
DEFAULT_MODEL_REF so the default model (CD210) is downloaded and activated
automatically, instead of falling back to the stock selfdrive modeld (which
needs a compile-format pkl that is not shipped here).
2026-09-04 19:44:24 +08:00
Comma Device 027d768017 models: default model back to CD210 (align upstream sunnypilot) 2026-09-04 19:42:07 +08:00
Comma Device f1db2eb5aa tinygrad: bump to e837e367a (required by modeld_v2 downloaded models)
Downloaded/tinygrad-runner models are compiled with tinygrad e837e367a
(the pinned tinygrad_ref in the model catalogs). The old 66ee3cfb4
runtime crashes rendering their uops (uop/render.py TypeError), so the
device must ship this tinygrad for the new modeld_v2 pipeline.
2026-09-04 18:58:11 +08:00
Comma Device 7b126e7708 models: default to TSFDOM (tinygrad runner)
Use TSFDOM (ref 0394d728...) as the default downloaded model so the
device runs modeld_v2 on the tinygrad runner instead of the stock
selfdrive modeld (which needs a local compile-format pkl).
2026-09-04 18:50:24 +08:00
Comma Device 943b1f0004 ui streamer: add remote touch control (/ctrl + /ws)
- /ctrl: fullscreen mirrored UI page with pointer/touch input
- /ws: minimal WebSocket endpoint -> inject MouseEvents into UI
  event queue (same path as real touch), 2 touch slots
- first-inject / error logging
2026-09-04 17:23:05 +08:00
Comma Device 303cfa8107 Add Comma4-UI-Streamer integration (MJPEG UI stream)
- add openpilot/system/ui/lib/ui_stream.py: MJPEG server on :8082
  with async JPEG encode (no render-thread stall) + telemetry writer
- application.py: STREAM=1 hooks - init attr, start server in
  init_window (create render texture if needed), capture frame
  before _monitor_fps
- launch_env.sh: STREAM=1 default (STREAM=0 disables), port 8082,
  quality 50, 10 fps
2026-09-04 16:50:25 +08:00
Comma Device 93582d1c81 Merge master-dev sync-20260902 into c3xl-dev
- upstream sync 47db84ebf..132b31f4c: new panda health packet, chestnut
  usb status, ui TextAlignment refactor, modeld/HF model name, hardwared
- agnos.json: update system partition only, keep custom boot
- submodules: opendbc_repo f95f996f (mads cppcheck), panda 74a0adce
  (health flags packet), uv.lock raylib post101
- resolve ui/layouts/home.py conflict (keep MR.ONE home content)
2026-09-04 14:55:37 +08:00
Comma Device 281f35dd30 update c3_client.py (C3 client remote control) 2026-09-03 20:00:16 +08:00
Comma Device 93048c2e90 [bot] Update Python packages (#1950) 2026-09-02 20:17:38 +08:00
Comma Device 97fd86d039 models: add big model ONNX hash tracking (#1982) 2026-09-02 20:17:38 +08:00
Comma Device 6dbf37a575 fix: remove duplicate torque config for TOYOTA_SIENNA_PATCHED (keep explicit params) 2026-09-02 19:15:39 +08:00
Comma Device eefccd83b0 Toyota: Sienna 2021-26 PATCHED support (EPS-bypassed SecOC), replacing Sienna 2026 PRC 2026-09-02 19:08:17 +08:00
Comma Device 46caa2270d gwm: fix CarController actuators handling (sunnypilot builder API)
commaai's carcontroller called actuators.as_builder(), but in sunnypilot
opendbc the actuators passed to CarController.update is already a mutable
builder, so this crashed onroad. Use it directly. Verified by replaying
6138 frames of real Haval H6 CAN: 0 errors, control commands generated.
2026-09-01 21:35:27 +08:00
Comma Device 28ce7621e9 gwm: fix sunnypilot API integration so Haval H6 is usable
The commaai PR was written against a non-sunnypilot CarStateBase/CarInterface.
Adapt it to c3xl-dev:
- CarState.get_can_parsers(CP, CP_SP)
- carstate.update returns (CarState, CarStateSP) and reads ret.deprecated.brake
- CarController.update(CC, CC_SP, CS, now_nanos)
- CarInterface.update unpacks (ret, ret_sp)

Without these the car interface crashed at runtime and the selected vehicle
showed as unavailable.
2026-09-01 20:58:08 +08:00
Comma Device e85f40d18b gwm: port Haval H6 support from opendbc PR #3263
Adds the GWM brand (Haval H6 2019-26, full ACC/steering support):
- opendbc/car/gwm: brand interface, carstate, carcontroller, gwmcan, values
  (adapted to sunnypilot CP_SP API and deprecated field group)
- car.capnp: SafetyModel.gwm @36
- values.py: GWM in the Platform union
- docs_definitions.py: CarHarness.gwm
- safety: gwm.h, SAFETY_GWM 36, registration (behind ALLOW_DEBUG)
- dbc generator for gwm_haval_h6_mk3, torque params for GWM_HAVAL_H6
- car_list.json: Haval H6 now appears in the vehicle selector
- rebuilt panda firmware with the GWM safety mode (DEV-dc833705)
2026-09-01 20:49:45 +08:00
Comma Device dc8337054a mg: port MG 5 EV support from upstream opendbc
Adds the MG brand (MG 5 EV 2021, dashcam-only) to c3xl-dev's opendbc:
- opendbc/car/mg: brand interface, carstate, carcontroller, mgcan, values
- car.capnp: SafetyModel.mg @35
- values.py: MG in the Platform union
- safety: mg.h, SAFETY_MG 35, registration (behind ALLOW_DEBUG)
- dbc/mg.dbc, torque override for MG_5_EV
- car_list.json: include dashcam-only platforms so MG appears in the
  vehicle selector
- rebuilt panda firmware with the MG safety mode (DEV-a53d9321)
2026-09-01 20:37:13 +08:00
Comma Device a53d9321e1 Regenerate cereal C++ bindings for bigModelReady event (#1947)
Rebuild the capnp C++ bindings after the custom.capnp schema gained the
bigModelReady event.
2026-09-01 19:15:22 +08:00
royjr 89417e6319 chestnut: alert when big model ready (#1947)
egpu: alert when big model ready

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-09-01 19:14:55 +08:00
mawei b9f35442e7 ui: hide Neural Network Lateral Control (NNLC) in steering settings 2026-08-30 21:07:38 +08:00
Comma Device 015f9f7c69 pandad: protect app firmware from recover, keep blank-board flashing
The SPI panda boot loop called recover_internal_panda() whenever the panda
did not appear within 20s after a reset. recover() erases both the bootstub
and app sectors (dfu.py program_bootstub erases sectors 0+1) before
reflashing, so a working panda that booted slowly lost its app firmware.

Fix:
- pandad.py: wait up to 60s for the panda, retry the normal reset 3x, and
  only enter the ROM bootloader (recover) when the panda is confirmed in DFU
  or all normal resets failed - preserving provisioning of blank boards.
- hardware.py: align recover_internal_panda() timing with the working manual
  flash scripts (0.2s reset hold, 1s settle, keep BOOT0 high).
- spi.py: raise the SPI bootloader ack timeout from 0.01s to 0.1s so the DFU
  flash reliably succeeds instead of erasing then failing.
2026-08-30 14:15:55 +08:00
github-actions[bot] 7ac98070a5 modeld_v2: big to small model fallback (PR-1974) 2026-08-30 13:39:21 +08:00
Comma Device f398c6bf5c dashcam: add qlog/rlog download to the 5088 drive viewer
Each drive item now shows download buttons for its qlog.zst and rlog.zst
(next to the existing HEVC/TS downloads). The /download endpoint accepts
file=qlog|rlog and names the file by drive time.
2026-08-29 18:40:43 +08:00
Comma Device 0301e4901c Rebuild libparams_c.so for chestnut rename (#1973 sync)
The upstream sync renames usbgpu params to chestnut (ChestnutActive,
ModelManager_ActiveBundleChestnut, etc.), so rebuild the params C library
for the new keys.
2026-08-29 08:39:26 +08:00
Jason Wen 70214c30d6 Sync: commaai/openpilot:master → sunnypilot/sunnypilot:master (#1973) 2026-08-29 08:37:19 +08:00
Comma Device dbbef3dd7f docs: update CHANGELOG to English only (2026-08-28)
Rewrite the top MR.ONE release section in English only (Chinese removed due
to garbled display) and add the recent changes: GM ignition-over-CAN panda
fix, Avoid EPS Lockout, merged master-dev model/UI updates, and OSM map
deletion.
2026-08-28 20:45:32 +08:00
Comma Device c75325e84d Rebuild libparams_c.so and cereal C++ bindings for merged commits
- Rebuild libparams_c.so so the new Mapd_ClearCache param (#1971) is usable
  on-device without a rebuild.
- Regenerate cereal C++ bindings for the custom.capnp verifying enum added
  by #1953, keeping generated bindings in sync with the schema.
2026-08-28 20:20:13 +08:00
Nayan 81cdfcdc38 osm: support map deletion via sunnylink (#1971)
delete delete
2026-08-28 20:18:08 +08:00
Comma Device 5e0748d5f7 ui: add zh-CHS translations for model selector (#1953)
Adds Chinese translations for the new dual-slot model menu strings:
Small Model / Big Model / Model Status, download/verify status labels,
and the big-model failover notes.
2026-08-27 21:33:09 +08:00
Nayan d9ddf6e3a2 models: Model Selector upgrades (#1953)
* uh, i did not commit anything all this time

* slideee to the left, cha cha

* lint lint

* ui: unify model source predicate and per-source bundle lookup in model_info

* [TIZI/TICI] ui: disable the other-model row onroad like the active row

* [TIZI/TICI] ui: drop docstring that restates the function name

* [TIZI/TICI] ui: keep Favorites as the first model folder in the picker

* ui: record why model names read the params slots and not modelManagerSP

* ui: show the default model's name on the picker Default entries

* models: bind a download to its ref so cancel and reselect work everywhere

* models: resume partial chunked downloads and verify silently

* models: publish a verifying status so cached checks read as verification, not a stuck download

* [TIZI/TICI] ui: move download status onto each model's own row

* [TIZI/TICI] ui: show the row status description while it has text

* [TIZI/TICI] ui: restore the Model Status bar row

* models: a cancel interrupts verification immediately and keeps on-disk chunks

* models: a selection made mid-download queues instead of cancelling the transfer

* [TIZI/TICI] ui: Model Status shows both slots idle and the queued pick while busy

* [TIZI/TICI] ui: label the Model Status slots small and big and scroll long names

* models: start a queued download in the same tick and label empty slots (Default)

* ui: scroll Model Status names at the corrected speed

* [TIZI/TICI] ui: Model Status shows the big model failing over to small

* [TIZI/TICI] ui: stable model rows and a runner-matched failover note on Model Status

* [TIZI/TICI] ui: model rows show full names and the failover note reopens with the page

* ui: name the actually driving model runner-matched and bring mici to state parity

* fix ugly

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2026-08-27 16:29:13 +08:00
Comma Device ae73b54d96 Rebuild libparams_c.so for #1966 dual-slot model params
#1966 changes ModelManager params: drops DownloadIndex and the PrevBundle
keys, adds DownloadRef and ActiveBundleUSBGPU, and switches ActiveJson to
JSON type. Rebuild the params C library so the new keys work on-device
without a rebuild.
2026-08-26 17:24:46 +08:00
Nayan e158ef7e22 models: dual-slot backend (qcom/usbgpu) with ref-based downloads (#1966)
* models: dual-slot backend (qcom/usbgpu) with ref-based downloads

* models: restore get_active_source and the usbgpu-to-qcom fallback

* models: fix per-slot validation and cap mismatched-source refetches

* ui/models: select models by ref and seed the usbgpu slot on migration

* models: drop defensive attribute guards on capnp bundles

* models: remove vestigial fetcher state and dead fallbacks

* models: resolve the active bundle from the active source slot only

* models: pass the usbgpu kwarg through the modeld test stubs

* models: resolve the displayed model from the active slot in ui_state

* models: correct the validation memo type hint

* models: drop docstrings that restate the function name

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-08-26 17:23:34 +08:00
Jason Wen 74f9dd400a ui: use full big model failure detection for sidebar and home eGPU icons (#1969) 2026-08-26 11:39:17 +08:00
Jason Wen 9d85823109 [TIZI/TICI] sidebar: show eGPU icon when chestnut is present (#1968)
* [tizi/tici] sidebar: show eGPU icon when chestnut is present

* matchy match

* fix
2026-08-26 11:39:13 +08:00
Jason Wen b9c0c73070 ui: fix scrolling label speed at non-60fps refresh rates (#1967)
* ui: fix scrolling label speed at non-60fps refresh rates

* send it

* nope

* more
2026-08-26 11:39:10 +08:00
Comma Device 4ceb7628b6 volkswagen: tune Avoid EPS Lockout for sharp 90+ degree turns
Extend the low-speed torque scaling from 4 m/s to 8 m/s and add steering
angle-based scaling (further reduction above 50 deg wheel angle) so the EPS
does not reject HCA on sharp 90+ degree turns taken at speed. Lower the
standstill torque floor from 80% to 60% and use a stronger torque dither
(3 units vs 1) when the toggle is on, to reset the EPS stuck-torque
protection timer.
2026-08-25 20:45:06 +08:00
Comma Device f07b8db86a Rebuild libparams_c.so for new ModelManager params (#1960)
Cherry-picked #1960 adds ModelManager_PrevBundle and
ModelManager_PrevBundle_USBGPU to params_keys.h, so rebuild the params C
library so the new keys are usable on-device without a rebuild.
2026-08-25 16:57:11 +08:00
Jason Wen 1f62c6c367 models: persist model selection per catalog across chestnut state changes (#1960) 2026-08-25 16:56:01 +08:00
Jason Wen 4d78e22c1d models: fix current model not updating on chestnut status (#1959)
* models: preserve user model selection across reboots and power cycles

* no

* again

* idk

* over
2026-08-25 16:56:01 +08:00
Jason Wen f7d8e09a63 ui/models: handle missing files during cache size calculation (#1958) 2026-08-25 16:56:01 +08:00
Comma Device aa1716d404 volkswagen: add Avoid EPS Lockout toggle (port from dragonpilot)
Adds a VW-brand toggle that scales steering torque down at low speeds
(vEgo 0.4 -> 80%, 3.5 -> 95%, >=4.0 -> 100% of STEER_MAX) to avoid EPS
lockout. Ported from dragonpilot (dp_vag_avoid_eps_lockout) following the
sunnypilot brand-params pattern: VagAvoidEPSLockout param -> VolkswagenFlagsSP
-> VW carcontroller. Default off; requires an onroad cycle to take effect.
2026-08-25 12:06:59 +08:00
Comma Device b061d88cfa panda: add GM ignition-over-CAN detection on bus 2 (SystemPowerMode 0x1F1)
FrogPilot handles the GM SystemPowerMode message on both bus 0 and bus 2
(SDGM cars send it on bus 2). C3XL-dev only checked bus 0, so GM cars with
0x1F1 on bus 2 never set ignition_can and the device would not auto power-on.
Mirror FrogPilot: check 0x1F1 on bus 2 as well, keep other exceptions bus-0 only.
2026-08-25 11:41:31 +08:00
Comma Device 22191a156d ui: four-state eGPU icon for non-default big models (PR-1945) 2026-08-24 18:49:18 +08:00