models: add a clear cache button to mici, gate and show progress on both panels
Adds the clear-cache tile to the mici models panel (trash slide-to-confirm),
factoring the cache-size math into model_cache_size_mb() shared with the big UI.
On both UIs the clear button is now gated on offroad + not-downloading +
not-clearing (the manager runs offroad-only, so a clear queued onroad would
never be serviced and would stick), and shows progress while the manager works:
mici shows "clearing..." on the tile, the big UI flips its button to
"CLEARING..." to match its FETCHING.../SELECT/CLEAR label style (as in the OSM
panel).
Claude-Session: https://claude.ai/code/session_01EGMnVnSk5inGTrd7kuDVG9
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* 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>
* 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>
* Fix UI path color and thickness based on lateral steering state (Issue #1441)
* Fix UI path color and thickness based on lateral control engagement (Issue #1441)
* Fix UI path width and color based on MADS lateral engagement (Issue #1441)
* Fix UI path width and color based on MADS lateral engagement (Issue #1441)
* move to ModelRendererSP
* match torque bar
* same behavior across the board
* simplify
---------
Co-authored-by: Brennan Browne <brennanbrowne@google.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Revert "ui: fix text and icon overlap on button (#38628)"
This reverts commit d9c4120f89.
* simple
* can do this
* fix eliding
* Revert "fix eliding"
This reverts commit b271a350182ad87f9942d7363383ee8ec72d0e36.
* clean up
* clean up
* Name the big default model in the device UI
Build on the default big-model metadata from #1929 and resolve the displayed model from cached capability and modeld runtime state. Keep model selection behavior unchanged.
Assisted-by: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove get_default_model_label
* simplify
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: nayan <nayan8teen@gmail.com>
* relc
* so picky
* clean up
* switch to distance based
* same calls
* all you brother i'm just here to red diff
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ui: fix inverted DM head tracking on RHD
b29d0a17af switched the mici driver state renderer from computing pose
from driverStateV2 itself to consuming driverMonitoringState.visionPolicyState.pose.
That published yaw is mirrored for RHD (policy.py:269) so the asymmetric yaw
offsets/thresholds can be tuned in a single frame, so the UI's unconditional
sign flip left RHD head tracking backwards. LHD was unaffected, which is why
the refactor looked like a no-op.
Undo the mirror on the UI side.
* Apply suggestions from code review
* fold the sign into the RHD multiplier
* init
* more init
* keep it alive
* fixes
* more fixes
* more fix
* new submodule for nn data
* bump submodule
* update path to submodule
* spacing???
* update submodule path
* update submodule path
* bump
* dump
* bump
* introduce params
* Add Neural Network Lateral Control toggle to developer panel
This introduces a new toggle for enabling Neural Network Lateral Control (NNLC), providing detailed descriptions of its functionality and compatibility. It includes UI integration, car compatibility checks, and feedback links for unsupported vehicles.
* decouple even more
* static
* codespell
* remove debug
* in structs
* fix import
* convert to capnp
* fixes
* debug
* only initialize if NNLC is enabled or allow to enable
* oops
* fix initialization
* only allow engage if nnlc is off
* fix toggle param
* fix tests
* lint
* fix more test
* capnp test
* try this out
* validate if it's not None
* make it 33 to match
* align
* share the same friction input calculation
* return stock values if not enabled
* unused
* split base and child
* space
* rename
* NeuralNetworkFeedForwardModel
* less
* just use file name
* try this
* more explicit
* rename
* move it
* child class for additional controllers
* rename
* time to split out custom lateral acceleration
* move around
* space
* fix
* TODO-SP
* TODO-SP
* update regardless, it's an extension now
* update name and expose toggle
* ui: sunnypilot Panel -> Steering Panel
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral_panel.h
* merge
* move to steering panel
* no need for this
* live params in a thread
* no live for now
* new structs
* more ui
* more flexible
* more ui
* no longer needed
* another ui
* cereal changes
* bump opendbc
* simplify checks
* all in one place
* just Enhanced Lat Accel only
* no submodule for this
* Enhanced Lateral Acceleration: fix bugs, restore NNLC, add UI/schema
Fix 4 bugs in latcontrol_torque_lat_accel.py: missing CI param, wrong
method name (torque_from_lateral_accel → torque_from_lateral_accel_in_torque_space),
self.enabled collision with NNLC, missing output torque recomputation.
Restore NNLC + ExtOverride inheritance chain with Enhanced slotted between
ExtBase and NNLC. Add mutual exclusion constraints, Python UI toggle,
sunnylink schema entries, and controller init/update tests.
* fix lint: remove unused default params list, add ty ignore, fix test fixture
* use the og name
* rename
* need gates
* TODOs
* wrong
* gate them all on init
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>