Port the infiniteCable2 MQB EVO car port: Golf Mk8 and SEAT Leon Mk4 platforms, MQB EVO DBC/generator sources, CarState/CarController/RadarInterface handling, and the Volkswagen MQB EVO safety mode.
The current recompiled42 model catalog declares tinygrad_ref=fe5d3169b. The old vendored e837 runtime accepted the pkl but left policy outputs at zero, so sync the runtime package to the compiler version used by the downloaded models.
models: add a refresh models button to mici, gate and show progress on both panels
Adds the refresh-models tile to the mici models panel (it was missing there),
factoring the sync-key trigger + in-progress check into refresh_model_list()
and refresh_in_progress() shared with the big UI.
On both UIs the refresh button is now gated on offroad + not-downloading +
not-refreshing (the manager runs offroad-only and its per-tick manifest fetch
sits above a blocking download loop, so a refresh queued in either state would
stick), and shows progress while the manager refetches: mici shows "fetching..."
on the tile, the big UI flips its button from REFRESH to "FETCHING..." to match
its FETCHING.../SELECT/CLEAR label style (as in the OSM panel), replacing the
old fire-and-forget popup.
Claude-Session: https://claude.ai/code/session_01EGMnVnSk5inGTrd7kuDVG9
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
(cherry picked from commit a5f44653d7f43ad57fef2f546f3916ec4cbf3c56)
Upstream triggers on 0x2FF, the slot-15 companion burst. A car only broadcasts
the object slots that hold a target, so on the 2018-22 Accord rlog (144k Bosch-A
frames, 80 ids) 0x2FF never appears and the decoder never evaluated: zero radar
points. Any Bosch-A main frame now drives evaluation; per-slot signal reads are
unchanged, so this only changes when we look.
Widening the enable gate to the whole HONDA_BOSCH_A family meant the other
platforms (N-Box, Accord, Civic Bosch Diesel, CR-V Hybrid, RDX 3G, Insight,
Honda e) still lacked a Bus.radar entry, so constructing the radar interface
raised KeyError: Bus.radar. Give each of them the hand-written Bosch-A DBC.
Instead of the verified-subset allowlist (Civic Bosch / CR-V 5G only), clear
radarUnavailable for the whole HONDA_BOSCH_A hardware family so the decoder can
be tried on other Bosch-A cars. The sentinel-file kill switch still turns it
off, and HONDA_BOSCH_A_RADAR_VERIFIED is kept for reference.
opendbc's RadarPoint keeps aRel, yvRel and measured inside the deprecated group
(the upstream fork had them at the top level), so assigning them raised
'struct has no such member; name = aRel'. Point at the group in the radar
interface and in the tests.
sunnypilot's RadarInterfaceBase.__init__ takes (CP, CP_SP); the upstream file
only took CP, so constructing the radar interface raised
'RadarInterfaceBase.__init__() missing 1 required positional argument: CP_SP'.
Build CP_SP in the tests as well and pass it through.
Ported from StarPilot together with the radar interface. The tests cover the
16-slot CAN id map, DBC bit geometry, range/azimuth/vRel conversion, object
lifecycle, fallback behaviour, stale-bus handling and the platform allowlists.
The tester toggle uses this fork's sentinel file
(/data/params/d/HondaBoschARadarOff) instead of the upstream HondaBoschARadar
params key, so the suite runs without a libparams rebuild.
Ported from StarPilot (mawei/StarPilot): the sunnypilot Honda radar interface
deliberately returns no points for Bosch cars, so radard never sees the stock
radar. This brings in the hand-written 16-slot Bosch-A decoder:
- radar_interface.py: full Bosch-A object bank decode (0x280-0x2FF main frames
plus the 0x290-0x297 companion frames), range/rate/angle conversion and sweep
triggering. Receive only - it never sends CAN, so factory AEB/CMBS/FCW stay
live and no safety change or rebuild is required.
- dbc/honda_bosch_a_radar.dbc: the bit geometry the decoder parses.
- values.py: HONDA_CIVIC_BOSCH and HONDA_CRV_5G (the verified platforms) point
Bus.radar at the new DBC; HONDA_BOSCH_A / HONDA_BOSCH_A_RADAR_VERIFIED sets
describe which platforms may use it.
- interface.py: radarUnavailable is cleared for verified platforms unless a
kill switch is present. The switch is a sentinel file
(/data/params/d/HondaBoschARadarOff) instead of a params_keys.h entry, so no
libparams rebuild is needed.
With radar points flowing, the existing sunnypilot longitudinal control can use
them; nothing in carcontroller or safety was touched.
* modeld: set the valid flag on modelDataV2SP
modelDataV2SP was published with new_message's default valid=False, so
the message was permanently invalid. Nothing acts on that today because
selfdrived lists it under ignore_valid, but it shows up as invalid in
every commIssue dump and hides any real problem behind a false one.
Copy modelV2's flag, the same way fill_model_msg already does for
drivingModelData.
Assisted-by: Claude
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* modeld_v2: set the valid flag on modelDataV2SP
The sunnypilot model runner publishes the same message and had the same
gap. Copy modelV2's flag here too, so both daemons agree.
Assisted-by: Claude
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
models: don't block the ui on an unset LagdToggleDelay
Params.get's second positional is `block`, not a fallback value, so
get("LagdToggleDelay", "0.2") passes block=True and does a blocking read.
When the param is unset this spins the ui thread until it appears, freezing
the models panel (the description is rebuilt every frame). Read it the same
way livedelay/lagd_toggle.py does.
Claude-Session: https://claude.ai/code/session_01EGMnVnSk5inGTrd7kuDVG9
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
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
- 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)
- 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)