* modeld_v2: safe model validation
* fix string
* numpy
* dumb
* god use full attribute names please
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* bitrate controller
* ability to set the quality so a certain level, make message handler a switch case
* distinct bitrate levels and exponential backoff of raising bitrate
* add med level threshold
* fix
* fix
* simplify
* clean
* remove CarState.brake refs
Intending to deprecate this field since it's set incorrectly by
most car implementations, and (essentially) unused in openpilot.
Everything should be using CarState.brakePressed.
See https://github.com/commaai/opendbc/pull/3338.
* fix test_models.py
* hardware: read network info without NetworkManager DBus
* hardware: simplify wpa_cli SSID escape decoding
* hardware: restore cellular block in get_network_type to match master
* hardware: factor wpa_cli helper for key=value parsing
* hardware: comment SSID byte conversion for keyfile match
* hardware: comment NM metered enum values
* hardware: use check_output for ip route and wpa_cli helpers
* hardware: read default route iface from /proc/net/route
* hardware: simplify default route iface parsing
* hardware: only check for metered == 1
* hardware: also look for *.nmconnection in /data/etc/NetworkManager/system-connections
* hardware: use nmcli for runtime metered guess on wifi
* socket
* cleanup
* poor
* lil more
* mv that
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* initial codex
* remove ISP delay from encode ms
* try something simpler
* not allowing increase bug
* decrease bitrate increase rate
* upsample only on consecutive good checks
* rearrange
* clean
* Revert frame timing processing time change
* clean
* remove bitrate option and just do it on --stream
* make set_bitrate a lot more simple
* clean default impl
* further cleaning
* struct for bitrate to pass ci
* refactor a bit
* add comment
* small clean
* add init()
* increase bitrate
* update ffmpeg message
* remove unnecessary include
* modify set_bitrate
* change to Param
* remove getInt helper; add back in diff pr
* reword unclear error message
* move webrtcd change to new branch
* Reapply "modeld: split warp" (#38085)
This reverts commit d489dd8909.
* don't time make_random_inputs
* depend on chunk targets
* also depend on compile_modeld's dependencies
* athenad and webrtcd updates
* remove feature stream services from webrtcd split
* stream encoder thread
* reduce diff
* wire webrtc to livestream camera encoder
* request livestream camera switch service
* add frame timing headers
* rfctr
* diff
* clean
* remove camera list in favour of init camera field
* remove cors
* clean
* remove unused
* remove extra try except
* remove video_tracks unused
* add back exception trace
* add stream road camera info to stream cameras
* fix
* add back assert
* clean diff
* clean diff
* add testJoystick only on body
* fix camera list
* remove reference to future service
* video_tracks list add back
* encode all cameras and swap in video track in webrtc
* clean
* explicitly gate bridge send
* clean leftover
* rearrange video.py
* fix lint
* athenad and webrtcd updates
* remove feature stream services from webrtcd split
* stream encoder thread
* reduce diff
* wire webrtc to livestream camera encoder
* request livestream camera switch service
* remove camera list in favour of init camera field
* remove cors
* clean
* remove unused
* remove extra try except
* add back exception trace
* add stream road camera info to stream cameras
* fix
* clean diff
* clean diff
* add testJoystick only on body
* fix camera list
* remove reference to future service
* encode all cameras and swap in video track in webrtc
* clean
* explicitly gate bridge send
* clean leftover
* make local bodyteleop work still
* athenad and webrtcd updates
* remove feature stream services from webrtcd split
* remove cors
* clean
* remove unused
* remove extra try except
* add back exception trace
* clean diff
* clean diff
* add testJoystick only on body
* fix camera list
* remove reference to future service
* zero ll patched big model
* probe in a subprocess so usbgpu lock gets released
* compiles
* runs
* num_jobs gets overwritten, use side effect
* poll tg devices
* make sure build crashes on missing gpu
* fine not to rely on Device.default
* seperate tg env for each model runner
* comment
* Revert "seperate tg env for each model runner"
This reverts commit f6470cc4258eaeb3e8e37907ef370871c9af5aa4.
* env is shared, gate on flag
* no fallback warp dev must be set
* build for current device only, unless pc/release
* comment
* list
* listen for plug in
* add icon to status bar, read params on every frame (?)
* log available devices
* try copy out when loading?
* Revert "log available devices"
This reverts commit e8c52a5d59456d4820ecb13b99a6c46ea1386a20.
* Revert "try copy out when loading?"
This reverts commit 518f403aa03faeda1950fe3dbce0d9e4c1584455.
* don't trigger device probe/caching on modeld prepare
* re-export with ll and road edges
* dont cache devices in manager process
* get USBGPU from params
* no usbgpu env
* missed one
* sconscript don't poll
* unconditional env
* always explicitely set devices on input tensors
* set DEV so amd uses right compiler and iface??
* fix flag
* bump tg
* rm xdg_cache_home
* tg don't bump all the way
* missing gmmu=0 at compile time
* dm set dev
* tg backend
* update gitignore
* missing import
* unused imports
* rely on Device.DEFAULT at compile time (already the case bc onnxrunner)
* comments
* dm warp needs DEV set too
* build both smol and big
* misc typos
* set dev at compile time
* don't need
* DEV=CPU when getting metadata, ensure we don't grab gpu lock
* this would also grab lock
* put bool
* warp compile always prepare only
* missed one
* poll ui
* missing here
* don't force usbgpu at build time
* tmp patch fetch_fw
* catch all, follow hardwared patterns
* simpler
* compile make input queues
* revert this
* group this more readable
* rm empty line
* make dummy frame using numpy
* revert compile make input queues
* no compiler at runtime
* cleanup
* fine to rebuild all on change to device node for now
* fix usbgpu_present
* fix sconscript
* no size in header stream decompress
* DEBUG=2
* minimal viable feedback
* egpu gray
* oops
* gotta do this actually
* modeld build only depends on modeld devices
* don't ship onnx to release? or chunk
* don't need
* can only set compiler on dev=
* none device works, will use default
* make linter happy
* chunk agnostic onnx input to compile_modeld
* chunk big onnx
* +x chunker
* fix #!
* and don't ship chunked onnx to release
* firmware now in correct location
* better err on missing onnx/chunk
* SConscript also need to accept chunked onnx
* metadata also need to load maybe chunked
* dedupe cmd
* this needs to be on cpu
* devices are set in the tgflags, we already depend on them
* rebuilding on changed order is fine
* read file chunked can already load either chunked or not
* chunk all big onnx
* less confusing
* unused import
* python device to load onnx bytes
* default device for runners, python for metadata
* why not
* chunked to shm
process_replay/migration: drop transitive dep on long_mpc/acados
migrate_longitudinalPlan only needs get_accel_from_plan + CONTROL_N_T_IDX,
both available from drive_helpers + ModelConstants directly. Importing
from longitudinal_planner instead pulled in long_mpc -> libacados.so as
an eager side-effect, which downstream log-migration consumers (e.g.
commaai/xx pipeline) shouldn't pay for.
Brand-specific capabilities (hyundai_alpha_long_available,
subaru_has_sng) only resolved from CarPlatformBundle, which requires
manual car selection. Auto-fingerprinted vehicles had no bundle,
leaving these capabilities at default false — hiding vehicle settings
on the dashboard despite working on the device UI.
Add _resolve_brand_capabilities() with bundle-first, CP-fallback
pattern matching the device UI layouts (hyundai.py, subaru.py).
Fixes https://community.sunnypilot.ai/t/5126
* serverless code sync
* rm stuff
* we have ls-files for this
* rm
* no debounce
fix
* fix
* no del
* no init
* clean up
* clean up
* smol
* fixup
* rm
* clean up
* any change
* rm arg
* rm
* rm
* speedup slowest
* less setup
* rm som reset logging
* simpliy a lil more
* lil more
* down to 36s
* sleeeeeeep
* finishing touches
* oopsie
* ty fix
---------
Co-authored-by: Comma Device <device@comma.ai>
* filter lead prob
* rename
* try correcting model bias
* Revert "try correcting model bias"
This reverts commit b5e9b7147e58f200ca2e02ccea8adf88be99e206.
* fast gain slow lose
* cmt
* deb
* rename
* rename
* end
* py py py
* sunnylink too
* refactor
* this is not needed anymore
* mici mici
* ugh
* retry CI
* ui: refactor default model name handling
Move DEFAULT_MODEL constant into sunnypilot/models/default_model.py
and remove the one-liner common/model.py. Strip the hardcoded
" (Default)" suffix from the constant value so each UI site appends
it contextually, keeping the raw model name clean for the schema
payload to sunnylink.
Replace the DefaultModel param approach with schema["default_model"]
injected at schema assembly time, eliminating a redundant param write
on every sunnylinkd start. Remove DefaultModel from params_keys.h and
params_metadata.json.
Update update_default_model_name() to do a targeted regex replacement
instead of overwriting the whole file, since the constant now lives in
a module with other code.
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ci: simplify cereal validation to sparse-checkout + pycapnp, drop scons build
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* more
* fix: resolve cereal_dir to absolute path before passing to capnp.load
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* ci: init opendbc submodule after sparse checkout to resolve car.capnp symlink
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* try to break it
* Revert "try to break it"
This reverts commit 79ce135c5f.
* try to break it
* Revert "try to break it"
This reverts commit 1eaa9e79e6.
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
ui: nonblocking writes for ExperimentalMode + DriverView toggles + cycle-restart
All four put calls fire from the main render thread on user interaction
and block on disk fsync, causing visible UI frame spikes.
Each consumer is safe under nonblocking:
- onboarding inactivity_callback: write-and-forget (~25 ms saved)
- home long-press exp toggle: ui_state.experimental_mode owns visual state (~10 ms)
- onroad exp_button: $held_mode + selfdriveState owns visual state
- restart_needed_callback (OnroadCycleRequested): cross-process signal,
consumer is selfdrived which polls the param
BigParamControl-driven toggles in settings (developer.py, toggles.py)
are intentionally left blocking — those widgets refresh visual state
from disk every frame to mirror external changes, which would race a
nonblocking write.
* snap logic in scroll panel
* match previous snap speed
* velocity lookahead makes scrolling on main layout super easy
* turn off
* remove velocity lookahead
* cmts
* remove handle out of bounds
* cmts
* old style
* back
* clean up
* re-use
* revert
* finish snap when settings is clicked while moving
* rm cmt
* log raylib fps
* log fps from frame time
* whitespace
* or just log frame time?
* init pubmaster in init window
* yield timings
* bump ordinal
* dont log on screen off
* UInt
* lint
* /0
* oops
* oops2
* more precise raylib frame time, can get fps with 1/ft
* don't crash on screen off
* NL
* no _
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* 1
* fix
* uh
* more
* for now
* v2
* update
* more subs
* readme
* vehicle
* cycle init
* options
* new
* combine
* new
* dynamic unit
* default
* move it
* syncing more
* more
* boom shakalaka
* rearrange
* partial availability
* move
* more
* more
* hide
* move
* revert
* more
* new
* set
* sync
* dynamic
* slightly more
* update
* update
* less
* in another pr
* more
* move and fix
* device type
* order
* order
* order
* fixes
* ew
* Revert "fixes"
This reverts commit 53a2adb45a.
* sunnylink: bundle-first capabilities + protocol_version
Bundle-first brand resolution, fix steer_control_type to use
CP.steerControlType (physical) not lateralTuning.which() (tuning class),
add Subaru/Hyundai opaque per-platform flags from CarPlatformBundle, and
embed PROTOCOL_VERSION in the capabilities payload.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* sunnylink: tighten settings_ui gates against Raylib parity
Brand gates on MadsMainCruiseAllowed/MadsUnifiedEngagementMode (rivian +
tesla-no-bus); convert enablement->visibility on items Raylib hides
(DisableUpdates, EnableGithubRunner, EnableCopyparty, QuickBootToggle,
HyundaiLongitudinalTuning, LaneTurnValue, LagdToggleDelay); drop spurious
offroad_only on DynamicExperimentalControl + DisengageOnAccelerator and
SpeedLimit policy/offset over-gates; replace offroad_only with not_engaged
on AlphaLongitudinalEnabled/Toyota long toggles; extend release-branch
NOTs with is_sp_release; add Test Maneuvers section with attestation,
move LongitudinalManeuverMode in alongside new LateralManeuverMode.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* sunnylink: extend settings_ui validator for new fields
Add SchemaItem fields title_param_suffix (object form), needs_onroad_cycle,
blocked, requires_attestation; add option-level enablement to SchemaOption;
add visibility/enablement/attestation_required to PanelSection; add
not_engaged Rule type; replace vehicle_settings inline shape with
VehicleBrandSettings def (title/description/items).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* sunnylink: inject torque tune options from versions JSON
Read latcontrol_torque_versions.json at schema generation time and
override TorqueControlTune options so adding a version to the JSON
flows to the dashboard without editing settings_ui.json by hand.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* sunnylink: per-bug regression tests for settings_ui parity
Cover the audit findings end-to-end: MADS brand gates, Test Maneuvers
section + attestation, validator accepts the JSON, dynamic torque
options match the versions JSON, SP dev items gate on is_sp_release as
well as is_release, spurious offroad_only dropped from
DisengageOnAccelerator and DynamicExperimentalControl, and offroad_only
replaced with not_engaged on AlphaLongitudinalEnabled and the Toyota
long toggles. Validator test skips when jsonschema is unavailable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* sunnylink: protocol_version sentinel + opaque-flag tests
Pin PROTOCOL_VERSION to KNOWN_PROTOCOL_VERSIONS so a bump shows up in
review, and assert subaru_has_sng / hyundai_alpha_long_available are
declared with safe False defaults.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* schema: convert ShowAdvancedControls visibility to enablement
Items previously hidden when ShowAdvancedControls is off now render
as disabled with an ADVANCED tooltip. Same treatment for dependency-
based hides (LagdToggleDelay, LaneTurnValue) so users see what's
available and why it's locked. CameraOffset gets the Advanced gate it
was missing.
Affected: DisableUpdates, EnableGithubRunner, EnableCopyparty,
QuickBootToggle, LaneTurnValue, LagdToggleDelay, CameraOffset, and the
test_maneuvers section.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* sunnylink: route resume_queued to athena direct
Backend is retiring the CloudFront proxy on stg.api.sunnypilot.ai that
currently forwards ws|settings|navigation to athena.sunnylink.ai. Once
retired, /ws/{id}/resume_queued only resolves via athena.sunnylink.ai.
SunnylinkApi.resume_queued now temporarily swaps self.api_host to
ATHENA_HOST while re-entering api_get (preserves the SunnylinkEnabled
gate and existing JWT/UA header handling). Other device calls
(device/{id}/roles, device/{id}/users, v2/pilotauth/, backups) continue
to hit the sunnylink main API host unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* legacy code
* no
* new
* tests
* lint
* fix
* too verbose
* sunnylink: per-page YAML authoring for settings_ui + named rule macros
Replace hand-edited 2200-line settings_ui.json with a per-page YAML source
tree under settings_ui_src/, plus named rule fragments (`$ref` macros) so
the same condition isn't repeated verbatim across items.
Authoring surface (settings_ui_src/):
pages/<page>.yaml one file per panel; sections/items/sub_panels inline
pages/vehicle.yaml per-brand settings (kind: vehicle -> vehicle_settings)
_macros.yaml named rule fragments referenced via {$ref: "#/macros/<name>"}
_schemas/*.json JSON Schemas for IDE autocomplete + CI validation
Pages today: steering, cruise, display, visuals, toggles, device, software,
developer, models, vehicle (10).
Tools:
compile_settings_ui.py read src tree, resolve $refs, emit settings_ui.json
(--check mode for CI to fail on hand-edits)
extract_settings_ui.py one-shot: settings_ui.json -> per-page YAML
apply_macros.py one-shot: substitute matching rule blocks with $ref
Rule-block dedup wins (top duplicates collapsed to single macros):
offroad (9x), longitudinal (4x), longitudinal_and_icbm (5x),
hide_on_mici (4x), advanced_only (3x), mads_full_platforms (4x ~30-line
nested any/all/not -> 1 macro + 4x one-line $ref).
Validator drift fixes:
- Accept not_engaged rule type (already in schema.json + used by
AlphaLongitudinalEnabled, ToyotaEnforceStockLongitudinal,
ToyotaStopAndGoHack, LateralManeuverMode, LongitudinalManeuverMode).
- Enforce {title, description, items} shape on every vehicle brand
instead of allowing bare-list variants.
Wire format unchanged: compiled settings_ui.json structurally identical to
the prior hand-edited file, so the device generator (generate_settings_schema.py),
SettingsCapabilities, and frontend renderer all keep working without changes.
Tests: 16 new compiler tests (roundtrip, $ref semantics, depth/cycle limits,
page-tree integrity, vehicle kind routing). Existing 42 regression tests in
test_settings_changes.py and test_settings_schema.py remain green.
README rewritten for the new flow:
- Decision table for offroad_only / not_engaged / param / capability
- Multi-condition composition examples (AND/OR/mixed/3-way/negation)
- Full feature walkthrough (multi-toggle + sub_panel + new macro)
- Workflows for changing rules, widget type, deprecating an item
- All How-To examples migrated from JSON to YAML
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* sunnylink: add `details` field for popover/modal help text
Adds an optional `details` field on settings items, distinct from the inline
`description`. When present, the frontend renders an info ("i") button on the
row that opens a modal with this content. Either field may be present alone,
or both together; an item with only `details` and no `description` shows just
the title + info button (no inline body).
Migrates `AutoLaneChangeTimer` as the first user: the safety caveat
("Please use caution when using this feature. Only use the blinker when
traffic and road conditions permit.") moves out of the inline description
into `details`, leaving the description focused on what the timer actually
does.
Schema changes:
- settings_ui.schema.json: SchemaItem.details (string, optional)
- settings_ui_src/_schemas/page.schema.json: Item.details (mirror)
- compile_settings_ui.py / extract_settings_ui.py: ordered after description
Frontend support lands in sunnylink-frontend on the design-overhaul branch.
Old frontends ignore the unknown key.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ui: refactor UIStateSP init to eliminate getattr and double update_params
- Remove update_params() and reset_onroad_sleep_timer() from UIStateSP.__init__;
__init__ is now pure attr initialization with no I/O or side effects
- Add _sp_initialized flag to UIStateSP.update_params() to fire
reset_onroad_sleep_timer() exactly once after first real param load,
keeping the call in SP territory and out of stock _initialize()
- Replace getattr(self, 'has_longitudinal_control') / getattr(self, 'CP')
in _enforce_constraints with direct attr access; safe because
_enforce_constraints is only called from update_params(), which only
runs after UIState._initialize() has set both attrs
- Rename _enforce_sp_constraints → _enforce_constraints
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix
* exec
* more exec
* humanize
* sync
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
modem.py: retry identity read until valid; stay in INIT on partial reads
Under rapid SIM hot-swap stress, AT identity reads (CGSN/QCCID/CIMI/GMR) can return
empty values or echo the command itself. Validate each field before accepting it,
retry the whole sequence in a loop, and stay in INITIALIZING (rather than progressing
to SEARCHING) until imei and iccid are populated. Prevents stale/empty identity from
being published to /dev/shm/modem after a glitchy reinit.
* ui: speed up `mici/AugmentedRoadView` by optimizing _calc_frame_matrix caching (#36669)
speed up AugmentedRoadView by optimizing _calc_frame_matrix caching
* ui: apply rect.x/y as a 2D screen offset post-projection
Removes the parent rect's screen position from the cached
video_transform passed to ModelRenderer. Instead, ModelRenderer
applies (rect.x, rect.y) as a 2D offset to projected_points at draw
time.
Why this works: the rect.x/y term in video_transform gets multiplied
by P_calib[2] before the perspective divide, then divided by the same
value, which cancels out to a simple additive shift on the final
screen coordinate. So adding x to video_transform[0,2] is equivalent
to adding x to screen_x post-projection.
Net effect: the cache key in _calc_frame_matrix no longer needs to
include rect.x/y. Cache stays hot under translation (e.g. swiping
between layouts), and the model overlay tracks the camera at 60Hz
because the offset is updated cheaply each frame.
This addresses the original revert reason for #36669 (model overlay
visually desyncs from camera during a home<->onroad swipe).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ui: update model screen offset every frame, not just on cache miss
set_screen_offset() was called inside the cache-miss path of
_calc_frame_matrix, so the offset only updated at ~20Hz (calib publish
rate). The model overlay visibly lagged the camera during a swipe.
Move it out of the cached path so it updates each frame.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fully clean up
* shorter cmts
* make non
* clean up
* fix ty
---------
Co-authored-by: Dean Lee <deanlee3@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ui: keep arc_bar_pts cache hot when bar is translated
The LRU cache key included (cx, cy), which change every frame when
the parent widget's rect translates (e.g. during a scroll animation
in MainLayout). That made every cache lookup miss, recomputing the
arc geometry twice per frame and dropping fps.
Compute the shape at origin (so the cache key only depends on the
geometry: radius, thickness, angles), then translate to (cx, cy)
after. Cache stays hot under translation.
Measured on comma four (engaged, scrolling): ~5fps recovered while
moving between layouts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fully clean up
* fully clean up
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix frame under text
* claude always taking the hard path
* cmt
* it still shows on start
* revert
* fix
* wait to show
* already a bug, don't fix here
* cmt
* cmt
remove ws_queue thread and associated api endpoint
- Simplified thread management by removing unused `ws_queue`.
- Eliminated `resume_queued` API call for better maintainability.
* update blob
* fixed
* didnt catch this
* add back
* needs BLC built in
* for real
* attempt2
* clean up override
* this should keep ox as was
* disable for OX
* update descs
---------
Co-authored-by: Comma Device <device@comma.ai>
* spellings
* unused
* no roll
* lil more
* lil more
* one more
* policy enum
* better trans
* set_timer -> set_policy
* set_timer -> set_policy
* no yaonet
* del redundant code
---------
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
* c4 body ui
* clean up diff
* clean up
* default bodyview debug with True
* remove battery indicator and fix close settings bug
* organize debug file
* clean
* clean up frame index
* remove unneccessary is body check
* update bodyview
* remove joystick_debug_mode based events
* remove debug script
* apply suggestions
* clean diff
* clean diff
* move ignition message
* save a line
* remove visibility set and fix tici body face when sidebar open
* remove explicit textColor offroad message
* remove unused imports
* revert pairing dialog
* apply suggestions
* add body specific icon
* add body icon for homescreen
* set mode for state on tici after on body changed
* tiny
* tweak
* v
* tweaks
* icon ratio was wrong!
* same order
* rm
* apply suggestions
* remove commented lines in animation
* onroad click callback was on home bug and fix setup widget settings call back hack
* fix body changed
* one liner
* clean up
* formatting
* if false
* revert to master + reimplement
* close sidebar on body home tici
* make ignition message bigger on c3
* flip eye direction when turning
---------
Co-authored-by: Nick <nickorie@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* compile_modeld.py
* update estimates
* missing image=2?
* Revert "missing image=2?"
This reverts commit 2f5952eb63ba1e3f24cbf5769e6b5e9170d7f0a6.
* Revert "update estimates"
This reverts commit 1f72feef2ffdec6126e3c941e899b46ace7b4b65.
* Revert "compile_modeld.py"
This reverts commit f10541502efca02725f368deda2a21d1f786f57d.
* load warp in ModelState init
* dead code
* prep
* compile modeld
* update SConscript
* tmp save plot locally
* Revert "tmp save plot locally"
This reverts commit ec22f15161ad3b0241a097546b35860f989219f5.
* openpilot hacks?
* no float16
* tmp more chunks
* Revert "tmp more chunks"
This reverts commit 9e1d9b4d0dc36ff530d2a70b565fbfabd7afb00d.
* Revert "no float16"
This reverts commit 6204956e98e3c0818ed1985ede8eeccb810f63e3.
* realize boundaries
* Revert "realize boundaries"
This reverts commit ffaa19259eba70944e7793e8f51a0f87089531b3.
* prune=False?
* Reapply "tmp more chunks"
This reverts commit 2599c41cea93b4a6b4e946cdffc6a617663a7d23.
* tg bug?
* load first?
* Revert "load first?"
This reverts commit f643d082d76a424b23295e254179eb111e936e61.
* revert
* Reapply "tmp save plot locally"
This reverts commit 1b95b82ee58654bd908b1cb04ab0ddbcd1a5955d.
* 0 tol pc
* warp -> modeld
* rename
* bypass chunking?
* dont chunk
* Revert "dont chunk"
This reverts commit cc97fc67b3203456e123f02babe5c83b87c7e264.
* dont chunk
* debug
* Revert "debug"
This reverts commit b3c2f2e7a095fd32f8d8562a68fd1cca42357eac.
* Revert "dont chunk"
This reverts commit 42bd9b6f6ad0722c50348ba11ba7e2a64fdf997d.
* Revert "bypass chunking?"
This reverts commit ad5422a93483ffd8a59ba62e5fb72ced3b5d04d0.
* corrupt model outputs
* Revert "corrupt model outputs"
This reverts commit 245feb94480e02f83a20b65a9488652bcbfc88b0.
* image=0 for warp, match master
* dedupe enqueue
* pass traffic convention
* tg buffer for desire
* dedupe buffer creation
* compile_modeld: nuke stale cached pkl before compiling
The UNSAFE CI checkout keeps gitignored files (.pkl, .sconsign.dblite),
so stale pkl files from previous commits can persist and be reused
instead of being recompiled. Delete them explicitly before compiling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test vs compile
* all outputs need to be different on different inputs
* randomize numpy inputs
* randomize on every step
* SConscript: nuke stale pkl+chunks before compile_modeld
Move the stale artifact cleanup from compile_modeld.py into the
SConscript build command. This ensures stale gitignored pkl and chunk
files are deleted even if scons decides to skip the compile step
(due to a stale .sconsign.dblite from UNSAFE CI checkout).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* compile_modeld: restore Context(IMAGE=0) for warp
The warp operations must run under IMAGE=0 to avoid QCOM image texture
optimizations that corrupt the output buffer after ~33 frames.
This was accidentally commented out in a855173.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* modeld: create SubMaster before model loading
Move PubMaster/SubMaster creation before the model loading step.
During model loading (3.5s+), process_replay may send liveCalibration.
If SubMaster doesn't exist yet, the message is dropped and the warp
transform stays as zeros, producing garbage warped images.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Revert "modeld: create SubMaster before model loading"
This reverts commit 968c987c2fbb3fce141c4e345d10ddea559b6c50.
* stale metadata?
* claude debug
* Revert "claude debug"
This reverts commit 49e754c6affa45a8ea8834588a00227b8090b17a.
* Revert "stale metadata?"
This reverts commit 870388513c0d4a67dcf970cd277b6db56cb2b478.
* modeld: realize jit outputs before parsing
* Update modeld.py
* modeld: fix NameError by removing redundant MODELS_DIR definition
* test buffers in test vs. compile
* 2x inputs before running
* fixup 2x inputs test
* realize onnx weights?
* Revert "realize onnx weights?"
This reverts commit 49c8b9a505db38ff22f342db011a3a6b6526d398.
* move openpilot_hacks flag to sconscript
* stricter test vs compile
* correct timings
* more run more fail?
* Revert "more run more fail?"
This reverts commit 9e94bb63940751ec29e81b634c42449113e1f2e5.
* numpy shenanigans
* correct shapes
* dont assert timings for now
* Revert "correct shapes"
This reverts commit 5b9ff6c84c0022327d21801d179e9e51c39e8f78.
* Revert "numpy shenanigans"
This reverts commit b4f6fb3078d7e9b09698895b88728fd8eea8c8a8.
* no need to nuke
* comment unused
* don't use NPY device
* copy instead of from_blob
* to device before jit
* Revert "to device before jit"
This reverts commit 7a59ed9b1ac88657b5a3917986b6ff92e59a2ee3.
* Revert "copy instead of from_blob"
This reverts commit 196c4892a06ffba89ef631876372cecf137cc1b4.
* Revert "don't use NPY device"
This reverts commit 18abf43bbac46ad47a60c03dd8d1ef40b3f59227.
* 3 runs is enough
* no_memory_planner=1
* lint
* restore model_replay.py
* on policy -> policy
* unused
* prepare only enqueues full images
* warp with image=2?
* unused args
* test vs compile, check different inputs different outputs
* avoid uop cache collision
* dont need realize here
* misc
* input queues diverged
* strict zip
* monkey patch for now
* memory planner
* prev desire correct order
* dedupe pkl paths / compile targets
* don't change behavior, warp and enqueue frames when skipping model eval
* actually prepare only
* warm up warp jit
* correct path
* oops
* explicit warmup
* need continuous + can't have dupplicate jit inputs
* whitespace
* bufs -> input_queues
* master tg
* /N_RUNS
* bump tg, remove uop cache patch
* more readable
* Revert "bump tg, remove uop cache patch"
This reverts commit 499acca2591becd389de4025943f9e776a5b337c.
* missing dep
---------
Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* always offroad ui
* remove
* lint
* better
* fix sync issues
* fix sync issues
* update for upstream sync
* move it all to top settings panel
* not red
* no home screen, just buttons
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* turn off ir leds on notCar
* reduce startup time on notCar
* fix: check notCar once after onroad is true
* save a disk read by using existing is_onroad
* [TIZI/TICI] ui: remove per-frame param sync
* fix: prevent params.put skip in OptionControlSP by deferring mutation to set_value
The idempotent guard added in the previous commit was being bypassed because
_handle_mouse_release mutated self.current_value before calling set_value(),
making the check always return early. Now we calculate the new value and pass
it to set_value, allowing the guard to work correctly and params to persist.
* fix: enable touch validation for visible items in TreeOptionDialog during scrolling
* rebuild scroller and call add_widget instead
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* model panel - give it some love
* fix sync issues
* update for upstream sync
* fix label
* not red
* fav models
* uhh, yeah
* handling for downloading state
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* NNLC: restore pre-v1 PID gains in torque extension
When the torque lateral controller was refactored for v1 (VERSION=1),
the NNLC extension's PID gains were inadvertently changed from the
per-vehicle defaults (kp=1.0, ki=0.3, kf=1.0) to the new base
controller values (kp=0.8, ki=0.15, no kf with speed interpolation).
The NNLC extension operates in torque space with its own PID loop
that is independent of the base controller's lateral acceleration PID.
Coupling these gains to the base controller's values results in
noticeably weaker steering response and ping-pong oscillation for
NNLC users, with no workaround since Enforce Torque Lateral Control
and NNLC are mutually exclusive.
This restores the original PID gains that were used before the v1
refactor, matching the behavior from v2025.003.000 and earlier.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove k_f from PIDController init
k_f was removed from PIDController in the v1 refactor. The old
k_f=1.0 was a no-op (feedforward scale of 1.0), and the current
PIDController applies feedforward unscaled via update(), so
behavior is unchanged.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Revert "OP model 7 (#37760)"
This reverts commit 052692b25d.
* Revert "OP model (#37740)"
This reverts commit cb32793300.
* dead
* parse_model_outputs: drop extra space
The plural `git/refs/heads/{bucket}` endpoint does prefix matching
and returns a list when multiple refs share the prefix, which makes
`r.json()['object']` raise TypeError. Switch to the singular
`git/ref/heads/{bucket}` endpoint so we only match the exact bucket
and get a clean 404 otherwise.
* services: increase logMessage queue size
logMessage and errorLogMessage defaulted to SMALL (250KB) after
bcdeec3133, but logmessaged allows messages up to 2MB. The msgq
assert requires 3 messages to fit in the queue, so any log message
over ~83KB crashes logmessaged. This happens on dirty devices when
updated logs the full git diff output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* use BIG queue size to fully cover 2MB cap
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update Python packages
* need this
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* pandad: filter out external panda
* fix
* internal panda
* move it even higher
* this
* should be this still
* anoter
* more
* 1 more time
* bruh
* try this out
* revert
* gotta do this after
* filter
i18n(fr): Add French translations for sunnypilot UI
Update 36 existing French translations with corrections and add
369 new sunnypilot-specific translation entries.
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Handle exceptions in `getParamsAllKeysV1` to prevent crashes
- Added `try-except` block to improve error handling during key parsing.
- Ensures robustness by logging exceptions and re-raising them.
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* mici init
* obv
* hybrid
* adapt
* less
* consolidate
* oops
Refactor speed limit alert function to use car state directly.
* no event border for tizi/tici
* abstract it
* less
* nah
* mici init
* obv
* hybrid
* adapt
* less
* consolidate
* oops
Refactor speed limit alert function to use car state directly.
* no event border for tizi/tici
* abstract it
* too soon junior
* refactor
* ui sync conflicts with upstream
* md
* ref
* ci
* lint
* more
* more ci
* new new
* tools: block `manage_sunnylinkd` in sim startup script
* try this out
* unbump
* chore: sync tinygrad
Runs great in sim. now we need to rebuild some models
* oops forgot to unblock this after testing
* helpers
* oh yeah
* latest tg
* this wont do anything empriically
* reduce complexity
* okay lint
* Update tinygrad_runner.py
* Update modeld.py
* Update build-all-tinygrad-models.yaml
* tinygrad bump
* Update modeld.py
* Update tinygrad_runner.py
* bump
* Update SConscript
* Update SConscript
* com
* Update fetcher.py
* Update helpers.py
* life is froughtless, when you're thoughtless
* lint
* ozdust ballroom
* shiz
* Update tinygrad_runner.py
* Update tinygrad_runner.py
* slough it off as i do
* try old support one last time
* support mixed input dtypes
* use internal
* dont need that shiz
* Update fill_model_msg.py
* Update onnx_runner.py
* Update onnx_runner.py
* Update model_runner.py
* see if this speeds up execution
if not, revert me
* no
* Update helpers.py
* rebase
* more
* planplus
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* flasher for Rivian long upgrade
* self-contained no dependency on Panda.F4_DEVICES
* standalone flasher
* move to sp module
* use brand field directly
* use brand field directly
* use brand field directly
* bump
* add some logging
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* soundd: trigger timeout warning during MADS lateral-only
The selfdrive timeout alert (warningImmediate) only fires when
selfdriveState.enabled is True. During MADS lateral-only mode,
enabled is False even though the system is actively steering.
If selfdrived stops publishing while MADS lateral is active, the
driver gets no audible warning that steering has become unresponsive.
Add selfdriveStateSP to the SubMaster and check mads.active alongside
selfdriveState.enabled so the timeout alert fires whenever the system
is actuating steering.
* test_soundd: add MADS lateral-only timeout test
Test that the selfdrive timeout warning fires when selfdriveState.enabled
is False but selfdriveStateSP.mads.active is True.
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
The `steer_limited_by_safety` update in `publish()` is gated by
`selfdriveState.active`, which is False during MADS lateral-only
control. This causes the flag to never update once cruise deactivates
— it stays stuck at whatever value it had during the last ramp-up
(typically True), permanently suppressing the saturation timer in
`_check_saturation` and preventing the "Turn Exceeds Steering Limit"
alert from firing.
Use `CC.latActive` instead, which already accounts for MADS via
`get_lat_active()` in ControlsExt.
Bug was introduced in #446 (MADS), which updated `CC.latActive` to
use `mads.active` but missed updating the `steer_limited_by_safety`
gate in `publish()`.
* init
* no
* more
* tree it
* final
* comment
* only with enforce torque
* only with enforce torque
* missed
* no
* lint
* Apply suggestion from @sunnyhaibin
* sunnylink metadata sync
* Apply suggestion from @sunnyhaibin
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
* Delay lateral reengagement
* UI elements
* Add tests
* Update title and description
* Update params_metadata
* Didn't mean to pass this to int()
* Keep sentry happy
* Title and description update
* always 100 hz
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* clips: allow mici UI (now default) (#37070)
fix: make big false by default and remove assertion
* comma four: new keyboard enter button (#37072)
* works
* enter dis
* clean up
* clean up
* no debug
* useless
* poadding
* tools: fix Python version comparison using normalized semantic version format (#37075)
* Back to tethering BigButton (#37082)
Back to tethering big button
* Stock LKAS: remove permanent alert (#37083)
rm perm
* BigButton: remove unused scrolling (#37085)
* BigButton: remove unused scrolling
* clean up
* BigButton: use UnifiedLabel (#37086)
* BigButton: remove unused scrolling
* start
* debug
* stash
* actually removing the hardcoded size for multioption fixes it
* back
* cursor does sub label
* clean up
* more
* more
* try this for now
* nick suggest
* clean up
* more
* more
* Network menu improvements (#37077)
* try this
* that's handy
* todo, not sure what happens here
* set_text
* normalize
* scroll wifi
* clean up
* more
* better check
* UI: only show `onroad_fade.png` when engaged (#37051)
* only show when engaged
* retrigger CI
* fade animation 0.1
* nl
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* NavBar: fix no show animation (#37090)
* 1.5 not enough time on small screen
* ohhhh
* clean up
* translations: remove arabic (#37087)
* remove arabic
* more
* bump opendbc (#37091)
* long_mpc: use log.capnp source enum instead of list (#37093)
* Revert "long_mpc: use log.capnp source enum instead of list" (#37095)
Revert "long_mpc: use log.capnp source enum instead of list (#37093)"
This reverts commit 7e959c5a3e.
* mici setup: remove unused functions
* fix mici setup int enum
* clips: improve overlays for mici (#37088)
* adjust overlay sizes and wrap metadata text for mici
* comment
* adjust overlay rendering to dynamically calculate line height for wrapped metadata text
* render time first so we can use width in margin calculation
* update comment (to retry failed CI actually)
* increase metadata size on mici
* longitudinal mpc tuning: behind if main (#37099)
* longitudinal mpc tuning report: add sinusoidal oscillation scenario (#37100)
* long_mpc: use log.capnp source enum (#37096)
* Calibrate in tg (#36621)
* squash
* bump tg
* fix linmt
* Ready to merge
* cleaner
* match modeld
* more dead stuff
* long mpc: state name before subscript (#37101)
* clip: clean up imports (#37104)
* wtf is this
* don't break import timing
* they are the same
* clean up
* good catch
* rm common/mat.h
* Remove all the OpenCL (#37105)
* Remove all the OpenCL
* lil more
* bump msgq
* clip: use wrap_text helper (#37102)
* they are same
* no duplication!
* rm rstrip
* bump opendbc (#37108)
bump
* Delete less dialogs (#37111)
* try
* revert
* this is fine
* revert tg calib and opencl cleanup (#37113)
* Revert "Remove all the OpenCL (#37105)"
This reverts commit d5cbb89d84.
* Revert "rm common/mat.h"
This reverts commit 4ce701150a.
* Revert "Calibrate in tg (#36621)"
This reverts commit 593c3a0c8e.
* fix: route fetch metadata when first log isnt uploaded (#37114)
* fix: route fetch metadata when first log isnt uploaded
* default
* simple
---------
Co-authored-by: Trey Moen <treymoen@amazon.com>
* gitignore .context/
* ui diff replay: remove unused frame_data list for individual frame display (#37117)
Remove unused base64 encoding and simplify frame data handling in diff video report
* bridge: move ZMQ handling over (#37118)
* replace tabulate with simple helper (#37122)
* Better memory usage debugging (#37120)
* Revert "revert tg calib and opencl cleanup (#37113)" (#37115)
* Revert "revert tg calib and opencl cleanup (#37113)"
This reverts commit 51312afd3d.
* power draw is a lil higher
* just don't miss a cycle
* fix warp targets
* fix tinygrad dep
* CI: garbage collect tmp jenkins branches (#37125)
* Build vendored artifacts in CI (#37127)
* Build vendored artifacts in CI
* parallel
* deterministic
* fix up
* fix gitignores
* lil more
* lil more consistency
* remove get_mcu_type from pandad.py (#37132)
* Chunk big model files (#37134)
* file chunking
* try this
* more cleanup
* cleaner
* ui: delay nav bar animation (#37137)
* from da bounce
* try this
* you can get it to clean up wow
* modeld: simplify model run processing (#37138)
Hi! The point of this pr is to make the model run easier to read. On the latest tinygrad numpy().flatten() empirically does the same thing as the internal contiguous().realize().uop.base.buffer.numpy(). numpy() is also documented (docstrings), which can assist new contributors in learning what each potential execution does. Torq_boi or yassine, I know you want proof in the code base, so here it is. As of tinygrad commit 2f55005:
in tinygrad_repo/tinygrad/tensor.py
Lines 316-318 (def _buffer): ensure the tenso is contiguous() and realized() before accessing the raw buffer.
Line 378 (def numpy): Wraps the buffer access and adds a reshape to match the tensor shape.
self._buffer() is what executes contiguous().realize() and returns the buffer object.
Calling numpy() on that buffer object returns a 1D array (defined in tinygrad/device.py:193 via np.frombuffer).
The reshape(self.shape) at the end of Tensor.numpy() then adds dimensions to that 1D array. The added .flatten() removes those dimensions, flattening it back to a 1D array. Effectively the same as what is currently done, but less complex.
* Revert "Chunk big model files (#37134)" (#37139)
This reverts commit a941e8f78f.
* Process replay: move refs to ci-artifacts (#37049)
* rm upload
* use ci-artifacts
* sanitize
* rm ref_commit
* add ci
* handle exept
* bootstrap
* always
* fix
* replay
* keep ref_commit fork compatibility
* remove upload-only
* apply comments
* safe diffs in master
* Revert "safe diffs in master"
This reverts commit 369fccac786a67799193e9152488813c6df20414.
* continue on master diff
* Update .github/workflows/tests.yaml
Co-authored-by: Shane Smiskol <shane@smiskol.com>
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* fix first-interaction action inputs for v3 (#37144)
v3 renamed inputs from kebab-case to snake_case (repo-token -> repo_token,
pr-message -> pr_message). The old names were silently ignored, causing
"Input required and not supplied: issue_message" errors.
* bump create-pull-request action to v8.1.0 (#37143)
The pinned SHA was v6.0.4, which is incompatible with actions/checkout@v6
and causes a "Duplicate header: Authorization" 400 error during git
remote operations. See peter-evans/create-pull-request#4272.
* bump numpy to 2.4.2 (#37145)
* show dependency tree in weekly uv lock job (#37146)
* Revert "DM: Ford GT model" (#37148)
Revert "DM: Ford GT model (#37013)"
This reverts commit 1459d3519d.
* remove dead multilang for mici (#37150)
* ui: remove dead side button (#37151)
* rm side button
* fix
* fix
* BigButton: fix alignment and style (#37153)
* correct from bottom alignment
* temp
* fix scale animation w/ btn_y
* home settings are always 64
* cleanup
* some clean up
* make 23 const
* rev
* more
* remove azure deps (#37084)
* remove azure deps
* fix lint
* restore scripts
* [bot] Update Python packages (#37147)
* Update Python packages
* fix
* bump panda
* revert tinygrad
---------
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* remove pytest-repeat (#37156)
* BigButton: push up all content when pressed (#37157)
clean implementation
* ui.py: fix stride (#37159)
fix uii.py
* BigButton: don't round drawn content (#37158)
* unround icons
* unround rest
* Revert tgwarp again (#37161)
* Reapply "revert tg calib and opencl cleanup (#37113)" (#37115)
This reverts commit 667f3bb32f.
* revert msgq too
* msgq on master
* newline in updater error
* Remove vertical scroll bar
* Simple scroll indicator (#37162)
* scroll indicator
* 65%
* calibrate
* margin
* cleaner?
* manual clean up
* clean up
* full scroll bar
* look
* looks
* unlook
* no fade, looks good but "too much"
* clean up
* cmt
* Scroll panel: adapt to content size shrinking (#37163)
fix
* WifiManager: sort by known networks (#37164)
sort by known
* mpc tuning report: minor improvements (#37167)
---------
Co-authored-by: David <49467229+TheSecurityDev@users.noreply.github.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: ugtthis <142481257+ugtthis@users.noreply.github.com>
Co-authored-by: royjr <royjr96@gmail.com>
Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Co-authored-by: felsager <76905857+felsager@users.noreply.github.com>
Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Trey Moen <50057480+greatgitsby@users.noreply.github.com>
Co-authored-by: Trey Moen <treymoen@amazon.com>
Co-authored-by: Andi Radulescu <andi.radulescu@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Daniel Koepping <elkoled@gmail.com>
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
* init
* more
* change
* exist
* better title
* adjust
* more
* seems better
* slightly more
* slightly more
* center it
* final
* move
* no bc ew
* more less
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* sunnypilot: remove Qt
* cabana: revert to stock Qt
* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9
* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e
* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e
* sum more
* bump opendbc
* not yet
* should've been symlink'ed
* raylib says wut
* quiet mode back
* more fixes
* no more
* too extra red diff on the side
* need to bring this back
* too extra
* let's update docs here
* Revert "let's update docs here"
This reverts commit 51fe03cd51.
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* multi-button
* Lint
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* Panels. With Icons. And Scroller.
* patience, grasshopper
* more patience, grasshopper
* sp raylib preview
* fix callback
* fix ui preview
* add ui previews
* introducing ui_state_sp for py
* param to control stock vs sp ui
* better
* add ui_update callback
* better padding
* init
* revert padding to 20
* new line, who dis
* this
* support for next line multi-button
* use inline=false
* uhh
* disabled colors
* hide em all
* lambdas
* NOT inline
* final touches
* hide HIDE
* ruff.. RUFF.. WHY RUFF
* listitem -> listitemsp
* Revert "add ui_update callback"
This reverts commit 4da32cc009.
* add show_description method
* remove padding from line separator.
like, WHY? 😩😩
* scroller -> scroller_tici
* scroller -> scroller_tici
* remove line separator padding
* ui: `GuiApplicationExt`
* add to readme
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* uhhh. nope
* optimizations
* I THINK this is not needed, i don't see it used on the visuals panel...
* unhide for now... Why hidden tho?
* refresh controls
* missing
* blindspot
* standstill timer
* road name toggle
* more descriptions
* more descriptions
* update desc
* param turn signals
* sort
* fix
* always show desc if not available
* should be bool
* rocket fuel
* steering arc
* lint
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* init
* lint
* add toggle
* Update params_keys.h
* Update params_metadata.json
* Update params_keys.h
* bool
* decouple
* no
* make it perfect
* fade it
* only with torque bar
* dynamic
* in another PR
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* sla ui
remove dub
debug ahead
postition
maybe
posttion
think
* sunny will be mad
Reapply "test"
This reverts commit 7a35fd3053425b06c1e4cebf68b6c9676eb6e279.
Revert "test"
This reverts commit 1a79155d3cfc8e6e09a6fc38d13747883745ef6a.
test
* road name
* Revert "road name"
This reverts commit 02e69b008603c357f14b4793e8fc893e00b3d3a0.
* decouple
* dial it in
* match cur
* no magic numbers
* cleanup
* more cleanup
* match
* always draw ahead
* Revert "always draw ahead"
This reverts commit f695e00078.
* new
* type
* Revert "type"
This reverts commit 2dafa02407.
* default
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* mici turn signal for c3x
* sp dir
* decouple
* more
* ty
* refactor and slim down
* bigger
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* Panels. With Icons. And Scroller.
* patience, grasshopper
* more patience, grasshopper
* sp raylib preview
* fix callback
* fix ui preview
* add ui previews
* Option Control
* Need this
* introducing ui_state_sp for py
* param to control stock vs sp ui
* better
* add ui_update callback
* better padding
* this
* listitem -> listitemsp
* Revert "add ui_update callback"
This reverts commit 4da32cc009.
* add show_description method
* remove padding from line separator.
like, WHY? 😩😩
* simplify
* I. SAID. SIMPLIFY.
* AAARGGGGGG.....
* init
* option control value fix
* add all controls
* hide all controls
* lint
* scroller -> scroller_tici
* scroller -> scroller_tici
* ui: `GuiApplicationExt`
* add to readme
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* optimizations
* Removed hide for now
* refresh controls
* ugh
* global brightness
* initialize
* inline everything again
* change name
* Onroad Brightness reimpl
* Custom Interactive Timeout reimpl
* Global Brightness Override reimpl
* keep stock
* ui: Custom Interactive Timeout
* rename
* ui: Customizable Onroad Brightness
* lint
* lint
* Revert "Global Brightness Override reimpl"
This reverts commit 53522da4f8.
* Revert "Custom Interactive Timeout reimpl"
This reverts commit 459863a9bb.
* Revert "Onroad Brightness reimpl"
This reverts commit 4092d23e57.
* fixes
* lint
* reset on show/hide
* reset on show/hide for mici
* only set if true
* wrong var
* try this out
* use clear
* starts cleanup
* wake for all visual alerts and handle timeouts
* fixup: wake for all visual alerts and handle timeouts
* handle always wake if there's an event properly
* some
* slightly more
* need this back
* Reapply "ui: Global Brightness Override (#1579)"
This reverts commit a0c10be1ff.
* do not touch light sensor logic
* override properly and clip to 30% minimum
* wrap
* lint
* update immediately
* read
* max global brightness
* rename
* gotta do it for mici too lol
* update metadata
* desc
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* ui: Customizable Onroad Brightness
* fixes
* lint
* reset on show/hide
* reset on show/hide for mici
* only set if true
* wrong var
* try this out
* use clear
* starts cleanup
* wake for all visual alerts and handle timeouts
* fixup: wake for all visual alerts and handle timeouts
* handle always wake if there's an event properly
* some
* slightly more
* need this back
* Reapply "ui: Global Brightness Override (#1579)"
This reverts commit a0c10be1ff.
* do not touch light sensor logic
* override properly and clip to 30% minimum
* wrap
* lint
* update immediately
* read
* max global brightness
* rename
* gotta do it for mici too lol
* revert
* Revert "revert"
This reverts commit 121a082de1.
* no more
* ui
* more
* intenum
* simplify ONROAD_BRIGHTNESS_TIMER_VALUES
* no more toggle
* 15 seconds countdown for auto dark regardless
* auto dark refinement
* only consume if expired
* immediately set
* rename
* update sl metadata
* no more
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* modeld: configurable camera offset
Negative Values: Shears the image to the left, moving the models center to the Right.
Positive Value: Shears the image to the right, moving the models center to the Left.
* modeld: camera offset class
* verify zero offset I @ A = A
* slithered and slunked
* Update params_metadata.json
* wait
* Update model_renderer.py
* Update model_renderer.py
* requested changes
* stricter
* Update model_renderer.py
* more
* return default
* Update params_metadata.json
* final
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ui: improve layout and centering of bottom developer UI elements
* int
* less is more, y'all
* always show actual lat for all cars
* lint
* perfect
* cleanup
* too long
* inherit
* remove unused
* inir
* need to fix
* final
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* tos reimpl
* nah
* simpler
* check consent on sunnylink panel - mici
* slight cleanup
* rename
* keep it off
* decouple
* more rename
* more decouple
* a bit more
* fix state
* decouple more
* a bit more
* wrong type
* rearrange
* don't do that
* final
* lint
* include
* more
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* sunnypilot: remove Qt
* cabana: revert to stock Qt
* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9
* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e
* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e
* sum more
* bump opendbc
* not yet
* should've been symlink'ed
* raylib says wut
* quiet mode back
* more fixes
* no more
* too extra red diff on the side
* need to bring this back
* too extra
* let's update docs here
* Revert "let's update docs here"
This reverts commit 51fe03cd51.
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* multi-button
* Lint
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* sp raylib preview
* fix callback
* fix ui preview
* better padding
* this
* support for next line multi-button
* uhh
* disabled colors
* listitem -> listitemsp
* listitem -> listitemsp
* add show_description method
* remove padding from line separator.
like, WHY? 😩😩
* ui: `GuiApplicationExt`
* simple button
* simple button
* add to readme
* use gui_app.sunnypilot_ui()
* i've got something to confessa
* init
* more init
* power buttons always visible
* uh, nope
* add reset to offroad only
* support wake up offroad
* flippity floppity
* dual button item sp
* use dual button item sp
* lint
* keep @devtekve from going blind
* more round
* some
* revert
* slight diff
* should've been inline
* cleanup power btns and offroad transitions
* bruh
* 1st row red diff
* 2nd row red diff
* 3rd row red diff
* slight diff
* move around
* more diff
* only when onroad we move to the top, not the toggle
* nah
* sort
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
* chevron info
* sp dir
* rename
* decouple from stock model renderer
* pain
* RED DIFF: get from ui state directly
* built in
* banned
* no magic
* space
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* rainbow
* use monotonic
* sp dir
* lint
* decouple from stock model renderer
* call in ui state directly
* it's a boolean
* too long
* nope
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* feat: add blocked parameter names
* add unit test to validate
* test: use cached method
* move it out
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* support ecdsa for mici
* lint
* ugh
* ugh ughain
* more
* symmetrical AES key derivation and some missing key handling
* cleanup
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* init
* add only colors
* fix LAT_ONLY on mici
* better ball
* hide wheel on LONG_ONLY
* hide torquebar on LONG_ONLY
* simpler
* dont block demo
* path only on long
* lanelines only on lat
* hide on override
* better
* same LANE_LINE_COLORS for mads
* use mads colors
* Revert "use mads colors"
This reverts commit 556321e5debe44e33d4ad98f440f0ed9f961fdf5.
* slight decouple confidence ball
* slight decouple model renderer
* slight decouple augmented road view
* decouple status update
* decouple and override with our own, no overriding with steering if long only
* fix
* fix it
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* devui
* clean up
* clean up
* optimize text measurement for better rendering performance
* sp dir
* decouple from stock HudRenderer
* rename
* fetch mode in _update_state
* wrong type
* start decoupling elements
* decouple elements
* un-ew this pls
* fully decouple developer UI elements
* rename
* more decouple
* full send
* final
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
This PR aims to fix sunnypilot pytest that was broken on MacOS due to calling capnp to_dict, which isn't supported on pycapnp library for Mac.
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* comma four: fix missing WiFi show_event (#36858)
* can't do this
* can do this
* comma four: rm duplicate wifi show_event
* comma four: fix WiFi panel not starting at the top (#36859)
* fix
* fix
* NavWidget: disable nav bar for vertical scrollers (#36857)
* disable nav bar vert scroller
* cmt
* ui: improve network sort (#36855)
* better sort
* clean up
* comma four: reset WiFi SSID scroll on show (#36861)
reset scroll
* WifiUi: fix infinite wraps (#36863)
* fix infinite wrap
* fix selection
* Revert "fix selection"
This reverts commit 555c57922409312bf5d9efedf571994f157b9e44.
* revert
* revert
* revert
* revert
* cleaner
* cleaner
* mypy!!
* WifiUi: remove delayed network panel open (#36865)
not used
* comma four: fix WiFi scroll to (#36864)
* fix selection
* stash
* Revert "stash"
This reverts commit d04ed66b090641072c86b8ed7ed86dbdbf67fbd9.
* clean up
* clean up
* move
* fix
* WifiUi: pause updates while user is scrolling (#36866)
* pause updates while user is scrolling
* clean up
* WifiUi: pause updates while user is interacting (#36868)
int not scroll
* Widget: implement layout function (#36869)
* we can implement layout to fix flashing
* reorder
* fix faster than normal snap and reduce duplicate calculations
* yes
* comma four: follow current network (#36862)
* stay
* whoops
* whoops
* fix
* fix div by z
* we can implement layout to fix flashing
* Revert "we can implement layout to fix flashing"
This reverts commit 7278a1e2a6117aec775ef4fabee2fd68b3d064f3.
* random
* clean up
* wtf
* rev
* smooth
* we can implement layout to fix flashing
* snap looks so much better
* fix
* rev
* better name
* cmt
* less random
* even less random
* simpler
* cmt
* clean up
* clean up
* clean up
* GuiScrollPanel2: fix possible crash (#36870)
fix crash
* WifiUi: tweak unselected button size (#36871)
looks too spaces
* rm dead unlog_ci_segment.py
* joystickd: add cruise control resume (#36876)
* Add cruise control resume logic based on conditions
* simple
* bump opendbc (#36878)
* bump
* update docs
* bump
* gotta go fast
* sensord: remove last of dual IMU support (#36881)
* Toyota: prevent roll in ICE after pressing resume while wanting to stay stopped (#36877)
* bump
* only show alert when user can leave standstill
* cmt
* stash
* bump
* bump to master
* test_onroad: absolute memory usage test (#36885)
* test_onroad: absolute memory usage test
* show msgq size
* reduce a little
* bump msgq
* Revert "bump msgq"
This reverts commit 683d0ae9fc754f7b72e2bc4b256e9a3b0a60a127.
* Reduce pub-sub memory usage by 10x (#36884)
less mem
* four: hide untoggleable toggles (#36890)
* hide toggles
* enabled is redundant
* bump msgq (#36891)
* bump msgq
* update prefix
* ui: generic hold gesture (#36893)
* generic
* fix
* use in home
* clean up
* rm
* clean up
* four: simpler steer saturated alert (#36894)
* looks good
* fix
* cleanup
* test_onroad: relax memory threshold (#36895)
* Update RELEASES.md for version 0.10.3
* Update RELEASES.md
* ui: override default interactive timeout (#36898)
* impl
* fix one place
* don't need in setup
* fix onboarding
* need here too
* ui: default text color 90% white (#36899)
default 90%
* onboarding: fixup DM RHD detection (#36900)
* helper
* fix
* use it
* prop
* bigger box
* huh
* comma four: simpler DM onboarding (#36896)
* rm confirm mode
* kinda works
* how
* disabled
* do this
* do this
* wait
* here
* something
* fade in
* 4s
* clean up
* copy
* help
* 30deg center
* stuff
* reset_interactive_timeout
* rm
* simple
* simple
* copy
* 1.5x
* smooth opacity
* power off slider
* fix
* new icons and gradient and rounded
* final check
* fix
* how the hell did this work
* clean up
* clean up
* flip
* cmt
* uh yeah
* remove this
* revert this
* lint
* 45
* clean up
* fix
* no show time
* question
* rm
* no use
* ()
* lint
* call
* ui: fix not showing networks if viewing right after startup
* Fix tici DM dialog memory leak (#36790)
* not finished
* no
* debug
* clean up
* clean up
* Revert "ui: generic hold gesture (#36893)"
This reverts commit 9768109ec1.
* setup: go back to main page once connected (#36902)
* call
* break
* print
* fix
* rm
* debug
* fix
* yeah ideally wifiui has no clue about this
* clean up
* clean up
* clean up
* only need this
* cu
* rm
* fix
* CI: tmp disable macOS due to brew bug (#36906)
* need update?
* try this
* x
* just disable it
* lil more release notes
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: YassineYousfi <yyousfi1@binghamton.edu>
* ui: developer panel
* comment out
* double translate
* quickboot and more efficient file checking
* use HtmlModalSP!
* ui: `HtmlModalSP`
* less
* lint
* less
* just use existing dir on PC
* grammar
* match official
* rename
* biiig
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* sp raylib preview
* fix callback
* fix ui preview
* dialog txt
* compare vs what used to be done before InputDialog
* merge origin raylib toggles
* tree dialog
* less trees for the planet
* the heck
* save the trees we got icons
* Update process.py
* Remove 'sunnypilot_ui'
Removed 'sunnypilot_ui' parameter from params_keys.h
* Update raylib_screenshots.py
Removed the parameter setting for 'sunnypilot_ui' in the test.
* ui: fuzzy search helper
* better tree. fully dynamic and stuff
* rm
* more indent
* Squashed commit of the following:
commit 6b5b686fa5
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 24 17:16:17 2025 -0800
more indent
commit 76bc538ac7
Merge: 53eb821dc4c53e2134e2
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Mon Nov 24 17:15:48 2025 -0800
Merge branch 'master' into rl-tree-dialog
commit 53eb821dc4
Merge: 82e1ebe97e844f4cbc74
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Mon Nov 24 11:54:55 2025 -0800
Merge branch 'master' into rl-tree-dialog
commit 82e1ebe97e
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 24 10:23:35 2025 -0800
rm
commit da3ff45bb6
Merge: 41da513fcaa829a1b972
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 24 10:19:08 2025 -0800
Merge remote-tracking branch 'origin/rl-tree-dialog' into rl-tree-dialog
commit 41da513fca
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 24 10:18:43 2025 -0800
better tree. fully dynamic and stuff
commit b2950149fb
Merge: 4fb8e4beed924e5a3211
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 24 10:17:51 2025 -0800
Merge remote-tracking branch 'origin/input-dialog' into rl-tree-dialog
commit a829a1b972
Merge: 848290d07e9edc36ca66
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Mon Nov 24 10:16:28 2025 -0800
Merge branch 'master' into rl-tree-dialog
commit 4fb8e4beed
Merge: 848290d07eaf4f0f8372
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 24 10:16:20 2025 -0800
Merge remote-tracking branch 'origin/fuzzy-dialog' into rl-tree-dialog
commit af4f0f8372
Merge: 1d5f0ab2823cd55260d9
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Mon Nov 24 06:39:29 2025 -0800
Merge branch 'master' into fuzzy-dialog
commit 1d5f0ab282
Author: discountchubbs <alexgrant990@gmail.com>
Date: Sun Nov 23 11:28:59 2025 -0800
ui: fuzzy search helper
commit 848290d07e
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 21:08:07 2025 -0800
Update raylib_screenshots.py
Removed the parameter setting for 'sunnypilot_ui' in the test.
commit 6694928a46
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 21:06:57 2025 -0800
Remove 'sunnypilot_ui'
Removed 'sunnypilot_ui' parameter from params_keys.h
commit b3c90ef7b2
Merge: 0d3bc959c8457b6634fd
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 21:06:04 2025 -0800
Merge branch 'master' into rl-tree-dialog
commit 924e5a3211
Merge: a4ee4ba76dd92d2cb683
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 19:33:18 2025 -0800
Merge branch 'master' into input-dialog
commit a4ee4ba76d
Merge: e911de59684f13a0f775
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 16:24:31 2025 -0800
Merge branch 'master' into input-dialog
commit e911de5968
Merge: cea6e008190ba5cbea91
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 13:50:33 2025 -0800
Merge branch 'master' into input-dialog
commit cea6e00819
Merge: d7b8ce86ed8184cd8a6a
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 12:01:45 2025 -0800
Merge branch 'master' into input-dialog
commit 0d3bc959c8
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Wed Nov 19 20:29:30 2025 -0800
Update process.py
commit 4f3c19ffb5
Author: James Vecellio <alexgrant990@gmail.com>
Date: Wed Nov 19 20:28:59 2025 -0800
save the trees we got icons
commit ae5c44355d
Author: discountchubbs <alexgrant990@gmail.com>
Date: Wed Nov 19 13:38:04 2025 -0800
the heck
commit 066438ad10
Merge: 9532675814e74460f3a8
Author: discountchubbs <alexgrant990@gmail.com>
Date: Wed Nov 19 12:18:17 2025 -0800
Merge remote-tracking branch 'origin/rl-tree-dialog' into rl-tree-dialog
commit 9532675814
Author: discountchubbs <alexgrant990@gmail.com>
Date: Wed Nov 19 12:17:52 2025 -0800
less trees for the planet
commit e74460f3a8
Merge: c347db376a423a7d2ed0
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Wed Nov 19 09:37:44 2025 -0800
Merge branch 'rl-sp-toggles' into rl-tree-dialog
commit c347db376a
Author: discountchubbs <alexgrant990@gmail.com>
Date: Wed Nov 19 09:36:33 2025 -0800
tree dialog
commit c9bd67b261
Author: discountchubbs <alexgrant990@gmail.com>
Date: Wed Nov 19 09:34:08 2025 -0800
merge origin raylib toggles
commit d7b8ce86ed
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 17 20:21:33 2025 -0800
compare vs what used to be done before InputDialog
commit 2d3d104658
Merge: ded02895f4f1025f6ee9
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Mon Nov 17 19:24:20 2025 -0800
Merge branch 'master' into input-dialog
commit ded02895f4
Author: discountchubbs <alexgrant990@gmail.com>
Date: Mon Nov 17 19:22:01 2025 -0800
dialog txt
commit 9778a925b0
Merge: cb03d0839708e85808c5
Author: Jason Wen <haibin.wen3@gmail.com>
Date: Sun Nov 16 03:16:58 2025 -0500
input dialog
commit 423a7d2ed0
Author: nayan <nayan8teen@gmail.com>
Date: Sun Nov 16 11:15:28 2025 -0500
fix ui preview
commit e4e10d4b87
Author: nayan <nayan8teen@gmail.com>
Date: Sun Nov 16 11:15:22 2025 -0500
fix callback
commit 362e9ce04b
Author: nayan <nayan8teen@gmail.com>
Date: Sun Nov 16 09:53:28 2025 -0500
sp raylib preview
commit 3946e643f6
Author: nayan <nayan8teen@gmail.com>
Date: Sat Nov 15 20:24:20 2025 -0500
optimizations
commit 0c37a38596
Author: nayan <nayan8teen@gmail.com>
Date: Sat Nov 15 09:42:12 2025 -0500
Lint
commit 9c5acf61c0
Author: nayan <nayan8teen@gmail.com>
Date: Sat Nov 15 09:29:07 2025 -0500
SP Toggles
commit 121b304fe0
Author: nayan <nayan8teen@gmail.com>
Date: Sat Nov 15 09:28:58 2025 -0500
init styles
commit 47d848293b
Author: nayan <nayan8teen@gmail.com>
Date: Sat Nov 15 09:28:43 2025 -0500
param to control stock vs sp ui
* Squashed commit of the following:
commit 70ad001add
Merge: 142663c490844f4cbc74
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Mon Nov 24 11:54:58 2025 -0800
Merge branch 'master' into rl-progress-bar
commit 142663c490
Author: discountchubbs <alexgrant990@gmail.com>
Date: Sat Nov 22 20:12:44 2025 -0800
smoother updating
commit 4476e418dd
Author: discountchubbs <alexgrant990@gmail.com>
Date: Sat Nov 22 09:55:17 2025 -0800
easier to see
commit ad66c22e88
Merge: 0c46ef5948457b6634fd
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Sat Nov 22 07:45:05 2025 -0800
Merge branch 'master' into rl-progress-bar
commit 0c46ef5948
Author: discountchubbs <alexgrant990@gmail.com>
Date: Sat Nov 22 07:42:59 2025 -0800
freaking test dir
commit 11c19aad24
Merge: 7785238d548184cd8a6a
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date: Fri Nov 21 12:01:36 2025 -0800
Merge branch 'master' into rl-progress-bar
commit 7785238d54
Author: discountchubbs <alexgrant990@gmail.com>
Date: Wed Nov 19 07:47:10 2025 -0800
raylib: progress bar
* OSM panel
* fetching
* only show if fav_param is used in the call
* flattened and custom search query
* conditional for mypy
* sunny's new x,y makes this even easier!
* download all
* add back the rough estimate
* not sure i like the 'Download'
* simplify the path
* actual size as of today
* format
* more simple
* only show on download or delete
* loathing loathing, unadulterated loathing, i loathe it all
* loathing loathing, unadulterated loathing, i loathe it all
* # Conflicts:
# system/ui/sunnypilot/lib/styles.py
# system/ui/sunnypilot/widgets/tree_dialog.py
* search
* st
* Update osm.py
* one second updates:
its heavy process, which isnt really noticeable during downloads ayways. the once a second ensures responsiveness on the ui, while also maintaining 20fps on device for country/state downloads.
* efficient? i hope
* big boi texts
* big boi texts
* use our own classes
* need to clear all params when delete all
* more
* collateral lol
* do not behave as selected if canceled during US->States dialog
* more
* instead of timestamp, let's just show formatted time
* disable button when downloading dbs
* should be the buttons being disabled
* well gotta re-enable them too
* empty country
* might be bigger now
* fixes for mapd manager
* should stay as a json
* sanitize it a bit
* revert
* only nuke if the cancel button is called
* always try to update the labels
* Revert "always try to update the labels"
This reverts commit ba0988fc06.
* re-enable button after download is complete
* disable all while downloading (till we could cancel and re-download)
* fix progress bar not filling up as intended for smaller total counts
* revert
* use new
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* sp raylib preview
* fix callback
* fix ui preview
* dialog txt
* compare vs what used to be done before InputDialog
* introducing ui_state_sp for py
* raylib: input dialog
* raylib: SP Toggles
* raylib: SP Panels
* raylib: Option Control
* init
* param to control stock vs sp ui
* better
* tree dialog, progress bar widget cool stuff
* merge origin raylib toggles
* tree dialog
* less trees for the planet
* the heck
* add ui_update callback
* save the trees we got icons
* Update process.py
* yesssssssssss
* utilize ON_COLOR constant form op system
* Revert "add ui_update callback"
This reverts commit 4da32cc009.
* # Conflicts:
# system/ui/sunnypilot/widgets/list_view.py
# system/ui/sunnypilot/widgets/option_control.py
* Merge remote-tracking branch 'openpilot/master' into nov-19-sync
* ui: `GuiApplicationExt`
* add to readme
* scroller_tici :)
* use gui_app.sunnypilot_ui()
* # Conflicts:
# selfdrive/ui/layouts/main.py
# selfdrive/ui/sunnypilot/layouts/settings/cruise.py
# selfdrive/ui/sunnypilot/layouts/settings/display.py
# selfdrive/ui/sunnypilot/layouts/settings/models.py
# selfdrive/ui/sunnypilot/layouts/settings/navigation.py
# selfdrive/ui/sunnypilot/layouts/settings/osm.py
# selfdrive/ui/sunnypilot/layouts/settings/steering.py
# selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py
# selfdrive/ui/sunnypilot/layouts/settings/trips.py
# selfdrive/ui/sunnypilot/layouts/settings/vehicle.py
# selfdrive/ui/sunnypilot/layouts/settings/visuals.py
# system/ui/sunnypilot/widgets/option_control.py
* init value
* Remove 'sunnypilot_ui'
Removed 'sunnypilot_ui' parameter from params_keys.h
* Update raylib_screenshots.py
Removed the parameter setting for 'sunnypilot_ui' in the test.
* easier to see
* Update progress_bar.py
* try something
* adjust placement
* more simple
* smoothing updating components
* ui: fuzzy search helper
* ui_state_sp
* description!
* fuzzy af searching
* better tree. fully dynamic and stuff
* rm
* rearrange
* license
* idk how maybe the merge
* more indent
* more indent
* cleanup
* temporaily revert ui_state_sp
* only show if fav_param is used in the call
* conditional for mypy
* mypy
* conditional for mypy
* str concatenation to reduce line len
* level
* sunny's new x,y makes this even easier!
* refreshing half a second seems legit.
* software stuffs
* rm
* add
* loathing loathing, unadulterated loathing, i loathe it all
* loathing loathing, unadulterated loathing, i loathe it all
* # Conflicts:
# system/ui/sunnypilot/lib/styles.py
# system/ui/sunnypilot/widgets/tree_dialog.py
* search
* ds
* hide on advanced controls
* some
* handle toggle confirmation
* sunny, NO
* nayan, NO !!
* easier
* move
* move it!
* add more
* need to show current branch
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* sp raylib preview
* fix callback
* fix ui preview
* dialog txt
* compare vs what used to be done before InputDialog
* introducing ui_state_sp for py
* raylib: input dialog
* raylib: SP Toggles
* raylib: SP Panels
* raylib: Option Control
* init
* param to control stock vs sp ui
* better
* tree dialog, progress bar widget cool stuff
* merge origin raylib toggles
* tree dialog
* less trees for the planet
* the heck
* add ui_update callback
* save the trees we got icons
* Update process.py
* yesssssssssss
* utilize ON_COLOR constant form op system
* Revert "add ui_update callback"
This reverts commit 4da32cc009.
* # Conflicts:
# system/ui/sunnypilot/widgets/list_view.py
# system/ui/sunnypilot/widgets/option_control.py
* Merge remote-tracking branch 'openpilot/master' into nov-19-sync
* ui: `GuiApplicationExt`
* add to readme
* scroller_tici :)
* use gui_app.sunnypilot_ui()
* # Conflicts:
# selfdrive/ui/layouts/main.py
# selfdrive/ui/sunnypilot/layouts/settings/cruise.py
# selfdrive/ui/sunnypilot/layouts/settings/display.py
# selfdrive/ui/sunnypilot/layouts/settings/models.py
# selfdrive/ui/sunnypilot/layouts/settings/navigation.py
# selfdrive/ui/sunnypilot/layouts/settings/osm.py
# selfdrive/ui/sunnypilot/layouts/settings/steering.py
# selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py
# selfdrive/ui/sunnypilot/layouts/settings/trips.py
# selfdrive/ui/sunnypilot/layouts/settings/vehicle.py
# selfdrive/ui/sunnypilot/layouts/settings/visuals.py
# system/ui/sunnypilot/widgets/option_control.py
* init value
* Remove 'sunnypilot_ui'
Removed 'sunnypilot_ui' parameter from params_keys.h
* Update raylib_screenshots.py
Removed the parameter setting for 'sunnypilot_ui' in the test.
* easier to see
* Update progress_bar.py
* try something
* adjust placement
* more simple
* smoothing updating components
* ui: fuzzy search helper
* ui_state_sp
* description!
* fuzzy af searching
* better tree. fully dynamic and stuff
* rm
* rearrange
* license
* idk how maybe the merge
* more indent
* more indent
* cleanup
* temporaily revert ui_state_sp
* only show if fav_param is used in the call
* conditional for mypy
* mypy
* conditional for mypy
* str concatenation to reduce line len
* level
* sunny's new x,y makes this even easier!
* refreshing half a second seems legit.
* loathing loathing, unadulterated loathing, i loathe it all
* loathing loathing, unadulterated loathing, i loathe it all
* # Conflicts:
# system/ui/sunnypilot/lib/styles.py
# system/ui/sunnypilot/widgets/tree_dialog.py
* Update models.py
* Change BUTTON_DISABLED_BG_COLOR to a lighter shade
* I think this is it
* Update tree_dialog.py
* Update models.py
* Update models.py
* oops, angry f string
* bool
* Update ui_state.py
* Update ui_state.py
* wtf where'd the end quote go lol
* some
* more
* quick test
* Revert "quick test"
This reverts commit fb97afa54c.
* try this out
* use sp's
* cap
* how weird?
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* sp raylib preview
* fix callback
* fix ui preview
* sunnylink state
* introducing ui_state_sp for py
* poll from ui_state_sp
* cloudlog & ruff
* param to control stock vs sp ui
* better
* better padding
* this
* listitem -> listitemsp
* add show_description method
* remove padding from line separator.
like, WHY? 😩😩
* ui: `GuiApplicationExt`
* add to readme
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* fetch only when connected to network
* sponsor & pairing qr
* init panel elements
* backup & restore
* fruit loops
* update
* enable, disable, enable, disable
* handle layout updates
* not needed
* change it up
* better
* scroller -> scroller_tici
* optimizations
* remove Params
* fix button disablement
* ui_state_sp changes
* keep enabled
* add header text
* dad jokes?
* no
* lint? Lint!
* final touches
* add sp font
* use sp font
* some
* ui: add right-aligned value display support in `ListItem` (in another pr)
* display sunnylink device id
* display sunnylink device id and sponsor tiers
* ui: add right-aligned value display support in `ListItemSP`
* lint
* styles
* lint
* ui: introduce customizable value colors for `ButtonActionSP` and `ListViewSP`
* support
* convert to str
* disable if paired
* colored sponsors
* hide and disable pairing button if paired
* texts
* ui: sunnypilot sponsor tier color mapping
* lint
* dongle id for ui preview
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* sunnypilot: remove Qt
* cabana: revert to stock Qt
* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9
* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e
* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e
* sum more
* bump opendbc
* not yet
* should've been symlink'ed
* raylib says wut
* quiet mode back
* more fixes
* no more
* too extra red diff on the side
* need to bring this back
* too extra
* let's update docs here
* Revert "let's update docs here"
This reverts commit 51fe03cd51.
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* multi-button
* Lint
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* Panels. With Icons. And Scroller.
* patience, grasshopper
* more patience, grasshopper
* sp raylib preview
* fix callback
* fix ui preview
* add ui previews
* dialog txt
* compare vs what used to be done before InputDialog
* introducing ui_state_sp for py
* param to control stock vs sp ui
* better
* add ui_update callback
* better padding
* this
* support for next line multi-button
* uhh
* disabled colors
* listitem -> listitemsp
* listitem -> listitemsp
* Revert "add ui_update callback"
This reverts commit 4da32cc009.
* add show_description method
* remove padding from line separator.
like, WHY? 😩😩
* scroller -> scroller_tici
* scroller -> scroller_tici
* ui: `GuiApplicationExt`
* add to readme
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* lint
* no fancy toggles :(
* match them
* mici scroller - no touchy
* no
* more
* size adjustments
* fix scroller. yay
* ui vehicle panel: platform selector
* some brands
* platform selector
* bruh
* ui_state_sp
* o
* is_offroad() and format
* huh
* use in toggles panel
* ugh. no
* better & animated
* lint
* cleanup
* lint. LINT
* slight
* rebase
* no more
* rebae
* vic
* v
* # Conflicts:
# system/ui/sunnypilot/lib/styles.py
# system/ui/sunnypilot/widgets/helpers/fuzzy_search.py
* loathing loathing, unadulterated loathing, i loathe it all
* more changes!
* Update styles.py
* set visibility
* Update hyundai.py
* add padding
* use symlink on sp side
* use make from json and show all actual makes
* all done!
* Revert "all done!"
This reverts commit 595c45f057.
* reimpl onroad/offroad confirmation
* use global offroad directly
* ui: highlight on pressed, and less indent
* inherit MultiOptionDialog main buttons
* align top level folders to the edge properly
* lint
* lint
* handle folder presses too
* ui: overridable title and subtitle for `TreeOptionDialog`
* override TreeOptionDialog title and subtitle
* lint
* more
* ui: magnifying glass icon and new search bar style in `TreeDialog`
* cleanup
* ui: recreate search dialog with the latest query
* make model year but display as platform
* move into settings directory
* move into dir
* sync
* equality
* use singleton directly
* also use singleton directly
* inherit from base class
* include all brands
* added refresh
* always assume it's subaru
* slight
* split get brand
* hyundai changes
* tesla changes
* do not allow while offroad
* fix
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: nayan <nayan8teen@gmail.com>
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* Panels. With Icons. And Scroller.
* patience, grasshopper
* more patience, grasshopper
* sp raylib preview
* fix callback
* fix ui preview
* add ui previews
* dialog txt
* compare vs what used to be done before InputDialog
* introducing ui_state_sp for py
* param to control stock vs sp ui
* better
* add ui_update callback
* better padding
* this
* listitem -> listitemsp
* Revert "add ui_update callback"
This reverts commit 4da32cc009.
* add show_description method
* remove padding from line separator.
like, WHY? 😩😩
* scroller -> scroller_tici
* scroller -> scroller_tici
* ui: `GuiApplicationExt`
* add to readme
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* use gui_app.sunnypilot_ui()
* lint
* no fancy toggles :(
* match them
* mici scroller - no touchy
* no
* more
* size adjustments
* fix scroller. yay
* ui vehicle panel: platform selector
* platform selector
* bruh
* ui_state_sp
* huh
* rebase
* rebae
* vic
* # Conflicts:
# system/ui/sunnypilot/lib/styles.py
# system/ui/sunnypilot/widgets/helpers/fuzzy_search.py
* loathing loathing, unadulterated loathing, i loathe it all
* more changes!
* Update styles.py
* add padding
* use symlink on sp side
* use make from json and show all actual makes
* all done!
* Revert "all done!"
This reverts commit 595c45f057.
* reimpl onroad/offroad confirmation
* use global offroad directly
* ui: highlight on pressed, and less indent
* inherit MultiOptionDialog main buttons
* align top level folders to the edge properly
* lint
* lint
* handle folder presses too
* ui: overridable title and subtitle for `TreeOptionDialog`
* override TreeOptionDialog title and subtitle
* lint
* more
* ui: magnifying glass icon and new search bar style in `TreeDialog`
* cleanup
* ui: recreate search dialog with the latest query
* make model year but display as platform
* move into settings directory
* move into dir
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ui: highlight on pressed, and less indent
* inherit MultiOptionDialog main buttons
* align top level folders to the edge properly
* lint
* handle folder presses too
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* param to control stock vs sp ui
* init styles
* SP Toggles
* Lint
* optimizations
* sp raylib preview
* fix callback
* fix ui preview
* dialog txt
* compare vs what used to be done before InputDialog
* merge origin raylib toggles
* tree dialog
* less trees for the planet
* the heck
* save the trees we got icons
* Update process.py
* Remove 'sunnypilot_ui'
Removed 'sunnypilot_ui' parameter from params_keys.h
* Update raylib_screenshots.py
Removed the parameter setting for 'sunnypilot_ui' in the test.
* ui: fuzzy search helper
* better tree. fully dynamic and stuff
* rm
* more indent
* only show if fav_param is used in the call
* conditional for mypy
* sunny's new x,y makes this even easier!
* loathing loathing, unadulterated loathing, i loathe it all
* more changes!
* more changes!
* Update BUTTON_DISABLED_BG_COLOR to a lighter shade
* Update tree_dialog.py
* final
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* introducing ui_state_sp for py
* param to control stock vs sp ui
* better
* add ui_update callback
* Revert "add ui_update callback"
This reverts commit 4da32cc009.
* ui: `GuiApplicationExt`
* add to readme
* use gui_app.sunnypilot_ui()
* add cp_sp to ui_state_sp
* fix ui crash
* update params
* more
* slightly more
* add directly to the list
* nah
* move around
* rename
* call before param time tracker is updated
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* feat(params): add support for parameter metadata retrieval
- Introduced `getKeyMetadata` method for accessing metadata associated with params.
- Enhanced `getParamsAllKeysV1` to include metadata parsing and optional dynamic enum generation.
- Extended unit tests to verify metadata parsing, enum mapping, and edge cases.
* Revert "feat(params): add support for parameter metadata retrieval"
This reverts commit 865b695ff9.
* update: integrate params metadata management and unit tests
- Added `update_params_metadata.py` to manage and update parameters metadata.
- Enhanced `getParamsAllKeysV1` to include metadata for params.
- Created comprehensive tests (`test_params_metadata.py`, `test_params_sync.py`) to validate metadata integrity and params consistency.
* update: improve params metadata readability and enhance enums
- Renamed params titles for clarity and consistency.
- Added enum options and mappings to selected params for better usability.
* update: enhance params metadata with improved enum structures
- Replaced plain enum lists with detailed objects (`value`, `label`) for clarity.
- Standardized parameter options for consistency across metadata.
* update: add validation constraints to params metadata
- Introduced `min`, `max`, and `step` attributes for improved parameter range validation.
- Enhances user input handling and ensures consistency in metadata.
* lint
* more lint stuff and permissions
* does this suffice?
* more lint
* update: refine params type hinting and remove unused shebang
- Adjusted type annotation in `params_dict` for better compatibility.
- Removed unnecessary shebang from `test_params_metadata.py`.
* update: expand test coverage for params metadata validation
- Added detailed test cases to ensure metadata consistency (`options`, `constraints`, `titles`).
- Validates API response alignment with `params_metadata.json`.
* the finals
* names
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ci: add conditional swap creation to prebuilt workflow
- Dynamically creates an 8GB swap file on systems with less than 8GB RAM.
- Ensures builds complete reliably on low-memory environments.
- Introduced cleanup step to remove swap after workflow execution.
* Nice save
* clean
* reduce swap size in prebuilt workflow
- Adjusted swap file size from 8GB to 4GB to optimize resource usage.
* remove swap creation from prebuilt workflow
- Simplified workflow by removing dynamic swap file creation and cleanup.
- Adjusted resource management to rely on existing system resources.
* update sunnypilot build workflow to use explicit script calls
- Replaced `op` commands with explicit `/data/openpilot/tools/op.sh` script calls for better reliability and clarity.
* update sunnypilot build workflow to use systemd for process management
- Replaced `/data/openpilot/tools/op.sh` script calls with `systemctl` commands for improved compatibility and reliability.
- Ensures consistent resource management during start and stop operations.
* Splitting a bit the build then?
* split build steps in sunnypilot prebuilt workflow
- Added separate build steps for `modeld`, `modeld_v2`, and `locationd` with descriptive messages.
- Improves logging and clarity during the build process.
* limit locationd parallel processes aiming to help with resource consumption
* typo
* adding op's location d AND bumping to 4 cores for them
* Apply suggestion from @sunnyhaibin
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ui: add debug to display mouse coordinates
* cleanup
* use mouse x and y directly
* even less
* try this out
* ui: increase `scroll` delay in UI Preview
* sleep for clicks too
* don't lol
* try 1 secs
* try this out
* wait a sec before doing a screenshot
* nah
* ui: increase `scroll` delay in UI Preview
* sleep for clicks too
* don't lol
* try 1 secs
* try this out
* wait a sec before doing a screenshot
* nah
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* sunnypilot: remove Qt
* cabana: revert to stock Qt
* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9
* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e
* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e
* sum more
* bump opendbc
* not yet
* should've been symlink'ed
* raylib says wut
* quiet mode back
* more fixes
* no more
* too extra red diff on the side
* need to bring this back
* too extra
* let's update docs here
* Revert "let's update docs here"
This reverts commit 51fe03cd51.
* del snpe
* reset min for safety catch as we killed snpe
* uhhh
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
refactor(sunnylink): defer `SunnylinkApi` initialization to function scope
- Moved `SunnylinkApi` object creation into individual functions as needed.
- Prevents unnecessary initialization when the object isn't used.
* sunnylink: add statsd process and related telemetry logging infrastructure
- Introduced `statsd_sp` process for handling Sunnylink-specific stats.
- Enhanced metrics logging with improved directory structure and data handling.
* sunnylink: re-enable and refine stat_handler for telemetry processing
- Reactivated `stat_handler` thread with improved path handling.
- Made `stat_handler` more flexible by allowing directory injection.
* statsd: fix formatting issue in telemetry string generation
- Corrected missing comma between `sunnylink_dongle_id` and `comma_dongle_id`.
* update statsd_sp process configuration for enhanced readiness logic
- Modified `statsd_sp` initialization to include `always_run` alongside `sunnylink_ready_shim`.
- Ensures robust process activation conditions.
* refactor(statsd): enhance and unify StatLogSP implementation
- Replaced custom `StatLogSP` in sunnylink with centralized implementation from `system.statsd`.
- Ensures consistent logic for StatLogSP handling across modules.
* fix
* refactor(statsd): add intercept parameter to StatLogSP for configurable logging
- Introduced optional `intercept` parameter to `StatLogSP` to manage `comma_statlog` initialization.
- Updated usage in `sunnylink` to disable interception where unnecessary.
* Dont complain
* feat(statsd): add raw metric type and SunnyPilot-specific stats collection
- Introduced `METRIC_TYPE.RAW` for base64-encoded raw data metrics.
- Added `sp_stats` thread to export SunnyPilot params as raw metrics.
- Enhanced telemetry handling with decoding and serialization updates.
* refactor(statsd): improve `sp_stats` error handling and param processing
- Enhanced exception handling for `params.get` to prevent crashes.
- Added support for nested dict values to be included in stats.
* refactor(statsd): adjust imports and minor code formatting updates
- Updated `Ratekeeper` import path for consistency with the `openpilot` module structure.
- Fixed minor formatting for improved readability.
* refactor(statsd): update typings and remove unused NoReturn annotation
- Removed unnecessary `NoReturn` typing for `stats_main` to simplify function definition.
- Adjusted `get_influxdb_line_raw` to refine typing for `value` parameter.
* cleanup
* init
* init
* slightly more
* staticmethod
* handle them all
* get them models
* log with route
* more
* car
* Revert "car"
This reverts commit fe1c90cf4d.
* handle capnp
* Revert "handle capnp"
This reverts commit c5aea68803.
* 1 more time
* Revert "1 more time"
This reverts commit a364474fa5.
* Cleaning to expose wider
* feat(interfaces, statsd): log car params to stats system
- Added `STATSLOGSP` import and logging to capture `carFingerprint` in metrics.
- Improved error handling in `get_influxdb_line_raw` for robust metric generation.
* refactor(interfaces): streamline car params logging to stats
- Simplified logging by directly converting `CP` to a dictionary.
- Removed legacy stats aggregation for clarity.
* feat(sunnylink): enable compression for stats in SunnyLink
- Added optional compression for stats payload to support large data.
- Updated `stat_handler` to handle compression and base64 encoding.
* fix(statsd): filter complex types in `get_influxdb_line_raw`
- Skips unsupported types (dict, list, bytes) to prevent formatting errors.
- Simplifies type annotation for `value` parameter.
* fix(statsd): use `json.dumps` for string conversion in `get_influxdb_line_raw`
- Ensures proper handling of special characters in values.
- Prevents potential formatting issues with raw `str()` conversion.
* refactor(interfaces, statsd): update parameter keys for stats logging
- Renamed logged keys for better clarity (`sunnypilot_params` → `sunnypilot.car_params`, `device_params`).
- Ensures consistency across data logs.
* bet
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Use sunnypilot CARS.md, update number of supported cars, add comma
* Update device reference
* Update discord links to forum links
* Update references to -c3-new branches and release
* Update broken link to branches table
* Update README.md
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* sunnylink: introduce community popup with QR code embedding
- Added `SunnylinkCommunityPopup` widget to promote the sunnypilot Community Forum.
- Integrated a QR code generator and display for quick access.
- Updated `WiFiPromptWidget` to include a "Learn More" button triggering the community popup.
* sunnylink: adjust community popup styling for better layout
- Reduced font size of description text slightly for consistency.
- Decreased QR code dimensions to improve visual balance.
* Making more space out of thin air
* sunnylink: update community references to use forum links
- Replaced Discord links with Community Forum URLs for better alignment.
- Improved clarity in sponsorship instructions.
* sunnylink: update uploader button logic to support novice tier and above
- Adjusted the enable condition to include SponsorTier::Novice and above.
* sunnylink: improve uploader button visibility and accessibility logic
- Made uploader button conditionally visible based on user tier and settings.
- Clarified button label to specify testing purposes only.
* ci: use environment variable for PR label in query
- Replaced static `PR_LABEL` references with `${{ env.PR_LABEL }}` for consistency.
- Ensures flexibility and reduces hardcoded values in the workflow.
* does this work better?
* fuck this
* aight
* ci: integrate Discourse notifications and refactor notification logic
- Replaced Discord webhook notifications with Discourse topic updates.
- Introduced reusable `post-to-discourse` composite action.
- Added `test-discourse.yaml` workflow for debugging and verification.
* ci: adjust notification dependencies and prepare_strategy reference
- Updated `notify` step to depend on `prepare_strategy` instead of `build`.
- Adjusted variable references to use `prepare_strategy` outputs.
* Forcing debug
* ci: update environment variable references and add commit information
- Switched `PUBLIC_REPO_URL` source to environment variable for consistency.
- Added commit SHA variables to enhance template generation logic.
* more tweaks!
* more tweaks!
* bad bot lmao
* Test?
* i mean....
* i mean....
* getting there
* testing the if
* testing the if
* ci: re-enable notify steps for prebuilt workflow
- Uncommented `build` and `publish` dependencies.
- Restored conditional logic to trigger only for relevant events.
* ci: enhance Discourse action to support new topic creation
- Added support for creating new topics with `category-id` and `title`.
- Improved input validation and response handling for flexibility.
* ci: improve conditions for prebuilt workflow notifications
- Refined `if` clause to ensure branches in `DEV_FEEDBACK_NOTIFICATION_BRANCHES` are targeted.
- Adjusted logic for accurate topic ID mapping in Discourse integration.
* forgot to rename
* Update developer_panel.cc
Changed mentions of "openpilot Longitudinal Control" to "sunnypilot Longitudinal Control" to align with other UI elements pointing users towards enabling "sunnypilot Longitudinal Control"
* Update warning message for longitudinal control
* more
* a bit more
* slightly more
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Speed Limit Assist: Disable for Tesla in release
* add test
* unused
* use constant
* eh
* flip
* universal it
* check release state and align in tests
* use this
* eh
* update changelog
* Speed Limit Assist: Disable for Rivian
* desc
* changelog
* Speed Limit Assist: Disable for Tesla in release
* add test
* unused
* use constant
* eh
* flip
* universal it
* check release state and align in tests
* use this
* eh
* update changelog
* version: a new beginning
* changelog
* singular
* show ours
* actual
* readjust
* updated
* more
* official spelling
* more
* sync
* fix
* send it
* push
* we never had this lol
* syncs
* ui: update ICBM-related settings handling
* oops
* oops
* single location
* some more
* fix cruise toggles
* always init true
* check this
* nah
* should be this
* Speed Limit Assist: update active event handling
* ok no more for non pcm long it was annoying
* 5 seconds preActive for non pcm long now
* Revert "5 seconds preActive for non pcm long now"
This reverts commit dfcc601035.
* dynamic alert size
* do the same here
* lint
* E2E Helper: universal state machine
* not used
* rename
* 10 frames for both
* time based
* magic
* lead depart: only arm if we have a confirmed close lead for over a second after allowing alert
* less
* shorter trigger
* lol
* always update
* resize & reposition
* Apply suggestion from @sunnyhaibin
* sir, this is Wendy's
* this is still a Wendy's
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
- Implemented a new toggle for enabling Dynamic Experimental Control (DEC) in longitudinal settings.
- Removed previous implementation for DEC from general settings.
- Updated accessibility based on longitudinal control status.
* Subaru: Stop and Go auto-resume support
* bump
* bump
* fix
* bump
* fix init
* wat
* use just standstill for now
* Revert "use just standstill for now"
This reverts commit f72cce6892.
* bump
* bump
* fix it
* only send at 10
* bump
* fix type
* forget about planner resume, it sucks
* try to send off_accel
* still need it
* always send
* disable safety checks for now
* same
* more
* all the time for both
* don't need i guess
* bump
* try 15 frames per try
* all should have it
* try 3 for all
* use throttle for all preglobal?
* bump
* bump
* separate thresholds between preglobal and global
* longer wait before sending
* shorter time but immediately resend
* quick
* new timeout
* about to cry
* same thing but another try
* no need
* round 3
* try 1.4
* lower!
* 1.2
* last try
* beta asf
* bump
* refactor: move to sp ui
* pr suggestion
* no need to check pcm just oplong
* no color, big front, long check
* Fix Rainbow Mode & Y Positioning
* Move param to uiscene
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: nayan <nayan8teen@gmail.com>
* UI: Make Always Offroad more accessible
* conditional - based on offroad
* no need to delete
* account for always offroad
* fix offroad transition
* do this inside updateState on every invoke
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* get blinker state from car_state
* Draw turn signals when blinker is active
* reloacted and resized turning signals
* add turn signal display setting
* Lowered Blink Frequency
* Moved x and y Offsets to drawing Function
Co-authored-by: Nayan <nayan8teen@gmail.com>
* Grouped Settings
* Moved blinking Logic to pulseElement Function
Co-authored-by: Nayan <nayan8teen@gmail.com>
* Improved Blinker Size and Position
* Get laneChangeBlocked Event from onroadEvents
* Draw Blinker red if laneChangeBlocked event is set
* Revert "Get laneChangeBlocked Event from onroadEvents"
This reverts commit 4310931b6cd59aed22119c2b4b558f09d3ad9c90.
* Get left and right Blindspot
* Replaced laneChangeBlocked by Blindspot checks
* slight optimization
* more refinement
---------
Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* enhance sunnylink fault handling and parameter checks
- Added `SunnylinkTempFault` to handle temporary registration issues.
- Updated methods to account for new fault state, improving robustness.
- Improved uploader logic by considering metered network restrictions.
* maybe it was overkill
* Lol, kinda important
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Reapply "sunnylink: enhanced param keys fetch with data type" (#1316)"
This reverts commit 282a8b093d.
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* UI: Make Always Offroad more accessible
* conditional - based on offroad
* no need to delete
* account for always offroad
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* maybe
Revert "fuck"
This reverts commit cb072a73b1b44ac3abeb50196be0956f3b7a7e14.
Revert "i dunno anymore"
This reverts commit 4d3c84ecb0e7830a552237e824995bc255007a1b.
i dunno anymore
fuck
* maybe
* try to fix the pipelines
relock after inplace metadrive update (#36256)
* relock after inplace metadrive update
* Revert "relock after inplace metadrive update"
This reverts commit 18193ffe34b66085e18605e6c9289ddcd658844d.
* just the hash
(cherry picked from commit 4d53a26a06)
Co-authored-by: Armand du Parc Locmaria <adpl33@gmail.com>
* refactor: enhance parameter handling and add new parameter retrieval method
- Refactored `get_param_as_byte` for better modularity and added `_to_bytes` helper function.
- Introduced `getParamsAllKeysV1` to retrieve all keys with enhanced metadata.
* refactor: update parameter handling and response structure in sunnylink
- Modified `_to_bytes` to accept `bytes` type for improved type consistency.
- Adjusted response keys in `sunnylinkd` for clarity.
* fix: update `get_param_as_byte` to use corrected method for default values
- Replaced `get_default` with `get_default_value` for accurate param retrieval.
- Ensures consistent handling of default parameter values.
* refactor: remove redundant `None` check in `sunnylinkd.py`
- Streamlined parameter iteration by eliminating unnecessary `None` validation.
- Simplifies logic for constructing `params_dict`.
* refactor: streamline `sunnylinkd` response by removing redundant `keys_v1` field
- Simplified return structure by excluding unused `keys_v1` key.
- Reduces response payload for improved efficiency.
* refactor: split `getParamsAllKeys` into distinct functions for improved clarity
- Added `getParamsAllKeysV1` to preserve original metadata-rich behavior.
- Revised `getParamsAllKeys` to return a simplified list of parameter keys.
* style: remove extraneous newline in `sunnylinkd.py`
- Ensures consistent formatting and adheres to style guidelines.
* Test
* Tesla: MADS full support with VEHICLE bus harness
* bump
* need new arg
* uh
* block cruise main for these cars still
* continue to block tesla
* oops
* always allow for tesla
* init
* fix
* event
* UI
* events..for real
* SP
* ugh
* toggles
* read params first
* stoopid it is
* fix green light img
* fix green light image. for real this time
* move events to longitudinal_planner
* move events to longitudinal_planner
* move e2e alerts to separate class
* fix
* fixxxxxxx
* blinky blink
* blinky blink
* refactor
* more refactor
---------
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* init
* fix
* event
* UI
* events..for real
* SP
* ugh
* toggles
* read params first
* stoopid it is
* fix green light img
* fix green light image. for real this time
* move events to longitudinal_planner
* move events to longitudinal_planner
* move e2e alerts to separate class
* green light alert only for this PR
* fix
* fixxxxxxx
* blinky blink
* blinky blink
* slight cleanup
* only used for params
* a bit more
* only when long is not engaged
* too long
* update description
* always 3 seconds if not moving
* initialize in constructor instead
* less
* rename
* always init at 0
---------
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* init
* bump
* bump
* bump
* recheck openpilot long availability
* bump
* bump
* bump
* bump
* bump
* just base for now
* bump
* bump
* bump
* bump
* flipped
* apparently it's yucky, reverting most
* bump
* need to add for toyota
* should've been remove
* flipped
* bump
* no way
* fix
* test sdsu distance
* final tuning for pedal
* bump
* init
* onroad brightness control
* new icon
* update touch handlling
* don't touch me
* now i feel every touch
* resolve review comments
* tired of this shit
* ugh
* translate
* duplicate
* fix
* adjust
* update param in the same function
* flip
* format
* reorder
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* init
* onroad brightness control
* new icon
* update touch handlling
* don't touch me
* now i feel every touch
* resolve review comments
* tired of this shit
* ugh
* just panel for now
* more
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
* formatting
* more
* create directory if does not exist
* mypy my bt
* policy param catch exceptions
* handle all params with exceptions
* more
* single method
* define types in init
* rename
* simpler op enabled check
* more mypy stuff
* rename
* no need for brake pressed
* don't reset if gas pressed
* type hint all
* type hint all
* back to upstream
* in another pr
* no longer need data type
* qlog
* slc in another pr
* use horizontal accuracy
* use horizontal accuracy
* set core affinity for all realtime processes
* unused
* sort
* unused
* type hint and slight cleanup
* from old implementation
* use directly
* combine pm
* slight more cleanup
* type hints
* even more type hint
* Revert "slc in another pr"
This reverts commit 3a6987e6
* Revert "in another pr"
This reverts commit a29bccff12.
* rebump
* no need to check alive
* use it directly
* fix test
* refactor
* use gps data directly
* quote...?
* lint
* fix tests
* use CC.longActive
* user confirm in another PR
* rename
* fix import
* params fix
* no more
* fix
* drop new state machine for now
* more fixes
* internalize output
* unused
* rearrange
* auto draft
* rename
* this
* no
* no need
* use existing
* wrong cruise speed
* fix
* not used for now
* Revert "not used for now"
This reverts commit f0083d6241.
* some
* use frames instead
* split speed limit resolver out of slc
* no need to pass sm
* fix params
* test init
* use frame instead of time
* track session
* some tests
* too limiting
* bump
* always reset state
* end session if long_active but slc inactive at any given time
* off
* no warning in this PR
* no speed factor engage type yet
* wide open
* no
* introduce disabled, no longer transitions at inactive
* fix tests
* no more tempinactive
* clean
* rename
* offset default > off
* new tests, fixes controller
* more tests
* not really needed yet
* lint
* fix
* some more tests
* wrap
* more
* more
* use vCruiseCluster for set speed
* init better
* finish it up
* no
* typo
* one method state machine
* refactor preactive timeout check
* refactor new session check
* directly return statuses
* comments
* v_target
* refactor speed limit resolver
* turn off debug
* more resolver refactor
* no longer needed
* lint
* more lint
* fix
* move around
* fix events
* update event
* already happens while in enabled
* add carstateSP
* less
* Speed Limit Control -> Speed Limit Assist
* in another PR
* more rename
* overriding state
* fix
* make sure to return the correct type
* sync with latest
* housekeeping
* use v cruise cluster instead
* fix var
* show it in UI!
* actually show it
* update event texts
* todo
* no override for now
* wrong timer!
* add vtarget and atarget
* fix
* handle no speed limit events
* fix size
* unused
* skip preActive if init max speed was already reached
* display last known speed limit and its state with SLA
* pending event
* much shorter disable guard
* update events
* convert max init for metric
* fix even if unused atm
* just use it
* red for all
* not disabled
* rename
* 10s pre active
* kumar wants it higher, blame him
* fix
* pcm long only
* some fixes
* rename
* use consolidate method to evaluate set speed status
* init non pcm cruise
* tests
* disable non pcm long state machine for now
* lint
* lint
* let the non PCM party begins
* fix event
* update event
* use speed limit final last
* only do direction checks if preActive
* use resolver
* use it directly
* no longer applies
* do it globally
* non pcm long: adapting or pending unused
* use button events instead of raw vals
* need to initialize
* move
* what?
* what #2???
* cst!
* circular
* slight fixes for tests
* change up checks for user confirm
* get buttonEvents at 100 hz and process for 20 hz consumption
* get v cruise cluster from outer loop
* Revert "get v cruise cluster from outer loop"
This reverts commit be8068e8ab.
* Revert "get buttonEvents at 100 hz and process for 20 hz consumption"
This reverts commit a739d4d437.
* don't need
* do not allow target speed confirm if inactive
* do not allow preActive if no valid speed limit
* gimme them arrow pls
* less
* descriptive direction
* fix event
* update cs in 100 hz
* Revert "don't need"
This reverts commit 1eec763be7.
* missed
* wrong
* stop
* throw them to helpers class
* property
* hold speed behavior changes
* abstract it
* use converted to check last set speed change
* Revert "do not allow target speed confirm if inactive"
This reverts commit 9840e74e
* pre active too short
* slight fixes
* fix tests
* linty lint
* speed limit changed hold timer for non pcm long
* should be 0
* less loopy
* some gates
* special sauce for sla
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* init
* desc
* llk welcome back
* more
* new param to write
* update mapd
* no migration
* no refactor for now
* exec
* rename
* bearing
* fix test
* lint
* ui: more speed limit improvements
- show speed limit offset with last valid speed limit
- show last valid speed limit if current speed limit is not valid
* rename
* round it
* update logic
* in its own var and 5 frames now
* new offset vals
* slightly more
* apply suggestions
* less for now
* always on and fix conv
* update api
* missed
* fix convert
* only draw when decreasing, seems like a bug from mapd
* use frame check, otherwise too jumpy
* only update when mapd updates
* count up and down
* introduce toggle
* more ui
* slightly wider
* desc
* rename
* slight cleanup
* fix offset position
* more vienna fix
* fix ahead alignment
* road name in another PR
* cleanup
* single place
* adjust ahead distance display
* cleanup
* Near
* bump it
* cleanup logic
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* init
* some fixes
* move
* more
* old navd helpers
* bring back cereal
* fix linting
* more
* add to cereal first
* sp events
* lint
* implement in long plan
* fixme-sp
* refactor state machine
* wrong state
* start refactor controller
* some type hints
* init these
* enable debug print
* ui? ui!
* print them out
* fix spinner import
* fix path
* let's use gps chips directly for now
* service missing
* publish events
* no nav for now
* need to sub
* no car state speed yet
* missed event
* Car: `CarStateSP`
* fix tests
* bring back car state speed limit
* fix
* use old controller for now
* fix
* fix source
* type hints
* none for now
* formatting
* more
* create directory if does not exist
* mypy my bt
* policy param catch exceptions
* handle all params with exceptions
* more
* single method
* define types in init
* rename
* simpler op enabled check
* more mypy stuff
* rename
* no need for brake pressed
* don't reset if gas pressed
* type hint all
* type hint all
* back to upstream
* in another pr
* no longer need data type
* qlog
* slc in another pr
* use horizontal accuracy
* use horizontal accuracy
* set core affinity for all realtime processes
* unused
* sort
* unused
* type hint and slight cleanup
* from old implementation
* use directly
* combine pm
* slight more cleanup
* type hints
* even more type hint
* Revert "slc in another pr"
This reverts commit 3a6987e6
* Revert "in another pr"
This reverts commit a29bccff12.
* rebump
* no need to check alive
* use it directly
* fix test
* refactor
* use gps data directly
* quote...?
* lint
* fix tests
* use CC.longActive
* user confirm in another PR
* rename
* fix import
* params fix
* no more
* fix
* drop new state machine for now
* more fixes
* internalize output
* unused
* rearrange
* auto draft
* rename
* this
* no
* no need
* use existing
* wrong cruise speed
* fix
* not used for now
* Revert "not used for now"
This reverts commit f0083d6241.
* some
* use frames instead
* split speed limit resolver out of slc
* no need to pass sm
* fix params
* test init
* use frame instead of time
* track session
* some tests
* too limiting
* bump
* always reset state
* end session if long_active but slc inactive at any given time
* off
* no warning in this PR
* no speed factor engage type yet
* wide open
* no
* introduce disabled, no longer transitions at inactive
* fix tests
* no more tempinactive
* clean
* rename
* offset default > off
* new tests, fixes controller
* more tests
* not really needed yet
* lint
* fix
* some more tests
* wrap
* more
* more
* use vCruiseCluster for set speed
* init better
* finish it up
* no
* typo
* one method state machine
* refactor preactive timeout check
* refactor new session check
* directly return statuses
* comments
* v_target
* refactor speed limit resolver
* turn off debug
* more resolver refactor
* no longer needed
* lint
* more lint
* fix
* move around
* fix events
* update event
* already happens while in enabled
* add carstateSP
* less
* Speed Limit Control -> Speed Limit Assist
* in another PR
* more rename
* overriding state
* fix
* make sure to return the correct type
* just slr in this one
* more
* update
* redundant
* fix
* fix
* lint
* fix
* fix
* match toggle
* fix priority checks
* fix combined source for picking 0 limit
* no need to wrap
* add speed limit offset to resolver
* add speed limit offset
* make sure it displays distance when higher
* Revert "make sure it displays distance when higher"
This reverts commit 15c6834d4e.
* some rename
* translations
* unused for now
* more
* lint
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* init
* slightly more
* check across all
* publish on CC_SP
* more infra setup
* try it out for HKG for now
* slight cleanup
* oops
* legacy
* send
* actually take over
* expose toggle
* icbm
* need to allow
* fix
* name
* small fixes
* actually send it now
* set default
* use cs is_metric
* offroad only lol
* allow them all
* fix
* send desire as-is
* use stock method
* clean up hysteresis
* speed cluster may be more accurate
* rename
* allow init and resume from pcmCruise
* just send it
* fix
* only allow custom v cruise after no button press at initial enabled
* no hysteresis for now
* fix tests
* fix min check
* only apply to non pcm changes
* add ICBM
* some more ui
* bump
* slight cleanup
* fixup
* cleanup
* type hints
* type hints
* bump
* bump
* bring back hysteresis
* fix ui
* do not spam if overriding or below allowed speed
* Controls: Vision Turn Speed Control
* fix
* Data type temp fix
* format
* more
* even more
* self contain targets
* state cleanup
* fix
* param updates
* no need
* use similar state machine
* raise exception if not found
* new state
* entirely internal
* use long active
* more
* rename and expose aTarget
* rename to SCC-V
* init tests
* slight tests
* expose toggle
* lint
* todo
* remove lat planner sub and mock sm data
* introduce aTarget
* rename
* rename
* update fill_model_msg.py to calculate PLAN_T_IDXS for lanelines and road edges
* sync upstream
* no SCC-V yet
* Revert "no SCC-V yet"
This reverts commit b67281bcac.
* wrap it with SCC main
* leave enabled out of here
* wat
* enabled and active on cereal
* OP long for now, enable for ICBM once merged
* need this
* unused
* let's go hybrid
* fix
* add override state
* update tests
* huh
* don't math here if not enabled
* ui: Smart Cruise Control - Vision (SCC-V) (#1253)
* vtsc-ui
* slight cleanup
* more cleanup
* unused
* a bit more
* pulse like it's hot
* draw only enabled and active
* let's try this for now
* settle
* finalize UI
* brighter color so we blind devtekve
* add long override
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* slight cleanup
* more
* type hints
---------
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
* Controls: Vision Turn Speed Control
* fix
* Data type temp fix
* format
* more
* even more
* self contain targets
* state cleanup
* fix
* param updates
* no need
* use similar state machine
* raise exception if not found
* new state
* entirely internal
* use long active
* more
* rename and expose aTarget
* rename to SCC-V
* init tests
* slight tests
* expose toggle
* lint
* todo
* remove lat planner sub and mock sm data
* introduce aTarget
* rename
* rename
* update fill_model_msg.py to calculate PLAN_T_IDXS for lanelines and road edges
* sync upstream
* no SCC-V yet
* Revert "no SCC-V yet"
This reverts commit b67281bcac.
* wrap it with SCC main
* no SCC-V yet
* noqa now
* fix
* OP long for now, enable for ICBM once merged
* type hints
* let's get it straight from carcontrol instead
* not needed
* unused
* add source to track
* we can do this
---------
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
* Add standstill timer to HUD
- Introduced a timer displaying elapsed time when the car is at a standstill.
- Added settings toggle to enable/disable this feature.
- Updated UI elements and related logic to support the standstill timer.
* ruff be happy
* stop screaming
* c stands for not cereal
* slight cleanup
* a bit more cleanup
* unused
---------
Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* modeld: add laneline_helper for plan X indices calculation
* spacing
* keep type hints
* openpilot
* sunnypilot/models/helpers
add modeld helpers to helpers
* Send it from each fill message
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Revert "UI: Developer UI (#1233)"
This reverts commit 1bb4ca2547.
* Reapply "UI: Developer UI (#1233)"
This reverts commit b0a77049da.
* QColorConstants is not on device's QT version. Thanks @kumar for the fix
* refactor: improve parameter handling in sunnylink for robustness
- Updated `get_param_as_byte` to return `None` for nonexistent parameters.
- Enhanced param compression and encoding in `sunnylinkd`.
* refactor: centralize parameter restoration with new helper function
- Added `save_param_from_base64_encoded_string` to handle param decoding and saving.
- Updated backup manager and sunnylinkd to use the new method.
- Improved code readability and reduced duplication in parameter handling logic.
* don't bother
* clean
* update: sunnypilot branch migrations for tici
* block onroad and notify
* type
* check channel type
* update
* ui init
* no search and locked list for tici
* whenever available
* Revert "bugfix: streamline LiveDelay parameter loading with safe handling (#1204)"
This reverts commit 288a5e14da.
* ui: use AlignedBuffer for cereal data processing for Models panel
* align
* separate
* split
* event it
* no more backup
* Revert "no more backup"
This reverts commit fa66ce5e77.
* Add model metadata lookup and update desire handling
* Bump selector version to 10
* meh
* Refactor shape mode parameters for desire handling in test buffer logic
* loop more models
* Refactor buffer handling for temporal inputs and streamline desire updates
* Refactor lateral control input handling and remove unused code
* Hotfix for the params stuff until I rework this properly and leverage the new data types
* Revert "Hotfix for the params stuff until I rework this properly and leverage the new data types"
This reverts commit c6031b29d92d3ff5b679ffce3ba53611bb2dba0e.
* refactor: enhance getParams function to support JSON and bytes types with optional compression
* refactor: add TODO for enhancing server support of metadata in sunnylinkd.py
* lint and clean
* refactor: update value handling in getParams to return decoded values for JSON serialization
* refactor: simplify params_dict initialization by removing type hint
* refactor: update response handling in getParams to include JSON serialization of params
* refactor: update response handling in getParams to include JSON serialization of params
* Add to dic types
* refactor: extract get_param_as_byte function for improved parameter handling and fix backup inconsistencies
* cleanup
* ensure error propagates on backup fail
* Add modelDataV2SP and lane turn logic implementation
Note: still need to hook up to other modeld's create unit test, fix stuff, and do the UI for it
* add unit tests for lane turn logic
* Add lane turn desire controls to models panel
* use `events_sp` instead of `events`
* integrate modelDataV2SP messaging to the other modeld controllers
* move this to that
* use min for general population here, on custom branches, change this to max :)
* Update events.py
Co-authored-by: royjr <royjr96@gmail.com>
* Update events.py
Co-authored-by: royjr <royjr96@gmail.com>
* refactor lane turn value control into one method
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/models_panel.cc
* add integration tests for lane turn desire
* 10 updates is possibly more representative of real life
* real objects ofc
* desc: add toggle description for clarity
---------
Co-authored-by: royjr <royjr96@gmail.com>
* feat: add support for copyparty-sfx
* feat: add toggle for Copyparty service in developer panel
* feat: enhance Copyparty configuration with additional volume mounts and options
* Update system/manager/process_config.py
* remove f string
* lint
* init model favorites
* fix fav buttons
* fix blank favs
* switch to ref
* new favs at top
* remove debug prints & add some comments
* button style
* fix current selection
* !@%#$%(@^%$#(@!%#^
* add last update date to folders
* Update to Readme.MD install instructions
This commit changes a few things in the installation guide. I moved the the tables that have the branches and install URLs. I also added a TIP that let's users know that they can install with sunnypilot/staging-c3-new.
* Update README.md with proposed changes from DevTek
Added header text over the legacy branches to bring in separation and let users know they are not recommended.
* bit of change
* Reorganizing a bit more
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* ci: add validate-test-on-staging-c3 branch to deployment triggers and enhance stable branch handling
* fix long overdue mistake lol
* ci: add condition to wait for start on push events in build workflow
* Fix extra version identifier
* no need for this, i validated what I needed
* only care for release tags, not any
* fix: update versioning logic to use build date and run number for tagging
* fix: update tagging logic and enhance commit message format in build scripts
* fix: refine tagging condition to exclude tag pushes for stable branches
* fix: add extra version identifier to output for better version tracking
* trying to keep things clean and simple
* bugfix
* ci: disable cancel-in-progress for publish concurrency
* check using var
* typo
* ci: update publish concurrency settings to use dynamic cancel-in-progress flag
* typoooo
* ci: update cancel-in-progress condition for publish concurrency
* ci: enhance publish concurrency handling to queue jobs based on commit SHA
* typos and new commit hash to test cancel in progress
* see if this helps?
* tired of waiting
* ci: add publish concurrency group to deployment configuration
* ci: update publish concurrency handling to improve job queuing and cancellation logic
* ci: output GITHUB_OUTPUT contents for better debugging of publish concurrency
* ci: remove prebuilt output from strategy and streamline GITHUB_OUTPUT handling
* ci: refine publish concurrency handling for flexible job cancellation
- Default `cancel_publish_in_progress` to `true` if undefined in config.
- Adjust concurrency group logic to handle null and true conditions properly.
* another ocmmit shouldnt cancel publish
* ci: enhance job cancellation logic for publish concurrency handling
* ci: add prepare_strategy job for dynamic deploy strategy extraction
* ci: ensure job execution always proceeds on success and skips failure
* ci: improve job execution conditions to handle cancellation and failure states
* ci: enhance versioning logic to support stable and unstable branch differentiation
* ci: add checkout step to ensure code is available for deploy strategy extraction
* ci: add extra version identifier for stable branch environments
* ci: update extra version identifier format for stable branches
* Grammar, oh, grammar.
* test this
* ci: add deploy strategy extraction and refactor publish dependencies
- Introduced `prepare_strategy` step to dynamically extract deployment configurations.
- Adjusted `publish` job to depend on `prepare_strategy` and use its outputs.
* what happens if I do this...
* cleaning
* other test
* ci: update auto_deploy logic in build configuration
* cleaning
* refactor: skip AGNOS update for tici models in launch script
* back to stock on chffrplus
* feat: enhance launch script for Tici model with error handling and fallback
* empty new line pls
* external storage
* fix mountStorage
* fix perms
* works for now
* better
* lagless
* move to sp qt
* orderish
* fix ui crash
* cleanup
* fix format
* offroad only
* debug external storage
* dont care about delete
* just use cloudlog
* show logs if using external storage
* better text
* wipe entire drive
* allow partitionless drive to be formatted
* label while formatting
* this works
* better
* cleaner
* cleaner logs
* keep upstream happy
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* modeld_v2: dynamify temporal buffer management.
* skip redundant reshaping and flattening.
* simplify MHP checks for lead and plan
* modeld_v2: add unit tests for buffer logic and refactor index mapping
* Let’s possibly fail a test :)
* Update test_buffer_logic_inspect.py
* Update test_buffer_logic_inspect.py
* modeld_v2: better temporal mapping for non-split
* Bump to 10 I guess
* Downgrade CURRENT_SELECTOR_VERSION to 9
* red diff ya know?
* add dynamic buffer update tests and compare against legacy logic.
Cover modelState.init and modelState.run
* send
* Revert "send"
This reverts commit 9e6c95fbfd.
* format
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ci: github runner auto off when voltage is above 9.0v .
This ensures that a runner in vehicle doesn't accidentally break everything lol.
* suggestion for clarity.
* refactor: rename and update handling of `GithubRunnerVoltage` parameter
- Improve clarity by renaming to `GithubRunnerSufficientVoltage`.
- Changed attribute to `CLEAR_ON_MANAGER_START` for improved runtime state management.
- No need for this value to be backed up!
* refactor: streamline voltage check for GithubRunnerSufficientVoltage
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
If param `InteractivityTimeout` does not exist, timeoutValue == "",
resulting in the Interactivity Timeout UI displaying "s" by default.
Fix displayed "Default" by checking for "0" or "".
Co-authored-by: Nayan <nayan8teen@gmail.com>
* wrap the params
* just 1 class and use a single param for now
* refactor
* fix
* cache itself
* no longer
* rename
* type hint
* in helpers instead
* lint
* all
* init as 0 to pass ci
* init as 0 to pass ci
* return_default
* fix init
* add LAT_SMOOTH_SECONDS directly in modeld, temp remove dynamic desc, red difffffffff
* Add tinygrad ref testing
* BaseDir and give a fake ref id to test
* one more before the real thing
* Add the correct ref
* test
* Update test_tinygrad_ref.py
* Update tinygrad_ref
* Update test_tinygrad_ref.py
* Update tinygrad_ref
* This SHOULD FAIL
* Revert "This SHOULD FAIL"
This reverts commit 58862f8a73.
* bit of red
* Move ref to models so compiled branches can read it
* step one
* step 2
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update tinygrad_ref.py
* Update build-all-tinygrad-models.yaml
* bump to fail test
* Revert "bump to fail test"
This reverts commit 4f58991f32.
* pytest should take care of it
* lint
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* why? because why not!? damn.
* test
* more disable
* i am hating this
* fuck mypy.
* hopefully this is fixing json
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ci: dynamic submodule check for build_release
* test opendbc diff
* somem fix
* this way
* use path
* use master branch instead
* less verbose
* test bump
* test 1 more sub change
* unbump
* only echo if there's a diff
* Tinygrad bump from sync-20250627
* bump tinygrad_repo
* Reformat metadata generator to match driving_models.json
* bump tinygrad
* Revert "bump tinygrad"
This reverts commit f479dfd502.
* revert me after SP model compiled
* Model recompiled successfully, initiate "revert me after SP model compiled"
This reverts commit 95706eb688.
* The "FillMe" placeholder caused an extra 10 seconds of work
* bump to 22Jul2025
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Allow more dynamic short names
This should hopefully be future-proof for now.. It's robust enough to return the correct word-digit format (see example on how it generates from given display name below):
'Last Horizon V2 (November 22, 2024)' -> LHV2
'Alabama (November 25, 2024)' -> ALABAMA
'PlayStation (December 03, 2024)' -> PLAYSTAT
'Postal Service (December 09, 2024)' -> PS
'Null Pointer (December 13, 2024)' -> NP
'North America (December 16, 2024)' -> NA
'National Public Radio (December 18, 2024)' -> NPR
'Filet o Fish (March 7, 2025)' -> FOF
'Tomb Raider 2 (April 18, 2025)' -> TR2
'Tomb Raider 3 (April 22, 2025)' -> TR3
'Tomb Raider 4 (April 25, 2025)' -> TR4
'Tomb Raider 5 (April 25, 2025)' -> TR5
'Tomb Raider 6 (April 30, 2025)' -> TR6
'Tomb Raider 7 (May 07, 2025)' -> TR7
'Down to Ride (Revision: May 10, 2025)' -> DTR
'SP Vikander Model (May 16, 2025)' -> SPVM
'VFF Driving (May 15, 2025)' -> VFFD
'Secret Good Openpilot (May 16, 2025)' -> SGO
'Vegetarian Filet o Fish (May 29, 2025)' -> VFOF
'Down To Ride (Revision: May 30, 2025)' -> DTR
'Vegetarian Filet o Fish v2 (June 05, 2025)' -> VFOFV2
'Kerrygold Driving (June 08, 2025)' -> KD
'Tomb Raider 10 (June 16, 2025)' -> TR10
'Organic Kerrygold (June 17, 2025)' -> OK
'Liquid Crystal Driving (June 21, 2025)' -> LCD
'Vegetarian Filet o Fish v3 (June 21, 2025)' -> VFOFV3
'Vibe Model [Custom Model]' -> VMCM
'Tomb Raider 13 (June 27, 2025)' -> TR13
'Aggressive TR (June 28, 2025)' -> ATR
'Tomb Raider 14 (June 30, 2025)' -> TR14
'Cookiemonster Tomb Raider (July 02, 2025)' -> CTR
'Down to Ride (Revision: July 07, 2025)' -> DTR
'Simple Plan Driving (July 07, 2025)' -> SPD
'Down to Ride (Revision: July 08, 2025)' -> DTR
'Tomb Raider 15 (July 09, 2025)' -> TR15
'Tomb Raider 15 rev-2 (July 11, 2025)' -> TR15R2
'Le Tomb Raider 14 (July 14, 2025)' -> LTR14
'Le Tomb Raider 14h (July 17, 2025)' -> LTR14H
'Tomb Raider 16 (July 18, 2025)' -> TR16
'Tomb Raider 16v2 (July 21, 2025)' -> TR16V2
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* No need to sleep 3 seconds, just send it
* try dynamic
* cleanup
* Update build-single-tinygrad-model.yaml
* bc devtekve said. also, this is repetitive af
* Revert "bc devtekve said. also, this is repetitive af"
This reverts commit 3a0c1562de.
* maybe we could use a script instead that both build all
That both build all and sunnypilot-build-model reference
* refactor: consolidate model building steps into a single workflow
* tweak
* tweakx2
* tweakx3
* tweakx4
* dunno dunno...
* output dir
* lots of changes
* Revert "lots of changes"
This reverts commit 4aadb0ee29.
* fail if all fail
* no inputs needed
* make it easier for us
* note failure and exit 0
* Update build-all-tinygrad-models.yaml
* not needed unless we really want it
* Update build-single-tinygrad-model.yaml
* Merge branch 'sync-20250627-tinygrad' of github.com:sunnypilot/sunnypilot into sync-20250627-tinygrad
* retry for failed ?
* always run this step because sometimes one build fails
which causes the matrix to fail, but most builds still have uploaded artifacts.
* strip
* no escape
* Update build-all-tinygrad-models.yaml
* Test case from terminal run
(openpilot) james@Mac sunnypilot % jq -c '[.bundles[] | select(.runner=="tinygrad") | {ref, display_name: (.display_name | gsub(" \\([^)]*\\)"; "")), is_20hz}]' \
/Users/james/Documents/GitHub/sunnypilot-docs/docs/driving_models_v6.json > matrix.json
mkdir -p output
touch "output/model-Tomb Raider 16v2 (July 21, 2025)-544"
touch "output/model-Space Lab Model (July 24, 2025)-547"
touch "output/model-Space Lab Model v1 (July 24, 2025)-548"
built=(); while IFS= read -r line; do built+=("$line"); done < <(
ls output | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
)
jq -c --argjson built "$(printf '%s\n' "${built[@]}" | jq -R . | jq -s .)" \
'map(select(.display_name as $n | ($built | index($n | gsub("^ +| +$"; "")) | not)))' \
matrix.json > retry_matrix.json
cat retry_matrix.json
[]
(openpilot) james@Mac sunnypilot %
* always
* great success
* add suffix to retry artifact so it doesn't conflict
* retry to get_model too
* and there haha
* unnecessary hyphen
* compare built to missing. include retries
* adjust copy of artifacts.
* Update build-all-tinygrad-models.yaml
* Update model selector versioning and add documentation
* Update retry condition for failed models in build-all-tinygrad-models.yaml
* Update retry condition for failed models in build-all-tinygrad-models.yaml
* Update build-single-tinygrad-model.yaml
* false
* default none because why not
* red diff? i think?
* meh ... not needed i guess
* error error error
* Nayan is watching... always watching mike wazowski
* string all the way
* lots of retries just in case because im scared
* more robust
* ONLY ONE!!!!!!
* delete.... a lot
* fix artifacts
* fix artifacts
* make sure each is unique :)
* skip files like artifact duhhhh
* artifact name dir
* concurrency
* copy here
* Update build-single-tinygrad-model.yaml
* Update build-single-tinygrad-model.yaml
* bump
* bump tinygrad
* max parallel? if not, i have the other remedy ready in build-all
* revert me!
* I resynced tinygrad woo hoo
* setup shouldnt fail
* pull
* big ole diff
* condition
* Update build-all-tinygrad-models.yaml
* not always() never always() never!!!
* not failure instead of great success
* Update build-all-tinygrad-models.yaml
* yay that worked. lets invoke build-single one last time
* these arent used and are just taking up 250MB space
* really frog?
* bump back to 3
* self-hosted, tici
* rename to trigger tests
* 2 and done
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Tinygrad bump from sync-20250627
* bump tinygrad_repo
* Reformat metadata generator to match driving_models.json
* bump tinygrad
* Revert "bump tinygrad"
This reverts commit f479dfd502.
* revert me after SP model compiled
* Model recompiled successfully, initiate "revert me after SP model compiled"
This reverts commit 95706eb688.
* The "FillMe" placeholder caused an extra 10 seconds of work
* bump to 22Jul2025
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* Allow more dynamic short names
This should hopefully be future-proof for now.. It's robust enough to return the correct word-digit format (see example on how it generates from given display name below):
'Last Horizon V2 (November 22, 2024)' -> LHV2
'Alabama (November 25, 2024)' -> ALABAMA
'PlayStation (December 03, 2024)' -> PLAYSTAT
'Postal Service (December 09, 2024)' -> PS
'Null Pointer (December 13, 2024)' -> NP
'North America (December 16, 2024)' -> NA
'National Public Radio (December 18, 2024)' -> NPR
'Filet o Fish (March 7, 2025)' -> FOF
'Tomb Raider 2 (April 18, 2025)' -> TR2
'Tomb Raider 3 (April 22, 2025)' -> TR3
'Tomb Raider 4 (April 25, 2025)' -> TR4
'Tomb Raider 5 (April 25, 2025)' -> TR5
'Tomb Raider 6 (April 30, 2025)' -> TR6
'Tomb Raider 7 (May 07, 2025)' -> TR7
'Down to Ride (Revision: May 10, 2025)' -> DTR
'SP Vikander Model (May 16, 2025)' -> SPVM
'VFF Driving (May 15, 2025)' -> VFFD
'Secret Good Openpilot (May 16, 2025)' -> SGO
'Vegetarian Filet o Fish (May 29, 2025)' -> VFOF
'Down To Ride (Revision: May 30, 2025)' -> DTR
'Vegetarian Filet o Fish v2 (June 05, 2025)' -> VFOFV2
'Kerrygold Driving (June 08, 2025)' -> KD
'Tomb Raider 10 (June 16, 2025)' -> TR10
'Organic Kerrygold (June 17, 2025)' -> OK
'Liquid Crystal Driving (June 21, 2025)' -> LCD
'Vegetarian Filet o Fish v3 (June 21, 2025)' -> VFOFV3
'Vibe Model [Custom Model]' -> VMCM
'Tomb Raider 13 (June 27, 2025)' -> TR13
'Aggressive TR (June 28, 2025)' -> ATR
'Tomb Raider 14 (June 30, 2025)' -> TR14
'Cookiemonster Tomb Raider (July 02, 2025)' -> CTR
'Down to Ride (Revision: July 07, 2025)' -> DTR
'Simple Plan Driving (July 07, 2025)' -> SPD
'Down to Ride (Revision: July 08, 2025)' -> DTR
'Tomb Raider 15 (July 09, 2025)' -> TR15
'Tomb Raider 15 rev-2 (July 11, 2025)' -> TR15R2
'Le Tomb Raider 14 (July 14, 2025)' -> LTR14
'Le Tomb Raider 14h (July 17, 2025)' -> LTR14H
'Tomb Raider 16 (July 18, 2025)' -> TR16
'Tomb Raider 16v2 (July 21, 2025)' -> TR16V2
* Update build-all-tinygrad-models.yaml
* Update build-all-tinygrad-models.yaml
* No need to sleep 3 seconds, just send it
* try dynamic
* cleanup
* Update build-single-tinygrad-model.yaml
* bc devtekve said. also, this is repetitive af
* Revert "bc devtekve said. also, this is repetitive af"
This reverts commit 3a0c1562de.
* maybe we could use a script instead that both build all
That both build all and sunnypilot-build-model reference
* refactor: consolidate model building steps into a single workflow
* tweak
* tweakx2
* tweakx3
* tweakx4
* dunno dunno...
* output dir
* lots of changes
* Revert "lots of changes"
This reverts commit 4aadb0ee29.
* fail if all fail
* no inputs needed
* make it easier for us
* note failure and exit 0
* Update build-all-tinygrad-models.yaml
* not needed unless we really want it
* Update build-single-tinygrad-model.yaml
* Merge branch 'sync-20250627-tinygrad' of github.com:sunnypilot/sunnypilot into sync-20250627-tinygrad
* retry for failed ?
* always run this step because sometimes one build fails
which causes the matrix to fail, but most builds still have uploaded artifacts.
* strip
* no escape
* Update build-all-tinygrad-models.yaml
* Test case from terminal run
(openpilot) james@Mac sunnypilot % jq -c '[.bundles[] | select(.runner=="tinygrad") | {ref, display_name: (.display_name | gsub(" \\([^)]*\\)"; "")), is_20hz}]' \
/Users/james/Documents/GitHub/sunnypilot-docs/docs/driving_models_v6.json > matrix.json
mkdir -p output
touch "output/model-Tomb Raider 16v2 (July 21, 2025)-544"
touch "output/model-Space Lab Model (July 24, 2025)-547"
touch "output/model-Space Lab Model v1 (July 24, 2025)-548"
built=(); while IFS= read -r line; do built+=("$line"); done < <(
ls output | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
)
jq -c --argjson built "$(printf '%s\n' "${built[@]}" | jq -R . | jq -s .)" \
'map(select(.display_name as $n | ($built | index($n | gsub("^ +| +$"; "")) | not)))' \
matrix.json > retry_matrix.json
cat retry_matrix.json
[]
(openpilot) james@Mac sunnypilot %
* always
* great success
* add suffix to retry artifact so it doesn't conflict
* retry to get_model too
* and there haha
* unnecessary hyphen
* compare built to missing. include retries
* adjust copy of artifacts.
* Update build-all-tinygrad-models.yaml
* Update model selector versioning and add documentation
* Update retry condition for failed models in build-all-tinygrad-models.yaml
* Update retry condition for failed models in build-all-tinygrad-models.yaml
* Update build-single-tinygrad-model.yaml
* false
* default none because why not
* red diff? i think?
* meh ... not needed i guess
* error error error
* Nayan is watching... always watching mike wazowski
* string all the way
* lots of retries just in case because im scared
* more robust
* ONLY ONE!!!!!!
* delete.... a lot
* fix artifacts
* fix artifacts
* make sure each is unique :)
* skip files like artifact duhhhh
* artifact name dir
* concurrency
* copy here
* Update build-single-tinygrad-model.yaml
* Update build-single-tinygrad-model.yaml
* bump
* bump tinygrad
* max parallel? if not, i have the other remedy ready in build-all
* revert me!
* I resynced tinygrad woo hoo
* setup shouldnt fail
* pull
* big ole diff
* condition
* Update build-all-tinygrad-models.yaml
* not always() never always() never!!!
* not failure instead of great success
* Update build-all-tinygrad-models.yaml
* yay that worked. lets invoke build-single one last time
* these arent used and are just taking up 250MB space
* really frog?
* bump back to 3
* self-hosted, tici
* rename to trigger tests
* split sync
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* ci: refactor PR handling with output file storage and streamlined input parsing
* try runner.temp
* base64 it
* simple simple
* double it and give it to the next person
* One more test
* Apply suggestions from code review
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* fix mapd folder
* not needed
* unnecessary
* Remove unused import from mapd_installer.py
Deleted the unused import of Paths from openpilot.system.hardware.hw to clean up the code.
* Undo changes
* update: adjust `mapd` process to conditionally start based on readiness
- Added `mapd_ready` function to check `mapd` readiness.
- Modified `mapd` process to use this readiness condition.
* update: bump mapd version to v1.10.0 and add readiness utility
- Updated `VERSION` to v1.10.0 for `mapd_installer.py`.
* update: integrate `MapdInstallManager` versioning into main thread
- Added a call to `MapdInstallManager.update_installed_version` with `VERSION`.
- Ensures version management for `mapd` is synchronized during runtime.
* refactor: centralize `MAPD_PATH` and `MAPD_BIN_DIR` definitions in module init
- Moved constants to `sunnypilot/mapd/__init__.py` for cleaner imports and reuse.
- Updated references in `mapd_manager.py` and `mapd_installer.py`.
* revert back the file permission
* do this
* no longer static
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Enhance parameter backup capabilities
- Added `BACKUP` attribute to various persistent parameters to ensure their inclusion in backup processes.
* Add more keys
---------
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
* add advancedControl bool to SP Controls
* add Advanced Controls toggle in SP Dev Panel
* merge - ui: Init Developer Panel SP#1054
* because @discountchubbs did not want to commit directly to the pr 🤷♂️
* enable onroad too
* hide by default only on staging & release
---------
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Fast boot mode
* Unused
* FastBoot -> QuickBoot
* Move down, since name change
* Chronological in manager too
* last one b4 merge
---------
Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Introduce zero inputs for Lead, and plan to conform with new SP model introduced Monday, July 7, 2025
* Clean this up
* We can revert this after dev-c3-new testing and ready to merge.
* This needs to be apart of the conditional else fail
* Add full conditional
* Update longitudinal_planner.py
* Mypy from myphone!
* red diff
* Make generation a property for clarity
* Even clearer!
* Affix to generation, while allowing older models to use this IF param is set.
* seems a bit repetitive yea?
* dynamic
* Make most outputs dynamic
* Rm toggle from refactor
* refactor(modeld): simplify MHP output parsing logic
- Introduced `_parse_mhp_output` helper to remove redundancy and streamline `parse_dynamic_outputs`.
- Ensures improved code maintainability and clarity.
* refactor(longitudinal_planner): streamline generation handling logic
- Simplified `generation` assignment with inline conditional for better readability.
- Adjusted `mlsim` logic to default to model simulation when `generation` is unset.
* for ease of syncs from now on
* fix
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* gh workflows: Create build single and build all models
Recompile action, and build single model action...
I'm tired, and this could definitely most probably be wrong.
on push : Revert me!
Revert "on push : Revert me!"
This reverts commit c6ab17adad981585f93c285e9d8a418e4c975879.
checkout gitlab
Update build-single-tinygrad-model.yaml
Whoops. ubuntu-latest not self-hosted
self-hosted is comma device
gh api because artifacts
Dynamic long
Update build-single-tinygrad-model.yaml
* FoF to FOF, because spellchecker is no fun
* ignore
* Create new dir and json by default since its full recompile
red diff, who doesn't like it
* Minimal patch to ssh agent from yesterday
* Update .codespellignore
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* gen 11 only api limit exceeded maybe not
* Try this for ModelDataV2.Action
* mpc mode
* Fix This
* Revert "Try this for ModelDataV2.Action"
This reverts commit e7db17980b.
* fix logic flaw
* Address comments for readability.
---------
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
* cache
* Clear every 10 iterations, which means 100hz * 10
* Revert "Clear every 10 iterations, which means 100hz * 10"
This reverts commit 4eda3079e6.
* Apply suggestion from @devtekve
* Apply suggestion from @devtekve
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Add live delay toggle to torqued.py and twilsonco NNLC
* Set this in init
* Clean up
* Live delay toggle refactor
* ModeldLagd -> LagdToggle
* This is for lagd_toggle.py
* Add to NNLC
* Lagd toggle:
Display current values on UI
* Add break
* LagdToggleDelay
Live edit software_delay when livedelay is toggled `off`
* Always show description
* Add description as to why values don't update offroad
---------
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
* chore(ci): parameterize and update GitHub runner version to 2.325.0
* ci: refactor GitHub runner service installation logic
Improved service installation workflow by introducing service template creation and cleaning up redundant checks. Enhanced restoration logic with clearer system state assessment and simplified flow for better maintainability.
* TorqueExtBase: use learned lag
lower non-zero limit for lag
restore original lag mod
* NNLC: use learned lat lag
* add test
* non-zero lag in test
* lower lag mod to 0.1s
* Update constant to reflect Twilsonco's recommendations.
* Add Reverse ACC Change parameter and update cruise control logic
* lint lint lint (and lint has been summoned!)
* Add test for speed adjustment on reverse ACC button presses
* Fix formatting in cruise speed test for reverse ACC button presses
* Fix assertion in cruise speed test for reverse ACC button presses
* Enhance speed adjustment test for reverse ACC functionality
* Refactor speed adjustment test for clarity and consistency in reverse ACC behavior
* Fix metric conversion in cruise speed update for reverse ACC functionality
* custom-acc-speed-increments
* simplify
* remove unused params
* move params & add test
* lets see if this works
* minor cosmetic stuff
* clean up class names & old code
* remove unused import
* moved params to card
* stupid strings
* Add settings for developer reverse acceleration configuration
* Refactor cruise control parameters to use a dictionary for custom acceleration increments
* adjust for the default behavior
* Remove unused param
* Fuck pytest consistently failing on macos. Need to force a fail on the pipeline or I won't have confidence on the tests.
* Revert "Fuck pytest consistently failing on macos. Need to force a fail on the pipeline or I won't have confidence on the tests."
This reverts commit 05bac46a0c.
* Refactor custom acceleration increment handling to improve clarity and initialization
* Refactor AccIncrementOptionControl to accept range and per_value_change parameters for improved flexibility
* Refactor custom acceleration increment handling to improve clarity and functionality
* Adjusting tests
* Static
* no need for space changes
* no need for space changes
* no need for space changes
* Refactor constructor formatting in AccIncrementOptionControl
* Rename
* Meaningless change to test CI
* allow 1/5/10 increments for long press
move developer panel src to /offroad/settings
* update boundary condition for long press
* clamp increments of 5/10 regardless of short or long press
* update tests
* update test for long_press non-standard values
* move to cruise panel
* init
* use cereal
* update tests
* merge
* bump
* clean up
* more clean up
* no more layout warnings
* trying to resolve dev ci merge conflicts
* damn ui preview
* stack layout
enable only with oplong
* bump opendbc
* fix width
* bump tinygrad
* switch to params
* remove cereal changes
* sort params
* cleanup
* more cleanup
* lint
* rename
* split vcruise_helper
* move params to card thread
hide widget for pcm cruise
* simplify tests
* further simplify tests
* tests!!
* Revert "tests!!"
This reverts commit 85310a155e.
* move tuple from init to update_v_cruise
* lint
* temp remove tests to check
* Revert "temp remove tests to check"
This reverts commit da1c96a5db.
* handle exception
* formatting
* handle none condition
* remove from tests
* flip inheritance
* read directly
* set default
* not needed
* refactor inheritence
* rename
* already checks before invoking
* unused
* slight cleanup
* lint
* rename
* diff
* circular
* just 1 parent for now
* fix
* fix increment check with remainder
* red diff
* type hint
* update tests
* clip them
* formatting
* always check toggle visibility
* spaces are free
* hide widgets when disabled
* less
* handle more states
* private instead
* red diff says wuuuut
* fix panel click
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* exit offroad btn on offroad-home
* Remove alert for Always-Offroad.
Replaced with header "Always Offroad Active"
* refresh state when device wakes up
* cleanup
* cleaning
* Add pulsing glow effect to ExitOffroadButton
Introduced a QTimer-based mechanism to create a pulsing glow effect around the ExitOffroadButton. This enhances visual feedback by animating the outline with varying alpha transparency, improving UI responsiveness and aesthetics.
* move custom asset to sunnypilot
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* init
* some fixes
* move
* more
* old navd helpers
* bring back cereal
* fix linting
* more
* add to cereal first
* sp events
* lint
* implement in long plan
* fixme-sp
* refactor state machine
* wrong state
* start refactor controller
* some type hints
* init these
* enable debug print
* ui? ui!
* print them out
* fix spinner import
* fix path
* let's use gps chips directly for now
* service missing
* publish events
* no nav for now
* need to sub
* no car state speed yet
* missed event
* Car: `CarStateSP`
* fix tests
* bring back car state speed limit
* fix
* use old controller for now
* fix
* fix source
* type hints
* none for now
* formatting
* more
* create directory if does not exist
* mypy my bt
* policy param catch exceptions
* handle all params with exceptions
* more
* single method
* define types in init
* rename
* simpler op enabled check
* more mypy stuff
* rename
* no need for brake pressed
* don't reset if gas pressed
* type hint all
* type hint all
* back to upstream
* in another pr
* no longer need data type
* qlog
* slc in another pr
* use horizontal accuracy
* set core affinity for all realtime processes
* unused
* sort
* unused
* type hint and slight cleanup
* from old implementation
* use directly
* combine pm
* slight more cleanup
* type hints
* even more type hint
* lint
* more cleanup
* even less
* license
* models panel
* models panel
* fix ui report
* stupid scroll
* move model selector to models panel
* cleanup whitespaces
* cleanup bad merge
* model search
* support searching with short name
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Refactor and extend ModelRenderer for custom Sunnypilot logic
Refactored `ModelRenderer` to `ModelRendererSP` with enhanced features such as lane line updates, path drawing, and lead management for Sunnypilot. Introduced new methods for model updates, lead drawing, and improved path rendering with experimental mode support. Ensured compatibility by integrating with Sunnypilot-specific HUD and camera components.
* Update selfdrive/ui/sunnypilot/qt/onroad/model.cc
* Refactor `ModelRenderer` for modularity
Moved constants and `get_path_length_idx` function to the header file for reuse and clarity. Updated `drawPath` and related methods to better handle surface dimensions, improving rendering flexibility. Made key functions virtual to allow further customization in derived classes.
* Cleaning logic on ModelRenderSP
Given that we've refactored slightly the original ModelRender, we no longer need to duplicate the logic on our own implementation
* Enable blind spot detection and visualization.
Added support for blind spot warnings, including gradient-colored visualizations for left and right blind spots on the on-road UI. Introduced a new "BlindSpot" parameter with related logic for detection and rendering, as well as a settings option for user toggling.
* Cleanup format
Clean
Cleanup and fixes
* Let's backup the BlindSpot setting
* add false for restart-needed
* Add blind spot warning toggle to VisualsPanel
Moved blind spot warning toggle from settings.cc to VisualsPanel and implemented support for dynamic parameter updates. This change introduces a dedicated layout for managing visual settings and improves modularity in the settings interface.
* Update Blind Spot Warnings setting description
Clarified the description to specify that warnings are displayed only if the car supports Blind Spot Monitoring (BSM). This ensures better user understanding of the feature's requirements.
* Avoid diff on settings.cc
* More cleanup
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Nayan <nayan8teen@gmail.com>
Update CODEOWNERS with new ownership rules
Expand ownership to additional paths for better code coverage and clarity. Newly added owners include @Discountchubbs and @devtekve for specified directories and files. This ensures proper oversight and maintenance of critical areas.
* Model panel
* Get this outta here and use sunnylink instead
* Remove space
* 'not' because we want gas gating to use e2e/mpc blend
* Add toggles to models_panel.cc
* "keep enabled for stock behavior"
* Add this here
* Cloudlog result
* change cloudlog to debug, and add latsmooth to steer actuator delay.
Need to edit json. Will do locally so when this is merged its a simple ready to go push.
* Cleanup
* Update longitudinal_planner.py
* Remove gasgating for now.. may need to be placed in model
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Controls: Pause lateral control based on blinker state and vehicle speed
* in its own module
* tests
* cleanup tests
* ui
* always refresh on show panel
* remove default
* change to 20 default
* need to update params live
* shorter
* off by default
* lol lint
* use ExpandableToggleRow
* not needed
* shorter
* ci ui preview delay for all offroad
* more
* Revert "more"
This reverts commit 809cfd99da.
* Revert "ci ui preview delay for all offroad"
This reverts commit ab38292fa8.
---------
Co-authored-by: nayan8teen <nayan8teen@gmail.com>
* Refactor and extend ModelRenderer for custom Sunnypilot logic
Refactored `ModelRenderer` to `ModelRendererSP` with enhanced features such as lane line updates, path drawing, and lead management for Sunnypilot. Introduced new methods for model updates, lead drawing, and improved path rendering with experimental mode support. Ensured compatibility by integrating with Sunnypilot-specific HUD and camera components.
* Update selfdrive/ui/sunnypilot/qt/onroad/model.cc
* Refactor `ModelRenderer` for modularity
Moved constants and `get_path_length_idx` function to the header file for reuse and clarity. Updated `drawPath` and related methods to better handle surface dimensions, improving rendering flexibility. Made key functions virtual to allow further customization in derived classes.
* Cleaning logic on ModelRenderSP
Given that we've refactored slightly the original ModelRender, we no longer need to duplicate the logic on our own implementation
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Create sync-dev.yml
* Update selfdrive_tests.yaml
* Update sync-dev.yml
* Update sync-dev.yml
* Update sync-dev.yml
* add search capability in branch selector
* maybe i should remove test code
* include
* reduce needed includes
* add newline for eof
* no changes needed in upstream file
* not sure why this was here
* try to resolve merge conflicts for dev squash
* try to resolve merge conflict
* No need for this for the time being
---------
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Refactor model runner methods for improved abstraction.
Moved slicing logic to a private `_slice_outputs` method and decoupled `_run_model` for clearer subclass implementation. Removed redundant `output` attribute in `ModelState` to streamline data handling.
* Add output parsing to model_runner and remove duplicate logic
Integrates an output parser directly into `model_runner` for streamlined inference and parsing. Removes redundant parser initialization from `modeld` to avoid duplication and enhance maintainability.
* Reordering
* linter
* linter
* Refactor model handling with `ModelData` abstraction
Introduce a `ModelData` class to encapsulate model and metadata logic, improving code clarity and modularity. Refactor `ModelRunner` to manage multiple models and add conditional handling for fallback scenarios. Adjust `TinygradRunner` to validate and use the new `ModelData` structure.
* Refactor model handling to use dictionary-based structure
Replaces the model list with a dictionary keyed by model type to improve clarity and maintainability. Updates related logic and ensures consistent handling of model metadata and inputs. Adds `slice_outputs` implementation to the `TinygradRunner` for proper output parsing.
* Refactor model runners to support policy and vision separation
Introduced `TinygradPolicyRunner`, `TinygradVisionRunner`, and `TinygradSplitRunner` to enable separate handling of policy and vision models. Updated `TinygradRunner` initialization and input preparation to accommodate modular processing. Adjusted `modeld` to utilize the new runners, ensuring compatibility with separated model workflows.
* Refactor model runner initialization and simplify logic
Introduce `get_model_runner` to centralize model runner selection logic, replacing multiple conditional instantiations. Simplify the handling of model metadata by removing fallback logic and restructuring output slicing to enforce proper loading of model data. These changes improve code maintainability and clarity.
* Refactor model data access for TinygradRunner initialization
Update references to access nested artifact properties and align with structural changes to the model data schema. This simplifies input shapes handling and ensures compatibility with updated model attributes.
* Refactor imports and clean up redundant code.
Removed unused imports and improved formatting for clarity and maintainability. These changes simplify the codebase by eliminating unnecessary dependencies and ensuring consistency.
* Refactor model output parsing with specialized parsers.
Introduce abstract `_parse_outputs` method to standardize parsing logic. Add `SplitParser` for specialized parsing in `TinygradVisionRunner` and `TinygradPolicyRunner`. This improves modularity and paves the way for easier parser customization.
* Add parser for model output processing in modeld_v2
Introduce a new `Parser` class to handle parsing and processing of model outputs, including MDN, binary cross-entropy, and categorical cross-entropy outputs. This modularizes the logic, improves clarity, and prepares for handling various types of model data.
* Add `input_shapes` property to model runners
Introduce a new `input_shapes` property in the abstract base class and its implementation in derived classes. This provides a standardized way to access the input shapes of models, improving clarity and consistency in the model runners.
* Refactor model runner to use private `_model_data` attribute
Replaced public `model_data` with private `_model_data` for improved encapsulation. Updated all references and property accessors accordingly. Simplified model type handling by using raw types where applicable.
* Remove debug print statement from model_runner.py
The unnecessary `print(model_type)` statement was removed as it served no functional purpose in the code. This improves code cleanliness and avoids unintended console output during execution.
* Refactor `_parse_outputs` call in `run_model`.
Replaced the use of `self.parser.parse_outputs` with `self._parse_outputs` for clarity and consistency. Updated method signature to align with the revised usage.
* Refactor model output parsing for clarity and scope separation
Moved specific parsing logic (e.g., lane_lines, lead) from `parse_model_outputs` to `parse_policy_outputs` to better align with functional responsibilities. This improves modularity and readability while maintaining existing functionality.
* Refactor model_runner to simplify result handling
Renamed variable `result` to `parsed_result` for clarity and removed unnecessary slicing during model output parsing. These changes improve code readability and maintain consistency within the `run_model` method.
* Adjust _parse_outputs method signature in model_runner
Updated the method signature of _parse_outputs to accept a single np.ndarray instead of a dictionary. This aligns with the intended data structure and ensures consistency across subclasses implementing this abstract method.
* Refactor ModelRunner to enforce abstract base class compliance
Updated `ModelRunner` and its subclasses to properly inherit from `ABC` while refactoring methods to ensure compliance with Python's abstract base class standards. Streamlined the handling of `_parse_outputs` and added a new `input_shapes` property for improved functionality.
* Fix buffer length issue in 20Hz model initialization
Adjusted `FULL_HISTORY_BUFFER_LEN` by adding +1 for `full_features_20Hz` to address compatibility issues with the current FoF model. Added a comment noting potential failure for other models with this adjustment.
* Refactor TinygradRunner to remove abstract methods.
Simplified the TinygradRunner class by removing unnecessary @abstractmethod decorators and redundant method definitions. This streamlines the code and aligns it more effectively with its current usage and implementation.
* Refactor model runner classes and enhance type annotations
Simplified model runner implementations, added type annotations, and improved code readability and maintainability. Introduced new type definitions, updated metadata handling, and standardized input/output parsing across all runner classes. Minor comment update in `modeld.py` for clarity.
* Refactor model runner classes with detailed docstrings.
Enhanced class and function docstrings across model_runner.py for better clarity and maintainability. Descriptions now include detailed explanations of attributes, purposes, and workflows to aid understanding and future development.
* Refactor model runner classes and add TICI hardware optimization
Simplified and clarified class definitions, comments, and functionality for ModelRunner subclasses. Introduced the use of QCOM environment variable on TICI for potential hardware acceleration. Enhanced input/output handling and error reporting across Tinygrad and ONNX implementations.
* Update parser import and usage to use CombinedParser
Replaced the Parser class with CombinedParser in model_runner.py. This change ensures consistency with the updated parsing logic, aligning with the latest requirements for combined model output handling.
* Refactor TinygradRunner hierarchy for modular parsers
Reorganized the TinygradRunner and its specialized runners (Vision, Policy, and Supercombo) into a cleaner, modular structure using composable classes. This consolidates parser logic, removes redundancy, and simplifies initialization by leveraging a shared base class with a dictionary-based parser method.
* Refactor model runners to use ModularRunner as abstract base.
Introduce a new `ModularRunner` class to enforce a consistent interface across model runners. Updated existing runners, including `ModelRunner`, `SupercomboTinygrad`, `PolicyTinygrad`, and `VisionTinygrad`, to extend `ModularRunner`. Added abstract methods and properties to enhance modularity and code maintainability.
* Refactor model runners into modular components.
This commit separates the logic for Tinygrad, ONNX, and split runners into clearly defined modules and components. It introduces `PolicyTinygrad`, `VisionTinygrad`, `SupercomboTinygrad`, and centralized helpers for cleaner architecture. The changes improve modularity and maintainability of the model running and parsing workflows.
* Simplify imports and clean up unused code in ONNXRunner.
Removed unused imports and redundant environmental variables to streamline the codebase. Consolidated necessary imports and organized type definitions for improved readability and maintenance.
* Standardize imports and add model data validation.
Updated import paths to ensure consistency across modules by using `openpilot` as the base. Introduced validation in `_parse_outputs` methods to handle cases where `_model_data` is not initialized, preventing potential runtime errors.
* Remove unused import and fix whitespace in runners
The unused import `ModelData` was removed from `tinygrad_runner.py` to clean up the code. Additionally, extraneous whitespace was corrected in `onnx_runner.py` for improved readability and consistency.
* Remove unnecessary blank line in import statements
Cleaned up import section by removing an extra blank line. This helps maintain consistency and adheres to code style conventions.
* BROKEN!! Staging code but its not gonna work. Also I realized we need to run the split models in 2 stages because the output of one is immediately needed for the input of the other. We might handle it inside of the model_runner instead
* update smooth
* Revert "update smooth"
This reverts commit c335712e6e1ee189459ce34dfc9d4028feb9470f.
* match case made this very hard to read.
* shouldnt be there
* Refactor to allow TR (soon TM)
* TR 7 is .1
* metadata
* .2=3
* Remove redundant comments and clean up conditional blocks in modeld.py.
* Undoing wrong buffer
* Refactor model initialization and adjust ONNX runner import
Reorganized numpy input buffer initialization and updated `temporal_idxs` logic for better clarity and efficiency. Conditional import for ONNXRunner added for non-TICI platforms to optimize imports. These changes improve maintainability and compatibility across platforms.
* Update CURRENT_SELECTOR_VERSION to 4
Bump the CURRENT_SELECTOR_VERSION constant from 3 to 4 to reflect changes in the selector logic or requirements. This ensures compatibility with the updated selector version while maintaining the minimum required version as 2.
* Add output_slices property to model runners
Introduce output_slices property to provide access to the output slices for individual and combined models. This ensures consistent handling of output slices across vision and policy models, improving modularity and usability.
* Refactor imports to use SplitModelConstants consistently
Updated import references to use the renamed `SplitModelConstants` class for consistency across files. This change ensures clarity and better alignment with the updated class naming convention.
* Refactor buffer initialization and desired curvature handling
Refactored model input buffer initialization for improved clarity and consistency, leveraging dynamic shape calculations. Extracted `process_desired_curvature` method to encapsulate logic for handling 3D and non-3D cases. Simplified temporal index generation and related calculations for better maintainability.
* Refactor desire reshape dims logic in modeld.py
Adjust logic for setting desire reshape dimensions to handle `is_20hz_3d` separately. This improves clarity and ensures proper handling of different model runner configurations.
* Fix off-by-one error in full_desire buffer initialization
The full_desire buffer length was mistakenly set to full_history_buffer_len + 1. This change corrects it to match the intended full_history_buffer_len, ensuring proper alignment with other buffers.
* Simplify desire reshape logic by removing unused condition.
Removed the `is_20hz_3d` condition and associated reshape logic since it is no longer needed. This streamlines the code and avoids unnecessary checks for unused configurations.
* Refactor buffer initialization for 20Hz model variants
Reorganized buffer initialization logic to prioritize the 20Hz_3D condition. This improves clarity and ensures specific handling of different 20Hz configurations. Adjusted the order of conditions to streamline execution flow.
* Refactor: Move `get_action_from_model` and constants to `Model` class to improve encapsulation and readability.
* 12 line reshaping red diff
* .2 to match old models delay
* mypy fixes
* Revert "12 line reshaping red diff"
This reverts commit 8c7280f629.
* mypy
* remove this
* Fix desired curvature for models which do not output desired_curvature
* fix FoF
* flip policy and vision outs to allow FoF and tomb raider to live in harmony using conditional `if 'this' in outs:'`
* noqa
* single
* sunnypilot modeld.py
* action
* overrides methodology
* combine split outputs to its own method
* comments
* Fix static checker line length
* static will fail on line length
lines:
286,
206,
70 - 77,
159,
168
* Address E501 line length violations
* This will make TR better while not effecting FoF/VFF at all
* Reduce this to one conditional and just call normally in vision/policy
* Align with upstream in our own way.
* check for desired curvature in outputs first
* outputs
* Use a cleaner import method
* Fix output
* Clean up some values
* Only call on init
* slight cleanup
* names!!!!!!!!!
* Refactor overrides structure to support key-value pairs.
The overrides structure now uses a list of key-value pairs instead of fixed lat/long fields. This change improves flexibility, allowing dynamic addition of override parameters. Code adjustments ensure backward compatibility and consistent behavior throughout the application.
* Refactor: Use local variable for SplitModelConstants
Introduce a local `constants` variable to replace repeated access to `SplitModelConstants`. This simplifies code readability and adheres to linter recommendations for line length.
* Refactor model constant handling to improve modularity
Replaced direct usage of model constants with dynamic access through model runners for better scalability and maintainability. This change centralizes constant definitions, reduces redundancy, and ensures clearer integration with different model types.
---------
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add job to fetch and upload model artifacts
Introduced a new `get_model` job to retrieve and upload model artifacts as part of the workflow. Updated the `build_model` job to download and clean up model files before building, ensuring an isolated and streamlined process. These changes improve modularity and artifact handling in the CI pipeline.
* Refine model file handling in build workflow
Restrict deletion and download commands to ".onnx" files to prevent unintended removal or overwriting of non-ONNX files. This ensures a more targeted and safer workflow for handling model artifacts.
* Update model artifact handling in build workflow
Changed artifact upload path to include only .onnx files and commented out the deletion of existing models. Also added a dependency for the build stage to ensure proper execution sequence.
* Update build workflow to refine model artifact handling
Removed unused code for deleting models and fixed the artifact path. Added a reference file logging custom name and upstream branch for better traceability. These changes streamline the workflow and improve clarity.
* Set dynamic run-name for sunnypilot build workflow
Added a customizable `run-name` field in the sunnypilot build model workflow. This allows more informative and dynamic naming based on input parameters such as `custom_name` or `upstream_branch`. Improves clarity and traceability in workflow runs.
* Add customization options and metadata generation to build
Introduce new inputs for file name prefix and 20Hz model specification in the workflow. Enable renaming of model files, generation of file hashes, and creation of a `metadata.json` file containing build details. This improves flexibility and enhances artifact information management.
* remove EOF
* No need for this hack anymore
* Add support for compiling ONNX models to Tinygrad format
* Add model directory environment variable and metadata generation script
* Fix quoting in model generator script command
* Refactor conditional flag for 20Hz input in build model script
* meh
* Add powersave management to build model workflow
* Add environment variable setup to build model workflow
* make it path call it a day
* kill me
* kill me x2
* mmm
* mmm
* Generate metadata.pkl
* Generate metadata.pkl
* ignore failure on getting model metadata
* Cleanup the existing onnxs
* Fix rm command syntax in build model script
* Cleaning a little
* Add optional file name parameter to generate_metadata function
* update
* stg
* linter
* more formatting
* Update sunnypilot model build workflow: improve custom naming, handle 20Hz default, and add commit date as output.
* Update commit date format in workflow script
Changed the commit date format in sunnypilot-build-model.yaml to a more human-readable format ('Month DD, YYYY'). This improves readability and consistency in the workflow outputs.
* Fix output naming in sunnypilot-build-model workflow
Corrected the output name from 'model_date' to 'commit_date' to match its usage. This ensures consistency and prevents potential errors in the workflow.
Add debug echo for model date in GitHub workflow
This change adds a debug echo statement to display the model date in the sunnypilot-build-model workflow. It helps verify the correct commit date is being set during the workflow process.
* Update BUILD_DIR path in sunnypilot workflow
Replaced hardcoded BUILD_DIR with a dynamic path using `github.workspace`. This enhances flexibility and ensures compatibility with different environments or runners.
* Revert "Update BUILD_DIR path in sunnypilot workflow"
This reverts commit 376971b616.
* Refactor model metadata generation to use short names
Replaced `file_name` with generated `short_name` for metadata and file naming. Introduced `create_short_name` function to simplify short name creation from custom names. Updated scripts and workflow to reflect the new parameter and improve metadata handling.
* `Use timezone-aware UTC timestamp for build_time`
Updated the code to use `datetime.now(timezone.utc)` instead of `datetime.utcnow()`. This ensures that the generated timestamps are timezone-aware, improving consistency and correctness in the output.
* Refactor short name generation logic in model metadata
Enhanced the `create_short_name` function to better handle name conversion by incorporating new rules for handling parentheses, alphanumeric words, and version pairs. Updated related variable names in metadata functions for improved clarity and consistency.
* Fix syntax error in assigning 'models' key in metadata
Corrected a typo where 'models' was missing quotes, causing it to be interpreted as a variable instead of a string key. This ensures proper metadata dictionary structure.
Update model metadata structure and JSON generation
Revised metadata to include detailed download URIs and a type field for artifacts. Enhanced the JSON generator with new fields like environment, runner, and overrides for better configurability. These changes aim to improve metadata clarity and compatibility with downstream processes.
* Refactor variable name from "escaped_name" to "short_name"
Renamed "escaped_name" to "short_name" across function parameters and internal logic for clarity and consistency. This improves readability and better aligns with its use case in the metadata generation process. No functional changes were introduced.
* Refactor variable names and improve type annotations.
Updated parameter names to align with Python naming conventions, enhancing readability and consistency. Added type annotations for function parameters to improve code clarity and maintainability.
* Refactor type annotations and clarify comments.
Updated type annotations to use "Str" for consistency with custom typing conventions. Improved clarity of a comment describing the normal case logic in the shortening function.
* Fix dict formatting in model_generator.py
Moved the "overrides" key for better alignment and consistency in the dictionary format. This improves readability without changing functionality.
Refactor model short name generation logic
Simplify and clarify the `create_short_name` function by improving readability and condensing comments. Adjust casing and truncation logic for single-word cases and handle versioned names more intuitively.
* Ensure custom file names are converted to lowercase.
When renaming files using a custom short name, enforce lowercase conversion to maintain consistency and prevent potential issues with case-sensitive file systems. This change applies to both the tinygrad and metadata file names.
* Use UTC alias for timezone in datetime imports
Replaced `timezone.utc` with `UTC` from the `datetime` module for clarity and consistency. This simplifies the representation of time zones and aligns with Python's updated best practices.
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Hyundai CAN: re-enable auto-enable radar tracks
* check if radar tracks config bit is already enabled
* only show success message if already enabled
* test if it would actually skip
* 5 bytes only
* tested skipping, revert
* lint
* move to opendbc right after fping
* more
* lint
* bump
* car: initialize sunnypilot interface immediately
* init
* Revert "car: initialize sunnypilot interface immediately"
This reverts commit 2e0fc4d87eb312a3a74a61bb8cbc780e33efbfc7.
* show int
* show int
* work properly with cereal
* unused
* in its own module
* bump
* not yet
* not yet
* list comp and use structs directly
* allow default key if needed
* lint
* send it with None
* bump
* expandable_row widget
* make MinMaxValue protected to allow inheritence
* add function to set width
* no more layout warnings
* format
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* MADS: Tesla and Rivian support
* request lateral if acc is engaged
* try this out
* fix
* make sure we keep the toggle off for tesla
* namedtuple
* disallow steering past 90 degrees for rivian
* whoops
* Revert "Revert "MADS: Steering Mode on Brake Pedal Press (#687)" (#789)"
This reverts commit 8dec4ea5
* both rivian and tesla
* enforce disengage on brake steering mode for Rivian and Tesla
* wrong one
* MADS: Steering Mode on Brake Pedal Press
* bump
* bump
* descriptions
* bump
* bump
* no tesla or rivian yet
* codecov v5
* Revert "codecov v5"
This reverts commit a347e3fb27.
* cleanup
* refactor description
* sync name
* fix
* make sure we don't allow if brake was already being pressed
* no longer needed
* proper ui!
* allow LKAS tx at all times with MADS
* extra
* this ain't right
* try this
* test only
* bring them back
* some dynamic checks
* dynamic description for mads toggle
* one place for limited platforms
* update tests
* angle when long, lkas when mads
* bump
* MADS: Tesla and Rivian support
* request lateral if acc is engaged
* try this out
* fix
* make sure we keep the toggle off for tesla
* namedtuple
* disallow steering past 90 degrees for rivian
* whoops
* Revert "Revert "MADS: Steering Mode on Brake Pedal Press (#687)" (#789)"
This reverts commit 8dec4ea5
* both rivian and tesla
* enforce disengage on brake steering mode for Rivian and Tesla
* wrong one
* MADS: Steering Mode on Brake Pedal Press
* bump
* bump
* descriptions
* bump
* bump
* no tesla or rivian yet
* codecov v5
* Revert "codecov v5"
This reverts commit a347e3fb27.
* cleanup
* refactor description
* sync name
* fix
* make sure we don't allow if brake was already being pressed
* no longer needed
* proper ui!
* allow LKAS tx at all times with MADS
* extra
* this ain't right
* try this
* test only
* bring them back
* some dynamic checks
* dynamic description for mads toggle
* one place for limited platforms
* just rivian
* not here
* Revert "not here"
This reverts commit 53271b9428.
* get them out
* get them out
* no longer needed
* Revert "get them out"
This reverts commit 532b671bfb.
* bump
* bump
* less
* Revert "bump"
This reverts commit 05ee4be04f.
* MADS: prerequisite for partial platform support
* ui: support specific button enabled selections for `ButtonParamControlSP`
Replaced setDisabledSelectedButton with setEnableSelectedButtons for improved flexibility. The new implementation allows enabling multiple buttons based on a given list and maintains clarity in handling button states. This enhances functionality and aligns with better code practices.
* don't think we need to
* update
* ui: Add utility function to check if a brand is in a list
Introduces `isBrandInList` to simplify checking if a given brand exists within a list of strings. This improves code clarity and avoids repetitive implementations for the same logic.
* Revert "ui: Add utility function to check if a brand is in a list"
This reverts commit 26cde3a73e.
* ui: Add utility function to check if a brand is in a list
ui: support specific button enabled selections for `ButtonParamControlSP`
Replaced setDisabledSelectedButton with setEnableSelectedButtons for improved flexibility. The new implementation allows enabling multiple buttons based on a given list and maintains clarity in handling button states. This enhances functionality and aligns with better code practices.
* Revert "MADS: `wrongCarMode` alert only with selfdrive enable (#931)"
This reverts commit 6d516a7704.
* Reapply "MADS: `wrongCarMode` alert only with selfdrive enable (#931)"
This reverts commit c9487597e4.
* Reapply "MADS: `wrongCarMode` alert only with selfdrive enable (#931)"
This reverts commit c9487597e4.
* MADS: Refactor Unified Engagement Mode
* init
* bring back pedal pressed event while trying to engage long
* MADS: prep for refactor
* no longer
* this is cleaner?
* in another pr
* Revert "in another pr"
This reverts commit 31aec8a7aa.
* less
* rename
* type hint
* MADS: Refactor Unified Engagement Mode
* init
* bring back pedal pressed event while trying to engage long
* MADS: prep for refactor
* no longer
* this is cleaner?
* in another pr
* fw version for my car, and added scc radar module firmware to enable radar points
* bump points
* bump
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add enhanced HyundaiCAN extension
Introduced HyundaiCanEXT for improved object parsing and control integration, leveraging new fields like lead distance and relative speed in CarControlSP.
Refactored controlsd to utilize a modular design with ControlsdExt for additional sunnypilot specific functionality.
* self.cc_sp
* Refactor CarControlSP handling for improved state updates
* refactor
* bool
* Refactor controlsd SP communication logic
Update `publish_sp` method to include `CC_SP` parameter and refine SP SubMaster to exclude `radarState`. Remove custom lead vehicle state processing as it is no longer needed.
* remove in this pr
* bump
* start cleanup
* inherit instead
* even more!
* lint
* type hint
* use the same objects for submaster and pubmaster
* more
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Reapply "Hyundai: custom longitudinal tuning" (#892)
This reverts commit 68c593db5f.
* fix panel behavior
* dynamic description
* try to merge and use the same scrollview
* fix for all to update
* dynamic update and fix description
* minimize changes for all brands
* init
* minimize changes for all brands
* more
* even less diff
* more
* even less diff
* more less
* wow srsly
* more less
* wow srsly
Refactor variable names for clarity in 20Hz model logic.
Renamed `full_features_20Hz` to `full_features_buffer` and `desire_20Hz` to `full_desire` for better readability and consistency. This improves code maintainability and aligns variable names with their intended purpose.
* init
* more
* description
* init them to true
* back to false
* fix
* add description
update colors
fix stretch
* yellow & orange are too similar - use blue
* slight updates
* dynamic description
* split it out
* more
---------
Co-authored-by: nayan8teen <nayan8teen@gmail.com>
* Fixes an issue on the long planner since Tomb Raider models, where the models are now meant to output the acceleration target and the "should stop" instead of it being calculated. However, older models (particularly those running on modeld_v2 from SP) do not output this. Leading to a "coasting" situation instead of braking when only e2e is used which is totally wrong.
* Maybe I was asleep but somehow it worked.
* Maybe I was asleep but somehow it worked.
* 70/30 split
* 60/35 split
* 67:33 split
* use Sqrt for tiny values to increase factor. Oh, also add a test file.
* use Sqrt for tiny values to increase factor. Oh, also add a test file.
* use Sqrt for tiny values to increase factor. Oh, also add a test file.
* Raise these to restart tests
* Raise these to restart tests
* Update jerk calculation mimicking j_ego math.
* README.md
* Update timestep
* Fix test
* Readability
* Lower time
* Add higher limits for CANFD
* Send these as a floating object. update comments to add TODO msg.
* Conditional flags
* yes its a little weird but heres why:
` "aReqValue": long_state.accel_value if enabled else a_val`
its only to not have merge conflicts with syncs from this file, because if not enabled a_val is already at 0 anyways.
* Make it easier to read
* Chronological order
* Trigger rebuild
* This is an internal test on my end. Disregard, for now
* fw version for my car...
* remove fw version as that was a test
* bump submodules
* refactor that while passing internal tests
* bump safety mutation test
* all should match 50 Hz
* bump safety mutation test
* match stock behavior for accel
* do our own clipping
* apply upper/lower dynamically
* bump test
* bump test
* Higher lower limit
* move desired accel force zero in tuning controller
* bump
* bump
* abs it here
* fix logic
* make sure it resets to 0, enforced in safety
* Test a few things
* Higher jerk for VOACC
* Elantra specific
* raise `off` to stock
* bump opendbc test
* allow jerk calculations at all times
* bump
* bump
* match aReqVale
* we dont need such high accel jerk when above 20m/s. This is cruise control, not a racecar.
* 0.45 default long actuator delay
* align type hint
* add lower jerk multiplier for HYUNDAI_IONIQ
* Change min jerk
* should be float
* Change min jerk
* Change min jerk upper
* Change max jerk upper
* Change max jerk upper
* Change max jerk upper
* step + threshold + first order filter to smooth
* constants
* nah
* multiplier to 1.5
* step updates for parabolic accel/braking
* step updates for parabolic accel/braking
* even less
* test multiplier
* Merge remote-tracking branch 'sunnypilot/opendbc/master-new' into HKG-long-tune
* back to default delay for now
* update test
* update config
* update test
* update config.py
* update test
* Remove stoppingDecelRate **No need for this anymore**
* multiplier to 1.0
* Variable lower dependency
* Variable lower dependency
* Variable lower jerk minimum
* Variable lower jerk minimum
planned_accel -> desired_acel
* Revert some scaling
* .01 here
* .01 here
* try even smoother stopping
* missed a `tuning` here that instead calls itself to inf.
* what is math
* Red Diff
* Red Diff
* bring some back
* bring some back
* stronger when needed
* something simple
* simplify more
* simplify more
* dont use future
* whoops
* why
* reset
* Refactor longitudinal controller for better jerk handling
Revised `calculate_a_value` and jerk processing logic to improve acceleration and jerk handling, particularly under dynamic conditions. Adjusted test cases to cover the new logic.
* Refactor longitudinal controller for better jerk handling
Revised `calculate_a_value` and jerk processing logic to improve acceleration and jerk handling, particularly under dynamic conditions. Adjusted test cases to cover the new logic.
* Refactor longitudinal controller for better jerk handling
Revised `calculate_a_value` and jerk processing logic to improve acceleration and jerk handling, particularly under dynamic conditions. Adjusted test cases to cover the new logic.
* Adjust lower_jerk interpolation for improved accuracy
* Lowered the acceleration error threshold from -0.01 to -0.001
* Adjust jerk interpolation thresholds for Hyundai tuning.
Updated the interpolation range for smaller acceleration errors.
* Move it up
* -.03 not -.05
* radarUnavailable = higher limit patch
* Commit the real change
* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.
* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.
* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.
* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.
* THIS. THIS WILL STOP FOR LEADS
* Higher for VOACC
* Higher for VOACC
* Rename `make_jerk` to `calculate_jerk` in test cases.
* Adjust jerk tuning for Hyundai longitudinal control
Updated the interpolation table for lower jerk values to improve deceleration handling. This adjustment refines control behavior during higher deceleration requests.
* Updated the interpolation breakpoint from -0.03 to -0.025
* Adjust longitudinal control jerk tuning for smoother response
Updated interpolation values in the jerk tuning logic to improve acceleration smoothing in Hyundai longitudinal control. These changes aim to provide a more consistent and predictable driving experience, particularly during deceleration scenarios.
* Handle radar unavailability in longitudinal tuning check
* Introduce `toggleDisableMsg` to streamline determining toggle states and descriptions.
* `sunnypilot`
* `Refactor longitudinal control acceleration and jerk handling`
Removed unused `FirstOrderFilter` and simplified acceleration and jerk calculations for improved clarity and maintainability. Adjusted logic to replace redundant return statements, streamline jerk computation, and reduce unnecessary dependencies.
* `Refactor longitudinal control acceleration and jerk handling`
Removed unused `FirstOrderFilter` and simplified acceleration and jerk calculations for improved clarity and maintainability. Adjusted logic to replace redundant return statements, streamline jerk computation, and reduce unnecessary dependencies.
* Simplify test to be straight to the point.
* Adjust upper_speed_factor and integrate ramp_update logic
* Adjust upper_speed_factor and integrate ramp_update logic
* Adjust upper_speed_factor and integrate ramp_update logic
* Refine acceleration and jerk tuning logic.
* greater than 0
* bump
* bring back ramp update for jerk upper
* Update opendbc_repo
* Revert "Update opendbc_repo"
This reverts commit b790387c90.
* bump
* bump
* bump
* using count seems to work better
* Refine jerk tuning logic and expand test coverage
* bump vals
* fix logic
* Adjust jerk tuning parameters for Hyundai longitudinal control
* retry lfs check
* bump submodule
* Fix acceleration blending and enhance test coverage
* Update lower_jerk breakpoints
* bump
* Adjust lower jerk parameters and include accel_cmd condition
* Adjust vars
* "Adjust Hyundai longitudinal jerk limits and tuning logic"
* Adjust jerk limits and tuning logic for better control
* Update Hyundai longitudinal tuning and add dynamic jerk logic
Refactored longitudinal configuration to include "lookahead" parameters and revised "jerk_limits" for improved tuning flexibility. Implemented dynamic jerk adaptation logic (Gen1) for smoother braking and acceleration transitions.
* Adjust Hyundai longitudinal control parameters for tuning
* bump to original branch
* QSize Policy to stretch toggle to screen size
* bump
* completely blocked xD
* Sunnypilot -> openpilot
* Whitespace
* Clean up toggle name
* Still allow ramp while in standstill for EV
* Adjust Kia Niro EV tuning parameters for smoother control
* self.cp.flags
* bump submodule
* bump
* Remove ramp for lower desired jerk
* update README.md
* update README.md
* Adjust lookahead_jerk_lower_v values in Hyundai longitudinal config.
* update tuning
* Update tune one last time to vals from device which are much smoother.
* Accel error
* bump
* fix
* rename flag and slight cleanup
* start ui stuff
* long_state -> tuning
* Prep for clean up
* small changes
* less in main
* no longer
* format
* bump
* init panel
* expose signal for other panels to interact with
* split into its own
* unused
* move around
* actually modify CP_SP
* fix offroad transition
* rename
* back
* don't update unless we're looking at it
* move around
* use min length
* do this
* whoops
* move
* bump
* bump
* this is fine
* bump
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: royjr <royjr96@gmail.com>
* Refactor model and artifact structures with version compatibility filtering
- Introduced `Artifact` struct and nested it within the `Model` struct for improved clarity and organization.
- Updated enums, logic, and parsing to align with the new struct definitions.
- Implemented version compatibility filtering for model bundles using the `is_bundle_version_compatible` helper.
- Enhanced artifact download handling by adding checks for missing URIs, better error management, and improved logging.
- Adjusted model fetching to point to the latest endpoint (`v3`).
* Make linter happy
* Make linter happy
* Refactor model data parsing to improve readability.
Replaced kwargs-based data extraction with explicit parameter passing for clarity. This enhances code readability and reduces ambiguities in method calls, making the parsing logic more maintainable and straightforward.
* Refactor error handling in active model bundle retrieval.
Wrapped the logic to fetch the active model bundle in a try-except block to prevent unhandled exceptions. This ensures more robust error handling and avoids potential crashes when retrieving or processing model data.
* Refactor exception handling in get_active_model_bundle
Replace bare except with Exception to improve specificity and clarity. This ensures better debugging practices and aligns with recommended coding standards. Other minor whitespace adjustments were made for improved readability.
* Update model path to use artifact fileName property
Replaced `fileName` with `artifact.fileName` in the custom model path construction. This ensures compatibility with updated drive model structures and avoids potential file resolution issues.
* Refactor model runner methods for improved abstraction.
Moved slicing logic to a private `_slice_outputs` method and decoupled `_run_model` for clearer subclass implementation. Removed redundant `output` attribute in `ModelState` to streamline data handling.
* Add output parsing to model_runner and remove duplicate logic
Integrates an output parser directly into `model_runner` for streamlined inference and parsing. Removes redundant parser initialization from `modeld` to avoid duplication and enhance maintainability.
* Reordering
* linter
* linter
Enhance action to fail on non-successful workflow runs
Add logic to check the conclusion of the watched workflow run. If the run ends with a non-successful status, the action now exits with an error to improve error handling and ensure reliability.
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Remove supercombo model ONNX file.
Deleted the large `supercombo.onnx` model file from the repository. This cleanup reduces repository size and dependency on unused or outdated files for this version.
* Disable tinygrad model compilation on macos temporarily
* Remove unused dmonitoring model file.
Deleted the ONNX model for dmonitoring as it is no longer required. This eliminates unnecessary assets and reduces repository size.
* Removing the model also from the snpe build, we have them, prebuilt
* FCA: Ram 1500 improvements
* updating reference to my opendbc
* syncing latest opendbc
* move to car_specific_sp
* bump
* Realfast ram1500 (#1)
* Bump tinygrad to upstream master (#34973)
bump tg
* test_onroad: test liveParameters service timing (#34977)
Add live params to test onroad
* selfdrived: remove ignored processes list (#34978)
* selfdrived: remove ignored processes list
* it's a set
* calibrationd: read carParams from Params (#34981)
* Read CarParams once from Params
* Remove it from process replay
* locationd: make pose_kf inherit from KalmanFilter (#34982)
* Read message not json for initial state
* Delete lines
* Fix param
* MADS: prevent `wrongCarMode` from disabling MADS enabled state (#792)
* MADS: prevent `wrongCarMode` from disabling MADS enabled state
Add wrongCarModeNoEntry as a NO_ENTRY event to replace wrongCarMode (USER_DISABLE)
that would incorrectly disable MADS when in the wrong car mode. Provides
contextual guidance to users based on car brand, showing appropriate
instructions for re-engagement without requiring MADS to be re-enabled.
* move down
* warning only?
* cereal SIKE
* remove duplicate
* try this out
* final
* Readme: update with links to new branches and info about rewrite and reflash agnos (#795)
* Adding the new branches info and adding a warning to reflash agnos
* Using more blockquote
* it
---------
Co-authored-by: Stupefacient <brianbrownt@gmail.com>
* agnos 11.13 (#34980)
* agnos 11.12
* new build
* Multilang: Update pt-BR translation (#34983)
* [bot] Update Python packages (#34987)
Update Python packages
Co-authored-by: Vehicle Researcher <user@comma.ai>
* Multilang: Update ja translation (#34986)
* 日本語訳2025/3/19
* numerusform追加。
* connect to an unmetered networkに対応
* panda是正
* opendbc_repo是正
* Multilang: Update zh translation (#34985)
* update to latest userdata partition (#34990)
update
* paramsd: cache backwards compatibility (#34991)
* LiveParametersV2 key
* Param key
* Fix tests
* Remove old params if error
* Update exception message
* Update the test
* Add test for corrupted byte format in v1
* Rename params_reader => params
* hardwared: give stuck LTE connections a kick
This reverts commit e3e694096a.
* Revert "hardwared: give stuck LTE connections a kick"
This reverts commit e4aa346259.
* process_replay: fix GM and replace TOYOTA3 (#34996)
* Add volt and bolt param migration
* Remove mazda due to invalid sensor timings
* Fix the import
* Add mazda to excluded
* Bring back mazda, but add todo
* New segment for TOYOTA3
* Fix
* Update ref commit
* bump opendbc
* test_models: update relay malfunction check (#34999)
relay is checked in fwd hook
* process_replay: remove GM (volt) (#35000)
Remove volt segment
* Revert "test_models: update relay malfunction check" (#35002)
Revert "test_models: update relay malfunction check (#34999)"
This reverts commit 2cd0079abe.
* Reapply "Online lateral lag learning" (#34975)
* Online lateral lag learning (#34974)
This reverts commit b4cc9e68d1.
* pad to the best size for fft
* Fix static analysis
* Add typing
* Fix typing
* MAX_LAG
* Calculate cross correlation regardless if the points are valid
* Back to lagd
* Add lagd to process_config
* Lagd in test onroad
* Move lag estimator for lagd
* Remove duplicate entry from test_onroad
* Update process replay
* pre-fill the data
* Update cpu usage
* 25sec window
* Change the meaning of lateralDelayEstimate
* No newline
* Fix typing
* Prefill
* Update ref commit
* Add a unit test
* Fix static issues
* Time limit
* Or timeout
* Use mocker
* Update estimate every time
* empty test
* DT const
* enable RIVIAN again
* Update ref commit
* Update that again
* Improve the tests
* Fix static
* Add masking test
* Increase timeout
* Add liveDelay to selfdrived
* Add liveDelay to selfdrived in process_replay
* Fix block_avg restore after num_blocks
* regen most
* Update bolt
* Update ref commit
* Change the key name
* Add assert
* True weighted average
* Raise thermal setpoint (#35008)
We don't need to control all the way down to 70C
* UI: Update `AbstractControlSP_SELECTOR` and `OptionControlSP` (#800)
* controls
* Adjust label width dynamically based on layout type.
Updated the label's fixed width to be conditional on the layout type, improving adaptability for different inline layouts. Additionally, corrected indentation in the width calculation loop for consistency.
* Refactor OptionControlSP to improve parameter value handling and encapsulate logic in dedicated methods
* Refactor getParamValue to return an integer and ensure value is updated correctly in button click handler
* Trying to unify a bit the logic. still WIP
* Reducing a bit the change footprint
* Refactor spacing item handling to prevent duplicate insertion and improve layout management
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* bump panda
* Radard: vision-based yRel for Hyundai single-lead systems (#805)
Introduced processing for custom yRel values using HyundaiFlagsSP when the enhanced SCC flag is enabled. Updated `radard` to handle `CarParamsSP` and make necessary adjustments for Hyundai vehicles with specific SCC configurations.
* MADS: transition to soft-disable for specific gear states (#791)
* MADS: transition to soft-disable for specific gear states
This commit enhances the condition checking functionality of the Modular Assistive Driving System (MADS) to implement a 'soft-disable' feature during the vehicle's active motion when a non-forward drive gear is engaged. It includes utilizing structs to reference various car state attributes and modifying a function definition to improve clarity. This adjustment boosts the system's reaction to gear shifts, increasing the safety and efficiency of the driving assist system.
* structs
* UI: Device & Sunnylink Panels - Standardize push button size & alignment (#806)
* layout adjustments
* sunnylink_panel
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* [bot] Update Python packages (#35012)
* Update Python packages
* update refs
---------
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* ci: Remove redundant Panda build step from prebuilt workflow (#810)
The Panda build step was unnecessary as it is not utilized in this workflow. This change simplifies the workflow and reduces redundant actions, improving efficiency.
* Device: Customizable Max Time Offroad (#796)
* Max Time Offroad
* Refactor & Fix param
* Error Handling
* rename SP variable
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.cc
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.cc
Co-authored-by: DevTekVE <devtekve@gmail.com>
* UI layout changes for better alignment
selector is not big enough -> make it bigger ;)
OptionControlSP now includes a QMap argument to allow actual values to be set in param directly
* Rebase & resolve reviews
* change default to be closer to OP default
* me dumb
* MaxTimeOffroad: Add support for 30h limit and improve label formatting
* power_monitoring: Refactor MaxTimeOffroad parameter handling for clarity
* test: Add unit tests for MaxTimeOffroad parameter handling
* power_monitoring: Update MaxTimeOffroad handling to use seconds and improve shutdown logic
* power_monitoring: Improve exception handling and remove redundant shutdown check for MaxTimeOffroad
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Hyundai longitudinal: Parse lead info for camera-based SCC platforms (#809)
* Hyundai longitudinal: Parse lead info for camera-based SCC platforms
* fix
* update
* bump
* update tests
* lol why is this here
* bump
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
* Models: point to v2 of driving models json for recompiled models (#817)
Use newer model version json since they have been recompiled
* ci: update squash script for external contributors (#811)
* Get head ref info
* Simpify adding the comment with the newest flagg by gh cli
* Dynamic origin
* Enhance PR processing: add label handling for forked PRs and improve variable naming
* Refactor PR label handling: use constant for trust-fork label and improve comments
* Fix remote addition in PR processing: change subprocess call to not check for errors
* Refactor PR comment handling: support multiple comments and improve clarity
* Refactor PR processing: streamline comment handling and improve error management
* Refactor add_pr_comments function: specify comments type as list of strings
* Maybe we don't prevent "behind" branches to be merged as lon as the PR itself is mergeable
* lint, leave me alone
---------
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
* sunnylink: fix sunnylink backup restore version parsing (#816)
* improvement
* fix: Improve version parsing logic for sunnypilot
---------
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* DM: Enforce monitoring of MADS state in driver monitoring (#818)
* DM: Enforce monitoring of MADS state in driver monitoring
Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.
* how
* [bot] Update Python packages (#35017)
Update Python packages
Co-authored-by: Vehicle Researcher <user@comma.ai>
* Rename experimental long (#35011)
* now alpha long
* fix
* rename param
* thought i did this
* debug
* debug
* more
* more
* moar
* Revert "moar"
This reverts commit e347106246583982e1be206485ad4d8eb944f817.
* Revert "more"
This reverts commit 0746e6d2e400ce1715614c62af84a9680c4d65c1.
* Revert "more"
This reverts commit 0db5a8792c01bb2d687f9152e6ba37fb76d4a453.
* Revert "debug"
This reverts commit 72f235b13727980e4331ff487998ddc7c7f7fb63.
* Revert "debug"
This reverts commit 7871b69f8c1bdffed386c2baac99542fcc50f7eb.
* Temporary disable UI preview from CI (#35018)
disable
* Update Python packages (#819)
* Fix possible CAN ignition overlap due to incorrect counter tracking (#35019)
* fix-rivian-ign
* bump
* UI: Bugfix Max Time Offroad (#820)
bugfixes
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
* CI: Improve `dev-c3-new` auto build (#825)
* force commit to force PR
* ci: add job to manage PR labels and remove trust label on new commits
* Add pull request trigger
* empty commit to test
* ci: update pull request label management logic and remove FORCE_RUN flag
* ci: update trust label management to use TRUST_FORK_PR_LABEL
* ci: update workflow to manage PR labels and adjust trigger conditions
* ci: rename jobs in workflow for consistency and clarity
* ci: add unleash-nightly-squash branch to workflow
* ci: add checkout step with GITHUB_TOKEN to workflow
* force wait
* what happens if negated the wait
* ci: add 'Wait for Tests' action to monitor workflow execution
* ci: update wait-for-tests action conditions and cleanup
* ci: refine conditions for managing PR labels and waiting for tests
* ci: enhance PR label conditions for workflow execution
* Cant use env on if
* maybe
* ci: update pull request workflow conditions and cleanup
* Missing end of line
* ci: rename workflow and update job name for clarity
* Cleaning
* ci: refine conditions for pull request handling in workflow
* ci: update handling of TRUST_FORK_LABEL in PR processing
* ci: remove fork trust warning from PR processing
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* CI: Update PR list query to exclude draft pull requests (#829)
* lagd: check sensors valid (#35027)
* Check if sensors valid
* Fix test
* Fix static
* Constants
* time buffer for pose valid
* Fix static
* Revert "DM: Enforce monitoring of MADS state in driver monitoring" (#830)
Revert "DM: Enforce monitoring of MADS state in driver monitoring (#818)"
This reverts commit 3615b1a203.
* DM: Enforce monitoring of MADS state in driver monitoring (#831)
* DM: Enforce monitoring of MADS state in driver monitoring
Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.
* how
* okay, only when active
* ui(raylib): update spinner progress bar to match Qt (#35028)
* lagd: estimate std (#35009)
* Std
* Fix static
* Refactor
* Assert std zero
* update
* ui(raylib): fix typos (#35030)
* Update modeld action logic (#35032)
* add action logic
* magic numbers
* unused
* plot accel
* more changes
* lagd: check for validity of the estimate when restoring state (#35034)
Do not restore if invalid
* Multilang: Update de translation (#35025)
added missing German translations
* Tomb raider 2 (#35029)
* db56b8fb-9135-4ab6-af18-99b7df7b2245/400
* fixes
* linter unhappy
* 6dbe0991-baa1-49ad-836a-ab370d1f0d92/400
* This one is good: 19387087-1005-475e-9015-9458dd8e7c5f/400
* Better every day: 39ed911c-0937-417f-97d2-58a8bb3caa53/400
* Actually end-to-end
* typo
* smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360
* Revert "smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360"
This reverts commit edd4f02386d83d82dd8a188985cde80ed1646b7f.
* 11632ef7-f555-489c-8480-e3bf97d9285e/400
* 08712d27-f6bd-4536-a30e-c729e5f62356/400
* 0a92a35e-1f72-476a-8cb6-c9f103f36822/400
* ee6d2394-2072-420c-a664-b4c0d4ed0b61/400
* no prev curv
* No double work
* fix bug
* smooth
* update prev action
* whitespace
* add little accel
* new ref
* Update plant.py
* DEC: adjust dynamic speed adaptation parameters (#813)
* early and better
* Update sunnypilot/selfdrive/controls/lib/dec/constants.py
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
* OS04C10: use IFE downscaler for road cameras (#35023)
* squashh
* wrong
* clean up
* rename
* process replay migration: fix longitudinalPlan (#35035)
* ci: ui preview add unicode characters and emojis (#835)
Add unicode characters and emojis!
* ui(raylib): update text window font, new lines and indentation (#35031)
* NNLC: decreased low-speed factor (#822)
* NNLC: decreased low-speed factor
* np.float to float
* format
* add tests for sanity check
---------
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ui(raylib): calculate spinner progress in set_text (#35036)
* bugfix: Auto lane change - Add mode to disable lane changes (#826)
* off is off
* sugg
* line
* Update sunnypilot/selfdrive/controls/lib/tests/test_auto_lane_change.py
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* NNLC: use `safe_exp` to prevent overflow in `sigmoid` (#836)
* test
* prevent overflowing
* unused
* NNLC: fix weak torque in high lat-accel turns (#823)
* NNLC: fix weak torque in high lat-accel turns
* np.float to float
---------
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ci: trigger prebuilt builds via label from PR
* ci: enhance pull request handling for prebuilt workflows
* ci: add wait-for-action step to monitor selfdrive_tests workflow
* ci: add validation job to monitor selfdrive_tests for prebuilt workflows
* test
* force negative condition to validate flow
* force negative condition to validate flow
* ci: add wait_for_tests input to control selfdrive_tests workflow execution
* ci: update description for wait_for_tests input in workflow
* Cleaning
* Remove PR label when triggered by the label
* Rename
* Changing to target and only caring about labeled for the time being
* gh action needs cancelled not canceled
* Line ending
* ci: avoid deadlock on dev-c3 branch build when PR labeled dev-c3 (#839)
* ci: enhance PR checks to validate individual check runs before merging and ignore reset-and-squash as candidate for fail
* reset and squash script shouldn't will be cancelled only if a push to master has been made which always should take priority. The rest will be put on hold to avoid parallel squash scripts running
* Set concurrencty at workflow level?
* Set concurrencty at workflow level?
* change trigger to pull_request to validate
* Reducing the types of "pull request" events
* Keep it as target
* Playing eith run name a little
* Change to pull request not target
* simplifying
* set to just pull request without target
* maintain as pull request target
* ci: update auto pr review config and split turst fork pr (#842)
* Updating auto pr labeler
* auto pr review revamp
* Leaving event as pull request :)
* Check permission
* add chore
* Bringing back as original
* ci: bugfix flipped contains check for pull requests
* ci: bugfix cancelling only when push to master or workflow dispatch.
Otherwise don't let it cancel as it seems that when running with pull_request_target we are with ref pointing to target and thus the cancel condition was being met
* ui(raylib): constant spinner rotation speed (#35037)
* ci: improve conditions for publish and notify steps in workflow (#844)
* [bot] Update translations (#35040)
Update translations
Co-authored-by: Vehicle Researcher <user@comma.ai>
* Long planner: make work with training (#35043)
* revert useless
* update ref
* Modeld: small refactor (#35044)
refactor
* update smooth
* raylib: init updater (#35045)
* raylib: init updater
* cleanup
* Revert "OS04C10: use IFE downscaler for road cameras" (#35046)
Revert "OS04C10: use IFE downscaler for road cameras (#35023)"
This reverts commit 3b60b22cee.
* Tomb Raider 3 (#35042)
* 92b64884-4506-4a03-87ad-33e1a177fe73/400
* faster lat
* DM: Use `carControl.latActive` for MADS DM monitoring (#845)
* ci: fixes for trigger conditions on sync (#847)
pull_request_target is needed for security, but at the same time it makes life a little harder because the ref is different so we need to do some work to make sure we get what we are supposed to get
* ui(raylib): reduce spinner rotation artifact (#35048)
* ui(raylib): reduce spinner rotation artifact
A visual artifact (white pixels) appeared on the edge of the
rotating spinner track texture, likely due to RGB color bleed during
bilinear filtering in Raylib.
Pre-multiplying the alpha channel of the spinner track image using
`rl.image_alpha_premultiply` significantly reduces the visibility of the
artifact.
* lint
* ui(raylib): increase font size and wrap text in spinner (#35049)
- Wrap text onto separate lines
- Increase font size to be closer to Qt
- Remove extra letter spacing - 0.0 should use font default spacing, and this is used in `wrap_text`
Will fix vertical alignment separately, as both the text and progress bar layouts need to be considered
* ui(raylib): update spinner vertical pos (#35051)
Adjust the spinner vertical position when displaying text or a progress bar
- When displaying the progress bar, center the comma logo and spinner in the middle of the screen
- When displaying text, center the entire content vertically
Also updated `wrap_text` to not include an empty line in the array if it's the first line, so that `wrap_text("")` always returns `[]`
* ui(raylib): "exit" btn in text window on PC (#35052)
* ui(raylib): "exit" btn in text window on PC
* unused import
* Revert "ui(raylib): "exit" btn in text window on PC (#35052)"
This reverts commit f9767d2650.
* plotjuggler: support relative paths (#35054)
* Support relative paths
* Abspath for rlog too
* Reapply "ui(raylib): "exit" btn in text window on PC" (#35053)
* ui(raylib): "exit" btn in text window on PC
* unused import
* request close
* this was missing
* Disable low speed steer in modeld (#35056)
* disable low speed steer
* No steer under
* TOYOTA_RAV4_PRIME NNLC tuning gen 1 (#850)
neural_network_data: TOYOTA_RAV4_PRIME NNLC tuning gen 1
* SL: updating localproxy implementation (#841)
* Adding capabilities to route localProxy via sunnylink
* Undo
* Thx lint
* get api token
* cert is not valid when it's an IP. Still use cert, but don't validate
* move to car_specific_sp
* bump
---------
Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Stupefacient <brianbrownt@gmail.com>
Co-authored-by: Alexandre Nobuharu Sato <66435071+AlexandreSato@users.noreply.github.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: programanichiro <99449198+programanichiro@users.noreply.github.com>
Co-authored-by: eFini <ricklan@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: niko001 <nikolaus_fischer@t-online.de>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: YassineYousfi <yyousfi1@binghamton.edu>
Co-authored-by: Tim Wilson <twilsonco@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Warren Togami <wtogami@gmail.com>
* fixing missing event
* more event fixes
* fixing spacing
* more fixes
* revert
* update
* update
* update
* reverting unneeded event
* S P A C I N G
* bumping opendbc
* bump
* Update sunnypilot/selfdrive/car/car_specific.py
* Update sunnypilot/selfdrive/car/car_specific.py
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Stupefacient <brianbrownt@gmail.com>
Co-authored-by: Alexandre Nobuharu Sato <66435071+AlexandreSato@users.noreply.github.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: programanichiro <99449198+programanichiro@users.noreply.github.com>
Co-authored-by: eFini <ricklan@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: niko001 <nikolaus_fischer@t-online.de>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: YassineYousfi <yyousfi1@binghamton.edu>
Co-authored-by: Tim Wilson <twilsonco@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Warren Togami <wtogami@gmail.com>
* Refactor workflow to centralize branch source handling
Moved branch resolution logic to a single `SOURCE_BRANCH` variable for consistency and readability. Updated related conditionals and parameters to use this new variable, reducing redundancy and improving maintainability of branch-specific configurations.
* Refactor workflow to use repository-defined variables.
Replaced hardcoded branch names with repository-defined variables for improved configurability and maintainability. This ensures flexibility by allowing changes via repository settings without modifying the workflow file.
* Adding capabilities to route localProxy via sunnylink
* Undo
* Thx lint
* get api token
* cert is not valid when it's an IP. Still use cert, but don't validate
pull_request_target is needed for security, but at the same time it makes life a little harder because the ref is different so we need to do some work to make sure we get what we are supposed to get
Otherwise don't let it cancel as it seems that when running with pull_request_target we are with ref pointing to target and thus the cancel condition was being met
* ci: enhance PR checks to validate individual check runs before merging and ignore reset-and-squash as candidate for fail
* reset and squash script shouldn't will be cancelled only if a push to master has been made which always should take priority. The rest will be put on hold to avoid parallel squash scripts running
* Set concurrencty at workflow level?
* Set concurrencty at workflow level?
* change trigger to pull_request to validate
* Reducing the types of "pull request" events
* Keep it as target
* Playing eith run name a little
* Change to pull request not target
* simplifying
* set to just pull request without target
* maintain as pull request target
* ci: enhance pull request handling for prebuilt workflows
* ci: add wait-for-action step to monitor selfdrive_tests workflow
* ci: add validation job to monitor selfdrive_tests for prebuilt workflows
* test
* force negative condition to validate flow
* force negative condition to validate flow
* ci: add wait_for_tests input to control selfdrive_tests workflow execution
* ci: update description for wait_for_tests input in workflow
* Cleaning
* Remove PR label when triggered by the label
* Rename
* Changing to target and only caring about labeled for the time being
* gh action needs cancelled not canceled
* Line ending
* DM: Enforce monitoring of MADS state in driver monitoring
Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.
* how
* okay, only when active
* force commit to force PR
* ci: add job to manage PR labels and remove trust label on new commits
* Add pull request trigger
* empty commit to test
* ci: update pull request label management logic and remove FORCE_RUN flag
* ci: update trust label management to use TRUST_FORK_PR_LABEL
* ci: update workflow to manage PR labels and adjust trigger conditions
* ci: rename jobs in workflow for consistency and clarity
* ci: add unleash-nightly-squash branch to workflow
* ci: add checkout step with GITHUB_TOKEN to workflow
* force wait
* what happens if negated the wait
* ci: add 'Wait for Tests' action to monitor workflow execution
* ci: update wait-for-tests action conditions and cleanup
* ci: refine conditions for managing PR labels and waiting for tests
* ci: enhance PR label conditions for workflow execution
* Cant use env on if
* maybe
* ci: update pull request workflow conditions and cleanup
* Missing end of line
* ci: rename workflow and update job name for clarity
* Cleaning
* ci: refine conditions for pull request handling in workflow
* ci: update handling of TRUST_FORK_LABEL in PR processing
* ci: remove fork trust warning from PR processing
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* DM: Enforce monitoring of MADS state in driver monitoring
Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.
* how
* Get head ref info
* Simpify adding the comment with the newest flagg by gh cli
* Dynamic origin
* Enhance PR processing: add label handling for forked PRs and improve variable naming
* Refactor PR label handling: use constant for trust-fork label and improve comments
* Fix remote addition in PR processing: change subprocess call to not check for errors
* Refactor PR comment handling: support multiple comments and improve clarity
* Refactor PR processing: streamline comment handling and improve error management
* Refactor add_pr_comments function: specify comments type as list of strings
* Maybe we don't prevent "behind" branches to be merged as lon as the PR itself is mergeable
* lint, leave me alone
---------
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
* Max Time Offroad
* Refactor & Fix param
* Error Handling
* rename SP variable
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/widgets/controls.cc
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.h
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.cc
Co-authored-by: DevTekVE <devtekve@gmail.com>
* UI layout changes for better alignment
selector is not big enough -> make it bigger ;)
OptionControlSP now includes a QMap argument to allow actual values to be set in param directly
* Rebase & resolve reviews
* change default to be closer to OP default
* me dumb
* MaxTimeOffroad: Add support for 30h limit and improve label formatting
* power_monitoring: Refactor MaxTimeOffroad parameter handling for clarity
* test: Add unit tests for MaxTimeOffroad parameter handling
* power_monitoring: Update MaxTimeOffroad handling to use seconds and improve shutdown logic
* power_monitoring: Improve exception handling and remove redundant shutdown check for MaxTimeOffroad
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
The Panda build step was unnecessary as it is not utilized in this workflow. This change simplifies the workflow and reduces redundant actions, improving efficiency.
* MADS: transition to soft-disable for specific gear states
This commit enhances the condition checking functionality of the Modular Assistive Driving System (MADS) to implement a 'soft-disable' feature during the vehicle's active motion when a non-forward drive gear is engaged. It includes utilizing structs to reference various car state attributes and modifying a function definition to improve clarity. This adjustment boosts the system's reaction to gear shifts, increasing the safety and efficiency of the driving assist system.
* structs
Introduced processing for custom yRel values using HyundaiFlagsSP when the enhanced SCC flag is enabled. Updated `radard` to handle `CarParamsSP` and make necessary adjustments for Hyundai vehicles with specific SCC configurations.
* controls
* Adjust label width dynamically based on layout type.
Updated the label's fixed width to be conditional on the layout type, improving adaptability for different inline layouts. Additionally, corrected indentation in the width calculation loop for consistency.
* Refactor OptionControlSP to improve parameter value handling and encapsulate logic in dedicated methods
* Refactor getParamValue to return an integer and ensure value is updated correctly in button click handler
* Trying to unify a bit the logic. still WIP
* Reducing a bit the change footprint
* Refactor spacing item handling to prevent duplicate insertion and improve layout management
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Adding the new branches info and adding a warning to reflash agnos
* Using more blockquote
* it
---------
Co-authored-by: Stupefacient <brianbrownt@gmail.com>
* MADS: prevent `wrongCarMode` from disabling MADS enabled state
Add wrongCarModeNoEntry as a NO_ENTRY event to replace wrongCarMode (USER_DISABLE)
that would incorrectly disable MADS when in the wrong car mode. Provides
contextual guidance to users based on car brand, showing appropriate
instructions for re-engagement without requiring MADS to be re-enabled.
* move down
* warning only?
* cereal SIKE
* remove duplicate
* try this out
* final
* be gone thot
* hhhmm what is this
a little dusty but lets see if we can freshen it up
* some of these
* bye bye
* remove xml bs
* add doc link
* i cant type
* remove patron and old subnote
* remove broken link
* update licensing
* update
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ui: update names
* Revert "ui: update names"
This reverts commit 313510c8c0.
* gone
* init
* Changed all occurrences of 'openpilot' to 'sunnypilot'
All instances of 'openpilot' in the user interface, documentation, and prompts have been updated to 'sunnypilot'. These changes include source strings, warning messages, and the prompts shown to users. The adjustment is part of the rebranding process and aims to avoid any uncertainty or confusion for users.
* vanish translations
* translations
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Method abstracting radar tracks in interfaces.py This makes the code more maintainable for future implementations to this file
* Method abstracting radar tracks in interfaces.py This makes the code more maintainable for future implementations to this file
* Add type annotation to params in initialize_car_interface_sp
* rename
* just internal
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Refactor squash and merge script for improved simplicity
Simplified the squash_and_merge.py script by replacing redundant utility functions and consolidating logic. Enhanced usability by aligning command-line arguments and leveraging streamlined git operations to improve maintainability and reliability.
* Fix argument names in squash PR script
Renamed CLI arguments from '--base' and '--source' to '--target' and '--base' to align with expected input format. This ensures the script runs correctly with proper argument mapping.
* Fix incorrect base branch argument in squash script
Updated the `--base` argument to use `source_branch` instead of `branch` to ensure the squash script processes the correct base branch. Also adjusted the command to include `branch` as a separate argument for clarity and correctness.
* Reset to a clean state after squash error.
Add a `git reset --hard` command to ensure the repository returns to a clean state after encountering errors during the squash and merge process. This prevents lingering changes from affecting subsequent operations.
* Improve error handling in squash_and_merge_prs.py
Capture and display both stdout and stderr in error cases to provide more informative feedback. Adjust the PR comment to include available output for better debugging.
* Refactor PR squash process to enhance error handling.
Modify subprocess handling to use `result.returncode` for error checks instead of relying on exceptions. Consolidate error output retrieval and logging for better clarity, while maintaining the workflow for resetting changes on failure.
* Fix incorrect return in PR processing loop
Replaced `return` with `continue` to ensure all PRs in the loop are processed before exiting. This prevents premature termination of the function and ensures accurate success count reporting.
* Simplify subprocess output handling in squash_and_merge.py
Replaced labeled print statements with direct output of stdout and stderr. This change ensures cleaner logs and remains consistent with the function's purpose of output handling during subprocess execution.
* Update subprocess.run calls to use capture_output parameter
Replaced `stdout` and `stderr` with the `capture_output` parameter for cleaner and more concise subprocess handling. Also removed extraneous whitespace for improved code readability.
* testing moving the squash script given that it's called iteratively and switching branch might miss it
* format
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Refactor OnroadEventSP structure to contain list of events
A restructuring of the OnroadEventSP structure has been undertaken to accommodate a list of 'Event' substructures. The change is reflected in different files where OnroadEventSP is used. This update allows for more efficient management of multiple events by grouping them together under the revised OnroadEventSP structure.
* Rename `OnroadEventSP` to `OnroadEventsSP` across codebase.
Updated all references to `OnroadEventSP` to ensure consistency with the renamed struct `OnroadEventsSP`. This change improves code clarity and aligns naming conventions across modules.
* Add optional debug logging to schema validation script
Introduced a `DEBUG` flag and a `print_debug` function to streamline debug output management. This replaces direct `print` calls with conditional logging to control verbosity during execution.
Refactor structural validation logic in cereal test
Simplify the iteration over read_instances to streamline structural validation. Removed redundant comparisons and improved error handling to detect unreadable fields more effectively. Updated error messages for better clarity during debugging.
Update build command to include 'cereal' target in CI
Modified the scons build command in selfdrive_tests workflow to explicitly build the 'cereal' target. This ensures necessary components are included during the CI process, improving reliability and consistency.
Added workflow for cereal validation artifacts generation and validation against upstream
This commit encompasses significant changes to .github/workflows/selfdrive_tests.yaml, including the addition of two new jobs. One is responsible for 'Generating cereal validation artifacts' and the other for 'Validating cereal with Upstream'. This includes generating cereal schemas, building openpilot, and running validation schema instances against master. Furthermore, a new Python script (validate_sp_cereal_upstream.py) was also added to perform cereal schema instance generation and validation. These changes aim to enhance the testing process, ensuring schema compatibility and integration quality.
* Relocate cereal validation to a dedicated GitHub workflow
This commit introduces a distinct GitHub workflow for cereal validation named 'cereal_validation.yaml'. This workflow includes two jobs: one for generating cereal validation artifacts and another for validating cereal with the upstream project. Previously, these operations were included as separate jobs in 'selfdrive_tests.yaml'. However, the decoupling in this commit allows for a better organization of GitHub workflows within the project. Additionally, this separation allows these workflows to be individually configured and run, providing a greater degree of flexibility in managing our continuous integration activities.
* Rename workflow to "cereal validation" for clarity.
Updated the workflow name in the GitHub Actions configuration to better reflect its purpose. This change improves maintainability and ensures clearer identification of the workflow's function.
* Add LFS configuration and GitLab SSH setup to workflow
Integrate GitLab LFS handling by configuring LFS URLs and enabling SSH setup. This includes adding public GitLab keys and updating the workflow to support secure connections for LFS operations. Ensures proper handling of large files and seamless integration with GitLab.
* rename
* format
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Integrate GitLab LFS handling by configuring LFS URLs and enabling SSH setup. This includes adding public GitLab keys and updating the workflow to support secure connections for LFS operations. Ensures proper handling of large files and seamless integration with GitLab.
Convert safe_desired_curvature to float before returning.
This ensures the returned value is explicitly a float, avoiding an issue when serializing it on capnp as it does not recognize numpy.float
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Move the exact_match calculation after updating model_path and max_similarity to ensure consistency. This prevents potential discrepancies when rechecking NN paths and enhances code maintainability.
This change includes the current commit SHA in the workflow outputs of the sunnypilot-build-prebuilt.yaml file. It provides better traceability for builds, ensuring each workflow run is linked to the exact commit it was triggered from.
Changed the PR reference format from (`#123`) to (PR-123) in squash commit messages
to prevent GitHub from automatically adding reference comments to PRs when
`master-dev-c3-new` is force pushed.
* init alc controller
* only for sunny
* rebase fix
* ui
* add ui preview
* Update common/params_keys.h
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Update selfdrive/ui/sunnypilot/SConscript
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/lane_change_settings.h
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/lane_change_settings.cc
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* review sugg
* code review
* renaming
* move around
* style
* fix types and params exceptions handling
* take out magic numbers
* more
* rename
* shorter
* make sure reset happens at the end of every DH loop
* split into multiple updates
* just 3 seconds
* use default states
* oops
* more readable
* oops
* some space and lines
* run in DH loop directly
* adjust ui preview
* nudgeless should process immediately
* check option instead
* more explicit
* even more explicit
* tests
* brake pedal release should not allow auto lane change (caught by test)
* unnecessary
* no continuous auto lane change
* Revert "unnecessary"
This reverts commit 93d135b54a.
* more tests
* less
* less less
* update again
* more cleanup
* better
* AutoLaneChangeState -> AutoLaneChangeMode
* update
* lint
* unused
* test all states
* license
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* ui: exclude certain params from deletion during settings reset
* clear all and exclude directly and only reboot after confirmation
* cleaner
* handle this instead
* send it
* 1-liner
* nuke nuke
* space
* less
* NNLC: use torque substitutes as fuzzy fingerprints
* substitutes are not exact matches
* update nnlc helpers
for extra nnlc model path checks, take the first one that passes.
* Update sunnypilot/selfdrive/controls/lib/nnlc/helpers.py
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add AES encryption and utility methods
This commit introduces a new AESCipher class that can be used for AES encryption with support for both AES-128 and AES-256. It also adds a set of utility functions, including methods for RSA to AES key derivation, file decryption and compression, and encryption and decompression. These changes provide fundamental cryptographic functionalities for data security within the system.
* Revised backup management system with new structures
This update introduces important revisions to the backup management system. A new struct named 'BackupManagerSP' has been integrated into the 'custom.capnp' file, replacing 'CustomReserved6'. This new struct includes several variables that help keep track of backup and restore status, progress and related messages.
Additional code modifications were made in 'base.py' and 'api.py' to include a 'json' parameter in the 'api_get' method. Lastly, 'manager.py' has been updated with functions to manage device configuration backups to and from sunnylink.
The changes promote better handling and management of data backup and restoration processes. The update is specifically designed to ensure that the backup information is well integrated into the system, with properly tracked status and progress.
* Refactor `allKeys` to filter by parameter key type
Updated the `allKeys` method to support filtering by `ParamKeyType`, allowing more specific key retrieval. Added a default value for backward compatibility and updated related bindings and keys to reflect this change.
* Improve Backup and Restore mechanisms
The commit refactors and improves several aspects of the backup and restore mechanisms in the `BackupManagerSP` class.
These improvements include removing redundant status tracking variables and replacing them with unified ones, updating the messaging system to handle all changes correctly, and including an enumeration `OperationType` to keep track of the type of operation currently being processed.
This commit also applies stricter conditions for restore operations, such that it only restores parameters that are currently marked as backupable, and skips those that are not. This is a preventive measure against potential issues when restoring parameters that are no longer relevant or could conflict with current versions.
Also, the encryption and decryption methods were updated to use AES-256 for more security. These changes have increased the robustness and reliability of the backup and restoration processes.
* copyright
* Add backup_manager process to offroad sunnypilot tasks
The backup_manager process is introduced to handle backups during offroad mode when SunnyLink is ready. This ensures proper backup management functionality integrated into the system.
* Simplify backup endpoint construction in restore method
Replaced conditional expression with a more concise and readable `or` operation for constructing the backup endpoint. This makes the code cleaner and easier to maintain while preserving functionality.
* Added support for backing up and restoring sunnypilot settings
An update to the sunnypilot functionality now provides two new features that allow users to backup and restore their sunnypilot settings. The changes include the addition of UI controls for initiating backup and restore operations, and the creation of a system-wide state management function for tracking these operations. This enhancement significantly improves the user experience by providing a safety net for user settings in case of software failures, bugs, or unintended changes.
* Refactor type hints to use PEP 604 syntax for clarity
Replaced `Optional` and `Dict` type hints with `|` and `dict` syntax for improved readability and compliance with Python 3.10+. Updated related imports and adjusted list comprehension for cleaner code.
* Update import path for hardware module in utils.py
Replaced the import path for the `Paths` module to align with the new directory structure under `openpilot`. This ensures compatibility with recent project reorganization and avoids import errors.
* Improve RSA key handling and fix backup status comparison
Added explicit RSA key type checks to handle invalid key formats. Enhanced type safety in `manager.py` by ensuring the backup status comparison returns a boolean. These changes improve robustness and error handling in backups.
* format
* more
* Improve backup and restore flow with progress tracking and fixes
Added proper progress tracking and cleanup logic during restore operations. Enhanced restore experience by resetting progress after completion and introducing confirmation dialogs for errors and completion. Updated API compatibility with a version query parameter for backups.
* Enable backup button only when restore process is complete
Previously, the backup button could be enabled during a restore operation, which might cause unintended behavior. This update introduces a check to ensure the backup button remains disabled while a restore process is active. This improves user experience and prevents potential conflicts.
* Fix restore button state handling during restore process
Ensure the restore button is disabled consistently when a restore is in progress. This prevents user interaction issues and aligns the button state with the restore operation status.
* "Refactor restore logic and improve button state handling"
Replaced `is_restoring` with `restore_request_pending` for clarity and better state management. Adjusted button behavior to immediately disable upon user action, ensuring improved UX and preventing repeat inputs. Refined restore completion flow for better consistency and reliability.
* Refine restore process logic for SunnyLink settings.
Introduced `restore_request_started` to improve handling of restore states and ensure accurate UI updates during the process. Adjusted case handling to enhance clarity and maintain proper behavior when restoring settings, especially during ongoing or completed requests.
* revert
* move around
* fix enabled states for different statuses
* add prompt to notify backup is complete
* same states as restore
* disable buttons if sunnylink is off
* can use the same texts
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
The `showEvent` method in `NeuralNetworkLateralControl` was removed as it duplicated functionality now handled in `LateralPanel`. The unused `refresh` method was also removed to streamline the code and improve maintainability.
* 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
* split Enhanced Lat Accel
* handle unrecognized platform
* test for fingerprinting
* fix fingerprint
* NNLC: Mock data for unrecognized cars
* fix fingerprints
* test to verify model loading
* bump neural_network_data
* use pytest
* use different one for now
* fix ui preview alignments
* typing
* more type
* show a platform
* show match
* init params for tests
* ok ruff
* make sure to loop through tests
* ok again ruff
* ok we need this lol
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* 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
* split Enhanced Lat Accel
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* 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
* split nnlc and custom lat accel
* more
* not yet
* comment
* fix
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Add error log to developer panel
* Add lang files
* Refactor GitHub runner control to local variable
Replaced the `enableGithubRunner` member variable with a local variable, as it is not used elsewhere in the class. Simplified visibility management for developer panel toggles in release branches.
* Modifying visibility rules for developer panel controls
This commit modifies the visibility settings for controls within the developer panel such as `enableGithubRunner`, `errorLogBtn`, `joystickToggle` and `longManeuverToggle`. The visibility of these controls is now dependent on whether the software is running in release mode. This update ensures that certain settings are hidden from the end user in the release version, enhancing the user interface by simplifying it and preventing potential user confusion.
* Translation files
* we already handle this in stock
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Refactor sunnylinkd for better readability and SSL support
Reorganized variable handling for Sunnylink API initialization. Updated WebSocket connection to use Authorization header and added SSL configuration based on the connection type. This enhances code clarity and ensures secure connections when not on localhost.
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add error log to developer panel
* Testing debug
* Fix condition for retry handling in action workflow
Updated the logic to properly check for 'NONE' author association instead of 'FIRST_TIME_CONTRIBUTOR' when determining retry limits. This ensures the workflow behaves as intended for contributors without prior activity.
* Clean
* Refine workflow condition logic for PR checks
Updated the `if` condition in the lfs-maintenance workflow to improve clarity and ensure proper evaluation. This change aligns the logical grouping for better readability and correctness in forked PR handling.
* Add lang files
* Update selfdrive/ui/qt/offroad/developer_panel.cc
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Refactor GitHub runner control to local variable
Replaced the `enableGithubRunner` member variable with a local variable, as it is not used elsewhere in the class. Simplified visibility management for developer panel toggles in release branches.
* Updating translations
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* format
* ci: update existing comment during Squash and Merge
* dynamic target branch
* test label
* try again
* no f
* test
* should be edit-last
* quote
* fix arg
* final
* bold it
* revert
* Refactor sunnylink panel code for clarity and initialization fixes.
Replaced explicit pointer types with `auto` for cleaner code and added proper initialization for the `offroad` boolean member. Simplified toggle logic by consolidating description updates for enabling/disabling sunnylink. These changes improve code readability and maintainability.
* Add Sunnylink sponsor and GitHub pairing functionality
This update introduces a feature to manage sponsorship-based roles and GitHub account pairing for Sunnylink. It includes new sponsor popups, sponsor-specific widgets, QR code logic, and backend API integrations. Additionally, new models and services support sponsor tier management and user-role synchronization.
* Translation files
* Param keys
* Add setup functions for SunnyLink sponsor and pair buttons
Introduce `setup_settings_sunnylink_sponsor_button` and `setup_settings_sunnylink_pair_button` to handle specific SunnyLink UI interactions. These functions streamline button clicks for sponsor and pairing actions within SunnyLink settings.
* Add new SunnyLink test cases for sponsor and pair buttons
Added `settings_sunnylink_sponsor_button` and `settings_sunnylink_pair_button` to the UI test case dictionary. This extends the SunnyLink test coverage to include sponsor and pairing functionalities.
* No need to import sunnylink from here, and it causes just circular dependency
* Enhance SunnylinkPanel functionality in off-road settings
This commit enhances the functionality of the SunnylinkPanel in the off-road settings of the SunnyPilot user interface. A paramWatcher is added to the SunnylinkPanel to observe "SunnylinkEnabled" parameter changes. Update functionalities are enhanced to handle showing and hiding of components based on various circumstances, such as whether the system is 'on-road' or 'off-road', and whether Sunnylink is enabled or not. The stopSunnylink and startSunnylink functions were also added to start or stop processes accordingly when Sunnylink is enabled or disabled. Additionally, the ui.h file is updated to efficiently handle Sunnylink roles and device users.
* Refactor SunnylinkPanel initialization and handling.
Reorganized SunnylinkPanel to improve structure and clarity by separating sunnylink client initialization and list widget setup. Enabled automatic sunnylink startup when the feature is enabled. Added minor formatting fixes for label display consistency.
* Add missing include for <optional> in ui.h
Including <optional> ensures compatibility with standard C++ features and prevents potential compilation errors. This addition aligns with best practices for maintaining robust and clean code.
* Updated setup_settings_sunnylink_sponsor_button and setup_settings_sunnylink_pair_button function signatures
Added an optional 'scroll' parameter to the setup_settings_sunnylink_sponsor_button and setup_settings_sunnylink_pair_button functions in the test_ui module. The modifications were made to allow for more flexible function usage by potentially enabling scroll operations during the execution of these UI setup steps.
* Enable Sunnylink initialization on panel show event
Begin Sunnylink connection automatically when the panel is displayed, ensuring the feature is active if enabled. Additionally, update the sponsor button text formatting for more concise styling.
* Translations
* Added checks for new UI files in PRs
The git workflow script `ui_preview.yaml` has been modified. The script now checks if the master branch contains a file corresponding to a UI file present in the PR. If a UI file in the PR does not have a match on the master branch, it is marked as new. These enhancements improve the comparison of UI changes between the master and PR branches, particularly with the identification of new UI files.
* cleanup
* duh
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Added checks for new UI files in PRs
The git workflow script `ui_preview.yaml` has been modified. The script now checks if the master branch contains a file corresponding to a UI file present in the PR. If a UI file in the PR does not have a match on the master branch, it is marked as new. These enhancements improve the comparison of UI changes between the master and PR branches, particularly with the identification of new UI files.
* init
* do it for hyundai
* Bump submodules
* no complaints
* use latest opendbc pr ref
* don't need this for leaf for now
* bump opendbc
* gotta set the sp safety flags in test models and safety replay!
* actually fetch CP_SP
* set safety param for lda button availability (lol forgot)
* use GET_FLAG
* Add TODO-SP
* bump submodules
Replaced occurrences of `openpilot.common.numpy_fast` with direct imports from `numpy` across multiple files. This simplifies dependencies and ensures consistency with standard Python library usage. Adjusted tests to mock `numpy` functions accordingly.
This function logs detailed build failure information, including the status and build log retrieved from OpenCL. It provides better debugging support for diagnosing issues with OpenCL program compilation.
Introduce `clutil_legacy` to handle OpenCL program creation from binaries and error string mapping. This improves modularity and prepares for enhanced OpenCL compatibility across platforms.
Changed the DEFAULT_MODEL constant and updated the associated model hash to reflect the new default. This ensures consistency between the code and the new model configuration.
* test
* Fix runs-on so that things acutally run otherwise they get stuck due to gh change
* Add repository condition to process_replay in CI workflow
Restrict the process_replay job to run only for the commaai/openpilot repository. This change temporarily blocks execution for forks or other repositories.
* in another PR
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Update workflow condition to skip forked PRs during sync
This change ensures the LFS maintenance workflow does not run for pull requests originating from forked repositories. It enhances efficiency by avoiding unnecessary sync actions in these cases.
* Modified retry conditions in GitHub workflow file
Adjusted the retry conditions in the GitHub workflow setup file. The updated condition allows for a second attempt if the pull request originator is a 'FIRST_TIME_CONTRIBUTOR' from a forked repository. This modification lends more flexibility to first-time contributors by providing them with an additional chance to pass the tests.
* test
* test2
* test3
* Fix conditional logic for retry check in workflow script
The condition now correctly checks if the pull request is not from a fork using 'false' instead of 'true'. This ensures proper validation of retry attempts based on the contributor and repository source.
* Fix placement of event JSON logging in workflow script
Moved the `toJSON(github.event)` logging statement to ensure it runs after retry logic validation. This improves the logical flow of the script and maintains appropriate debugging output.
* Add debug logs for PR metadata and run attempt values
This change introduces debug logs to output key PR metadata, such as fork status, author association, and the GitHub run attempt value. These logs will aid in debugging and provide better visibility into workflow execution.
* Add debug log for PR fork and author association check
This change adds a debug log to display the evaluation of the fork and author association condition in the workflow. It helps in troubleshooting PR handling logic and ensures better visibility into the condition being assessed.
* Fix logical negation for fork checks in workflow script
Correct the evaluation of fork status using proper negation syntax. This ensures accurate logic in pull request conditions, improving the reliability of the workflow execution.
* Add log for first-time contributor check in workflow
This adds a debug statement to log whether the PR author is a first-time contributor. It helps improve observability and makes it easier to debug workflows involving author associations.
* Simplify log output in GitHub action script
Removed unnecessary debug echo statements to streamline the script and improve readability. Retained essential logic to handle retries and enforce restrictions on test flakiness.
* Simplify retry logic for pull request contributors.
Updated the condition to correctly identify and handle retries for first-time contributors and forked repositories. This ensures a clearer and more accurate retry policy in the workflow.
* Refine workflow conditions for PR checks and retries
Adjusted conditional logic in `lfs-maintenance.yaml` to improve readability and ensure proper handling of draft PRs. Updated retry logic in `setup/action.yaml` to reflect correct author association for stricter validations.
* Update workflow condition to skip forked PRs during sync
This change ensures the LFS maintenance workflow does not run for pull requests originating from forked repositories. It enhances efficiency by avoiding unnecessary sync actions in these cases.
* Modified retry conditions in GitHub workflow file
Adjusted the retry conditions in the GitHub workflow setup file. The updated condition allows for a second attempt if the pull request originator is a 'FIRST_TIME_CONTRIBUTOR' from a forked repository. This modification lends more flexibility to first-time contributors by providing them with an additional chance to pass the tests.
Handle missing 'sim_pose' gracefully in model outputs.
Check for the presence of 'sim_pose' in output data before processing. If absent, fallback to using 'plan' data to populate temporal pose fields, ensuring robustness and preventing potential runtime errors.
* Add support for TinyGrad model runner processing
Introduced a new function `is_tinygrad_model` to detect TinyGrad as an active model runner. Updated the `is_stock_model` logic to account for TinyGrad models and added a new process entry for TinyGrad in the model manager. This enables handling TinyGrad models alongside existing configurations.
adding modeld back
Add support for `modeld_v2` and update paths for consistency
Updated `SConscript` files to integrate `modeld_v2` alongside `modeld` and adjusted script paths for correct metadata handling. Adjusted various configurations and scripts, such as `labeler.yaml` and `build_release.sh`, to include `modeld_v2` and ensure cohesive project structure.
Refactor imports to use updated `modeld_v2` paths.
Replaced outdated `modeld` references with their `modeld_v2` counterparts for consistency and clarity across the codebase. Also updated `.gitignore` to accommodate new directory structure. This change ensures better maintainability and alignment with the new directory schema.
Refactor and reorganize modeld to sunnypilot/modeld_v2 structure.
Moved and renamed `modeld` components to the new `sunnypilot/modeld_v2` directory for better organization and modularity. Updated imports and file references to align with the new structure, ensuring compatibility and functionality. Streamlined project structure to improve maintainability and future development.
* typo
* Use `stock` model runner and refactor model checks.
Replaces outdated model detection logic with unified `stock` runner integration, simplifying the decision flow for model selection. Includes `stock` as a new enum in the `Runner` type and updates affected references accordingly.
* Handle missing 'sim_pose' in model outputs gracefully.
Added conditional checks to ensure the code handles cases where 'sim_pose' is absent in the model outputs. Fallback behaviors use 'plan' data when 'sim_pose' is unavailable, preventing potential errors and enhancing robustness.
* modeld: script to generate new default model hash and name
* break CI intentionally to trigger new changes
* more verbose and fix
* more verbose hehe
* QFrame
* symlink for OP
* symlink dat
* search with user input
* single list is fine
* bump opendbc
* set actual fingerprint
* more precision search
* different prompt in onroad/offroad
* confirm/cancel
* set while initializing
* tldr
* show demo car
* old qt
* need that param too
* use toList
* Need to be str
* Encoding
* generate `car.CarParams.brand` in json
* start cleanup
* generate no car docs platforms
* add brand to parser
* include all dashcamOnly platforms
* pass all fields to a platform in json
* introduce `getPlatformBundle`
* extract platform from CarPlatformBundle directly
* Fix name
* do not include dashcamOnly yet
* slight cleanup
* bump opendbc
* it's a json now
* split set platform
* move loadPlatformList to sp util
* add year list to bundle
* bros
* missed header
* invoke platform selector on show event
* Add buffer length parameter for enhanced frame handling
Introduce a configurable `buffer_length` parameter to `DrivingModelFrame` to support dynamic buffer sizes, enabling better handling of different frame rates like 20Hz. Updates include necessary adjustments in buffer initialization, copying logic, and related model inputs for improved compatibility and flexibility.
* Rename variable `len` to `length` to avoid shadowing built-in.
Replaced the usage of `len` with `length` across the code to prevent conflicts with Python's built-in `len` function. This improves code clarity and reduces potential errors or misunderstandings in variable usage.
* Fix spacing inconsistency in modeld.py
Added a missing newline for better code readability and consistency. This change has no impact on functionality but improves code formatting.
* Move numpy_inputs initialization to correct position
Repositioned the `numpy_inputs` initialization to align with the input shape processing logic. This ensures consistency in buffer management and clarifies the flow of code execution related to input handling.
* Add 20Hz model state, smart input, and model switcher classes
Introduce `ModelState20Hz`, `ModelSmartInput`, and `ModelSwitcher` for enhanced modularity and flexibility in modeld. Refactor `ModelState` to inherit from these new classes, enabling support for 20Hz processing and smart input initialization. Update associated files to handle the new buffer length parameter and metadata management.
* Refactor `modeld` to streamline feature handling logic
Simplified feature processing for both standard and "smart input" modes by consolidating logic into reusable methods. Updated variable naming, formatting, and spacing for consistency and readability. This refactor enhances maintainability and reduces redundancy in feature update operations.
* Silence debug print statements and use cloudlog for warnings.
Commented out a debug print statement in `commonmodel.cc` to reduce noise. Replaced `print` statements with `cloudlog.warning` in `model_smart_input.py` for improved logging consistency and better integration with the logging system.
* Clean up formatting and fix minor style inconsistencies
Removed unnecessary blank lines and adjusted spacing to standardize code style across the file. These changes improve readability without altering functionality or logic.
* Refactor modeld logic and remove unused 20Hz and smart inputs
Eliminated `ModelSmartInput`, `ModelSwitcher`, and `ModelState20Hz` classes, simplifying model state handling. Centralized model processing within a unified `ModelState` class and moved related code into `sunnypilot/modeld_20hz`. This improves maintainability by removing unused features and consolidating model execution logic, aligning with current system requirements.
* clean
* Remove debug print statement in commonmodel.cc
The `printf` statement logging buffer movement details was removed as it is unnecessary for release builds. This helps streamline the code and avoid excessive console output during execution.
* Refactor model handling for 20Hz and introduce model runners
Introduce ModelRunner abstraction with TinygradRunner and ONNXRunner to streamline model handling for TICI and non-TICI hardware. Added support for dynamic input preparation and 20Hz models while simplifying the model parsing logic. This improves modularity, readability, and extensibility for future updates.
* Remove unused import and fix import order in model_runner.py
This commit removes the unused 'dtypes' import from tinygrad.tensor and adjusts the import order for cleaner code. These changes enhance readability and maintain coding standards.
* Add is20hz field to custom.capnp schema
Introduce a new boolean field `is20hz` to the `custom.capnp` schema. This allows the system to identify 20Hz-specific configurations or data processing. No changes to existing behavior are introduced for non-20Hz cases.
* Add Meta20hz class for 20Hz model message handling.
Introduces a new Meta20hz class for filling 20Hz model messages, encapsulating functionality for curvature, lane lines, road edges, and more. Refactored `modeld.py` to utilize the new class, improving modularity and maintainability. Minor adjustments were made to initialize and handle model metadata.
* Refactor import paths to align with `openpilot` structure.
Updated several import statements to use the `openpilot` namespace for better consistency and organization. This aligns the sunnypilot components more closely with the overall project structure.
* Refactor modeld to support 20Hz models and modularize runners
Replaced legacy runner logic with a unified ONNX and Tinygrad runner to support 20Hz models. Centralized model metadata management and optimized input preparation for adaptability. Updated curvature handling and output parsing for improved modularity and maintainability.
* Add 20Hz metadata handling for model predictions
Introduce `Meta20hz` class for 20Hz-specific metadata and implement dynamic loading of meta model classes in `meta_helper.py`. Update `fill_model_msg.py` to use the new metadata structure, ensuring seamless integration with 20Hz models. Adjust imports in `model_runner.py` to align with project structure.
* "Refactor modeld_20hz to modeld_v2 with cleanup"
Refactored `modeld_20hz` module to `modeld_v2` for improved clarity and consistency. Removed unused code and aligned imports across modules to reflect the new structure. Enhanced maintainability by restructuring model-related files and updating references accordingly.
* Refactor variable names and adjust imports for clarity.
Renamed `len` to `length` to avoid conflict with the built-in function and improve readability. Reorganized imports in `fill_model_msg.py` for better structure and consistency.
* "Add missing newline at end of file in __init__.py
Ensure proper formatting by adding a newline at the end of the file. This adheres to POSIX standards and improves compatibility with some tools and version control systems."
* Handle model runner initialization errors gracefully
Wrap the model runner initialization in a try-except block to catch and log exceptions. This ensures that failures during initialization are logged with detailed information, improving debugging and error tracing.
* Refactor curvature calculation for clarity and reuse.
Introduce a dedicated `get_curvature_from_output` function to handle desired curvature retrieval, improving code readability and reusability. Replace redundant logic in curvature calculation with the new function to streamline the flow.
* Make 20Hz-specific variables conditional in modeld.py
Moved the initialization of 20Hz-specific variables to be conditional based on the `is_20hz` flag. This ensures that unnecessary memory allocations are avoided when the model is not running at 20Hz, improving efficiency and clarity.
* cleanup
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* carControlSP and move MADS to outside structs
* publish it
* apply to all car controller
* migrate sunnypilotParams
* migrate madsEnabled
* tldr
* convert to capnp
* unused
* wrong module
* fix name
* cancer is right (all tests should be passing now)
* bump opendbc
* sp flags
* pass CP_SP to card and car interfaces
* CP_SP in radar interface
* bump opendbc
* use dataclass like old times
* bump opendbc
* write to params for controls
* fix test models
* fix
* need to use copy instead
* fix data type
* add service
* more
* fix
* Revert "fix"
This reverts commit 74723d7fb2.
* Revert "fix data type"
This reverts commit 02355f44df.
* missed
* more
* no more lagging
* Reapply "fix data type"
This reverts commit dbf1b8583f.
* Reapply "fix"
This reverts commit 9cbce9968a.
* Revert "Reapply "fix""
This reverts commit 1871919b63.
* Revert "Reapply "fix data type""
This reverts commit 5e95752fd5.
* no longer
* Revert "no longer"
This reverts commit 66ee1ba151.
* Reapply "Reapply "fix data type""
This reverts commit 670a384333.
* Reapply "Reapply "fix""
This reverts commit 42f09f955c.
* only for car params sp
* rename
* fix more test
* no need for process replay
* pass stock car params to sp set car params
* pass stock car params to sp set car params
* deprecate CarParams.sunnypilotFlags to CarParamsSP.flags
* missed arg
* fix tests
* tests fixed
* need to pass this too
* must generate cp_sp!
* fix typing
* must be initialized prior can comm callback!
* no more cancer (@devtekve)
* remove more cancer
* Refactor `get_non_essential_params_sp` to simplify arguments (#612)
* Refactor 'get_non_essential_params_sp' function calls in tests
In both `test_latcontrol.py` and `process_replay.py`, simplified the function calls to 'get_non_essential_params_sp'. Removed an unnecessary call to 'get_non_essential_params'. This change makes the code cleaner and more efficient by reducing redundancy in the function calls. This modification also ensures consistency across different code files.
* Refactor get_non_essential_params_sp to take car_params.
Simplify parameters by modifying `get_non_essential_params_sp` to use `car_params` as input. Adjust related calls in test files and process replay to match the updated method signature. This improves code clarity and reduces redundancy.
* bump opendbc
* Refactor parameter handling for `get_params_sp`.
Removed unnecessary reassignment of `car_params` in calls to `get_params_sp`, ensuring a cleaner and more streamlined code structure. This change improves code clarity and eliminates redundant operations. All relevant assertions and behavior remain unaffected.
* bumping opedbc
* bump opendbc
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
Fix branch status check for merge readiness
Previously, any non-"CLEAN" status prevented merging. The check now specifically fails only if the branch is "BEHIND", allowing other statuses to proceed if valid. This ensures more accurate merge validations.
* Implemented custom Networking class for sunnypilot UI
This modification introduced a new 'NetworkingSP' class for the sunnypilot user interface. It's based on the existing Networking class, but tailored to the specific needs of the sunnypilot UI. This class adds a new 'Scan' button to the Wi-Fi screen and implements an additional layout to accommodate both 'Scan' and 'Advanced' buttons. It also contains updates to the file inclusions in 'settings.cc' to use the new class. Moreover, the accessibility of several member variables in the original Networking class has been updated from 'private' to 'protected'. This change enhances the modifiability and extensibility of the class structure.
* Add Spanish translations for networking scan messages
Added translations for "Scan" and "Scanning..." in the Spanish localization file. These updates ensure proper display and functionality in the networking scan feature for Spanish-speaking users.
* updating lang files
* Refactor networking component and clean up unused code.
Removed unnecessary comments and unused includes to enhance readability and maintainability. Refactored variable declarations for consistency and streamlined layout adjustments in the networking UI code.
* Add support for "settings_network" scene in UI tests
Updated the workflow and test script to include the "settings_network" scene. Introduced a new setup function for "settings_network" and registered it in the scene-to-function mapping. This ensures proper handling and testing of network settings in the UI.
* Static analysis lol
* Add support for "settings_network_advanced" scene
Extend UI tests and workflow to include the "settings_network_advanced" scene. Updated the YAML workflow and test script to handle this new scene for comprehensive coverage.
* Add nightly branch reset workflow and improve squash script
Introduced a GitHub Actions workflow to reset and squash PRs nightly for the `master-dev-c3-new-test` branch. Enhanced `squash_and_merge.py` to handle more specific exit codes and `squash_and_merge_prs.py` to streamline PR processing. Updated argument handling in scripts and added validation for squash script execution.
* Forcing to show up
* UnForcing to show up
* Refactor branch handling to use inputs/environments directly
Removed intermediate step for setting branch variables and updated logic to use `inputs` or environment variables directly. Simplifies the workflow and improves maintainability by reducing redundancy and reliance on unnecessary outputs.
* Fix Python script invocation in CI workflow.
Replaced implicit script execution with an explicit `python3` command to ensure compatibility and consistency in the workflow. This change resolves potential issues with shell defaults or system configurations.
* Update branch reset logic in workflow script
Replaces checkout-based branch reset with deletion and recreation to ensure the target branch correctly points to the source branch. This change handles cases where the target branch may already exist.
* Refactor PR data handling to parse JSON input.
Updated the script to parse and handle PR data as JSON, ensuring proper data structure during processing. Adjusted functions to operate on parsed JSON instead of raw arguments for improved clarity and error handling.
* Refactor PR processing to streamline branch handling
Removed redundant `fetch_pr_branches` function and integrated branch fetching directly into `process_pr`. Simplified subprocess calls for clarity and added branch cleanup to prevent conflicts. This improves code maintainability and execution efficiency.
* Add PR number to squash and merge commit titles
This change appends the PR number to the title used in squash and merge commits, improving traceability and clarity in the commit history. The modification ensures easier identification of commits linked to specific pull requests.
* Enhance PR processing with sorting and additional checks
Implemented sorting of PRs by creation date and added checks for merge conflicts, commit data availability, and status check completion. Updated nightly squash script to provide detailed feedback via PR comments for skipped PRs. These changes improve the reliability and traceability of the merge process.
* Add traceback logging to error handling in squash_and_merge_prs
Enhanced error reporting by including full traceback details when an exception occurs in the `process_pr` function. This aids in debugging by providing more context on failures.
* Refactor and add debug output to PR merge check logic
Simplified multi-line statements into single lines for clarity and added debug `print` statements to log `merge_status` and its output. These changes enhance readability and facilitate debugging of the merge conflict check process.
* Add GITHUB_TOKEN to environment for CI workflow
Ensure the workflow has access to the GITHUB_TOKEN for authentication. This is necessary for interacting securely with the GitHub API during the CI process. Without this, some steps may fail due to lack of authorization.
* Enable scheduled workflow execution at midnight UTC
Reactivates the cron schedule for the workflow to run daily at midnight UTC. This ensures the workflow executes automatically without manual triggers, maintaining regular updates or checks.
* test
* Update workflow to trigger and monitor selfdrive tests
Replaced the direct triggering of the prebuilt workflow with a step to trigger and wait for the completion of selfdrive tests. Ensures prebuilt workflow runs only if selfdrive tests succeed, improving reliability of the CI process.
* Refine workflow trigger to fetch run URL and ID
Updated the workflow script to extract the run URL and derive the workflow ID from it. This ensures more accurate handling and tracking of GitHub Actions runs.
* Simplify selfdrive test triggering in workflow
Replaces custom script with a reusable GitHub Action to trigger and wait for selfdrive test completion. This improves maintainability and reduces complexity in the workflow file. Adjusts subsequent prebuilt workflow trigger to ensure compatibility.
* Remove duplicate prebuilt workflow trigger step
The redundant step for triggering the sunnypilot prebuilt workflow has been removed. This cleanup avoids unnecessary duplication and ensures a more streamlined workflow definition.
* Update selfdrive test trigger to use GitHub CLI commands
Replaced the third-party action with GitHub CLI for triggering and monitoring selfdrive tests. This change improves maintainability and reduces reliance on external dependencies. Updated related steps to ensure compatibility with the new approach.
* Add delay to ensure selfdrive tests workflow starts
Introduce a 120-second sleep before fetching the latest run ID to allow sufficient time for the selfdrive tests action to initialize. This prevents potential issues caused by attempting to retrieve the run ID too early.
* Improve push step to check for diffs before execution
Added logic to verify if there are differences between local and remote branches before attempting a push. This prevents unnecessary pushes and skips subsequent workflows when no changes are detected. Updated dependent steps to conditionally run based on the presence of changes.
* Update target branch and improve squash comment clarity
Renamed the default target branch from `master-dev-c3-new-test` to `nightly` in the workflow configuration. Enhanced squash process comments to dynamically reflect the `target_branch` value for better clarity and consistency.
* Add missing newline at end of file
Ensures the file complies with POSIX standards by including a newline at the end. This improves consistency and prevents potential issues with some tools or systems.
* Update default target branch and disable nightly schedule
Changed the default target branch to 'master-dev-c3-new' for workflow consistency. Commented out the nightly schedule to temporarily disable automated runs. No functional changes were made to other parts of the workflow.
* Refactored squash and merge scripts for improved PR handling
In this commit, significant updates have been made to the 'squash_and_merge.py' and 'squash_and_merge_prs.py' scripts related to how pull requests (PRs) are processed.
A 'source-branch' argument has been added to the argument parser. The merging command has been changed from 'merge' to 'rebase'.
The PR processing function has been refined. Specifically, PR validation is now a separate function confirming the conditions 'branch name', 'commit data', 'check pass status', and 'mergeability'. Now, any failures under these conditions result in skipping the PR with an appropriate warning.
The target branch is deleted if it exists, before a new one is created from the source branch. The squash script now runs with more structured arguments.
These changes generally improve PR handling in CI/CD pipelines, making them more efficient and error-resistant.
* Add 'PullRequest' to .codespellignore
This update includes 'PullRequest' in the .codespellignore file to prevent it from being flagged as a spelling error. It helps streamline code reviews and reduces false positives during spell checks.
* Events: Migrate sunnypilot onroad events to its own cereal
* more
* slightly more
* typing
* fix more
* fix mads state machine tests
* readjust order
* fix event
* abstract
* need these
* move around
* let's make sure it cleared on every loop
* Update selfdrive/selfdrived/alertmanager.py
Co-authored-by: DevTekVE <devtekve@gmail.com>
* use upstream custom struct
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Events: Migrate sunnypilot onroad events to its own cereal
* more
* slightly more
* typing
* fix more
* fix mads state machine tests
* readjust order
* fix event
* abstract
* need these
* move around
* let's make sure it cleared on every loop
* Update selfdrive/selfdrived/alertmanager.py
Co-authored-by: DevTekVE <devtekve@gmail.com>
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Longitudinal: Distance button hold to toggle Chill/Experimental Mode
* unused
* fix
* no need
* Refactor: Introduce ButtonHoldTracker to manage button hold durations (#593)
Add ButtonHoldTracker for button hold logic and tests
Introduce a new `ButtonHoldTracker` class to manage button hold durations, replacing manual timer handling in `ExperimentalSwitcher`. Updated `ExperimentalSwitcher` to leverage this implementation for cleaner and more modular code. Added comprehensive unit tests for both `ButtonHoldTracker` and `ExperimentalSwitcher` to ensure functionality and edge case coverage.
* Revert "Refactor: Introduce ButtonHoldTracker to manage button hold durations (#593)"
This reverts commit 7ee7e73ce7.
* less in selfdrived
* pass carparams into child
* tests for cruisehelper
* rename these bad bois (happy now @devtekve? xD)
* Apply suggestions from code review
Co-authored-by: DevTekVE <devtekve@gmail.com>
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* init dec
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* fix static test
* ff
* fix static test
* unitee testt
* Refactor test_dynamic_controller and fix formatting issues
Added a new import for STOP_AND_GO_FRAME and corrected a float initialization for v_ego in MockCarState. Also fixed indentation in the test_standstill_detection method for consistency.
* Refactor test indentation for dynamic controller tests
Adjust indentation and formatting in test_dynamic_controller.py to ensure consistency and readability. This change does not alter functionality but improves the maintainability of the test code.
* Migrated to pytest using claude
* Integrate radar parameter into dynamic controller's pytest tests
Added a `has_radar` parameter to the test functions in the dynamic controller's pytest file. This allows each function to run both with and without radar inputs, thus enhancing the coverage of our test cases.
* Disabling unittest file to allow checks on the pipeline to succeed.
Pending to remove this, but leaving it to validate the move to pytest is okay before merging
* Replace unittest with pytest for dynamic controller tests
Migrated dynamic controller tests from unittest to pytest for improved readability and maintainability. Refactored mock setup using pytest fixtures and monkeypatching while preserving test coverage.
* new line...
* Refactor and modularize DynamicExperimentalController logic
Moved DynamicExperimentalController logic and helper functions to a dedicated module for better readability and maintainability. Simplified longitudinal planner logic by introducing reusable methods to manage MPC mode and longitudinal plan publishing. Adjusted file structure for dynamic controller-related components and updated relevant imports.
* Add missing import for messaging in helpers.py
The `messaging` module was added to resolve potential issues with undefined references. This change ensures all required imports are present, improving the reliability and maintainability of the code.
* Format
* Formatting
* rebase fix
* Refactor MpcSource definition and update references.
Moved MpcSource enum into LongitudinalPlanSP for better encapsulation. Updated references in helpers.py to use the new path. This change improves code organization and maintains functionality.
* Format
* Refactor DEC into a dedicated longitudinal planner class
Move Dynamic Experimental Control (DEC) logic to a new `DecLongitudinalPlanner` class for better modularity and maintainability. This simplifies the `LongitudinalPlanner` by delegating DEC-specific behavior and consolidates related methods into a single file. Additionally, redundant code was removed to improve readability and reduce complexity.
* **Refactor DEC module structure for better organization**
Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.
* static test
* static
* had moved to car_state
* cleanup
* some more
* static method
* move around
* more cleanup
* stuff
* into their own
* rename
* check live param
* sync with stock
* type hint
* unused
* smoother trans
* window time
* fix type hint
* pass sm.frame from plannerd
* more fixes
* more
* more explicit
* fix test
* Revert "fix test"
This reverts commit 635b15f2bc.
* Revert "pass sm.frame from plannerd"
This reverts commit a8deaa69b8.
* use internal frame
* update name
* never used
* this is why it was never using DEC
* more logs
* slight cleanup
* remove to fail test
* update name
* more
* rename
* move around
* explicit type hints
* move to constants py
* Revert "explicit type hints"
This reverts commit c205497b
* more
* don't set to exp mode initial if DEC is active
* use walrus for None
* Revert "use walrus for None"
This reverts commit 5f2396d490.
* fix wrong typing and variable name
* use walrus (needs cleanup)
* fix tests
* revert smooht lead for now
* dec: how good is FirstOrderFilter?
* Update dec.py
* dec: faster ?
* Revert "dec: faster ?"
This reverts commit 40259cd22a.
* Revert "Update dec.py"
This reverts commit 3f29ccbd99.
* Revert "dec: how good is FirstOrderFilter?"
This reverts commit 01e06df542.
* Update slow-down logic and constants for improved behavior
Adjust the slowdown scaling factor and anomaly handling to refine behavior without abrupt resets. Modify constants to increase window size and adjust probabilities and distances for smoother adaptation. Update version to reflect the new changes.
* Fix lead detection fallback for weighted average check.
Add a fallback value of -1 when computing the weighted average to prevent errors caused by invalid or None values. This ensures robust lead detection and avoids potential crashes or undefined behavior.
* visuals for DEC
* try this
* add opacity
* should be active and dimmer
* even dimmer
* Update dec.py
* Update constants.py
* use another method for drawing
* migrate to sp only
* fix
* init
---------
Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
* MADS: Honda: Cluster icons and events updates
* bump opendbc
* nuke them all to test
* try this
* bring them back
* fix icons
* MADS: Honda: Allow steering
* rename
* match stock
* bump submodules
Using sort by title made things look out of order. If we want to organize them a bit furter, we can do that manually before moving forward with a release.
* Remove contributors section from release drafter template
The contributors section has been removed to simplify the release notes format. This change ensures a cleaner and more focused release draft template.
* Update release-drafter config with new labels and options
Added 'exclude-labels' to filter out 'no-changelog' items and improved category settings with 'collapse-after'. Introduced 'sort-by' for title-based sorting to enhance organization.
* Add configuration files for Release Drafter
This commit introduces two configuration files for the Release Drafter. These include release-drafter.yml which will help categorize changes into features, bug fixes, and maintenance, and workflows/release-drafter.yml which defines a GitHub actions workflow to update release drafts.
* Work on both master branches
* Meh static and i dont need this tbh
* sentry: log fingerprints and save exceptions
* no point
* remove unused imports
* use deprecated
* have to do this
* remove
* cap
* no duplicate
* typo
* don't use deprecated method
* wrap them around
* do this instead
* new endpoint
* no need
* more
* event and checks
* comments
* missed events
* retry 2 times is enough
* rename to radar tracks
* fix data type
* more rename
* bump opendbc
* drain first
* put it behind a toggle lol
* re-enable
* update comments
* revert lead smoothing
* Revert "revert lead smoothing"
This reverts commit 872267970c.
* real events and radard engagement
* only show up for hyundai with mando
* update translations
* bump opendbc
* fix event name
* update description
* move above
* translations
---------
Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
* init dec
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* fix static test
* ff
* fix static test
* unitee testt
* Refactor test_dynamic_controller and fix formatting issues
Added a new import for STOP_AND_GO_FRAME and corrected a float initialization for v_ego in MockCarState. Also fixed indentation in the test_standstill_detection method for consistency.
* Refactor test indentation for dynamic controller tests
Adjust indentation and formatting in test_dynamic_controller.py to ensure consistency and readability. This change does not alter functionality but improves the maintainability of the test code.
* Migrated to pytest using claude
* Integrate radar parameter into dynamic controller's pytest tests
Added a `has_radar` parameter to the test functions in the dynamic controller's pytest file. This allows each function to run both with and without radar inputs, thus enhancing the coverage of our test cases.
* Disabling unittest file to allow checks on the pipeline to succeed.
Pending to remove this, but leaving it to validate the move to pytest is okay before merging
* Replace unittest with pytest for dynamic controller tests
Migrated dynamic controller tests from unittest to pytest for improved readability and maintainability. Refactored mock setup using pytest fixtures and monkeypatching while preserving test coverage.
* new line...
* Refactor and modularize DynamicExperimentalController logic
Moved DynamicExperimentalController logic and helper functions to a dedicated module for better readability and maintainability. Simplified longitudinal planner logic by introducing reusable methods to manage MPC mode and longitudinal plan publishing. Adjusted file structure for dynamic controller-related components and updated relevant imports.
* Add missing import for messaging in helpers.py
The `messaging` module was added to resolve potential issues with undefined references. This change ensures all required imports are present, improving the reliability and maintainability of the code.
* Format
* Formatting
* rebase fix
* Refactor MpcSource definition and update references.
Moved MpcSource enum into LongitudinalPlanSP for better encapsulation. Updated references in helpers.py to use the new path. This change improves code organization and maintains functionality.
* Format
* Refactor DEC into a dedicated longitudinal planner class
Move Dynamic Experimental Control (DEC) logic to a new `DecLongitudinalPlanner` class for better modularity and maintainability. This simplifies the `LongitudinalPlanner` by delegating DEC-specific behavior and consolidates related methods into a single file. Additionally, redundant code was removed to improve readability and reduce complexity.
* **Refactor DEC module structure for better organization**
Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.
* static test
* static
* had moved to car_state
* cleanup
* some more
* static method
* move around
* more cleanup
* stuff
* into their own
* rename
* check live param
* sync with stock
* type hint
* unused
* smoother trans
* window time
* fix type hint
* pass sm.frame from plannerd
* more fixes
* more
* more explicit
* fix test
* Revert "fix test"
This reverts commit 635b15f2bc.
* Revert "pass sm.frame from plannerd"
This reverts commit a8deaa69b8.
* use internal frame
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* init btns
* better design
* force offroad in another PR
* old calibration design for now
* revert
* ci: fix position
* try this
* check ci
* Revert "check ci"
This reverts commit 80795cc700.
* test more ci
* Revert "test more ci"
This reverts commit 05670b5ad6.
* nuke more on CI
* unlikely but why not
* Revert "unlikely but why not"
This reverts commit 72f45a7516.
* Revert "nuke more on CI"
This reverts commit 7f406efc24.
* try this
* Revert "try this"
This reverts commit 3ce6768067.
* same across
* Refactor GitHub runner installation script
Enhance the script with modular functions for better readability and maintenance. Add support for restoration mode, enabling the recovery of existing runner configurations. Improve error handling, argument parsing, and system configuration setup.
* Ensure runner directory existence before restoration
Add a prerequisite check to verify the runner directory exists, preventing restoration failures due to a missing directory. Adjust exit code logic for proper handling when no restoration is required.
* rw not needed until a bit later
* Refactor system configuration handling and remount logic.
Reorganized system setup functions and centralized remount logic for consistency and clarity. Improved script structure by separating utility and setup functions, ensuring proper remounting behavior with a robust exit trap. Reduced redundancy and enhanced maintainability.
* silly change
* modeld: Retain pre-20hz drive model support
* Method not available anymore on OP
* some fixes
* Revert "Long planner get accel: new function args (#34288)"
* Revert "Fix low-speed allow_throttle behavior in long planner (#33894)"
* Revert "long planner: allow throttle reflects usage (#33792)"
* Revert "Gate acceleration on model gas press predictions (#33643)"
* Reapply "Gate acceleration on model gas press predictions (#33643)"
This reverts commit 76b08e37cb.
* Reapply "long planner: allow throttle reflects usage (#33792)"
This reverts commit c75244ca4e.
* Reapply "Fix low-speed allow_throttle behavior in long planner (#33894)"
This reverts commit b2b7d21b7b.
* Reapply "Long planner get accel: new function args (#34288)"
This reverts commit 74dca2fccf.
* don't need
* retain snpe
* wrong
* they're symlinks
* remove
* put back into VCS
* add back
* don't include built
* Refactor model runner retrieval with caching support
Added caching for active model runner type via `ModelRunnerTypeCache` to enhance performance and avoid redundant checks. Introduced a `force_check` flag to bypass the cache when necessary. Updated related code to handle cache clearing during onroad transitions.
* Update model runner determination logic with caching fix
Enhances `get_active_model_runner` to utilize caching more effectively by ensuring type consistency and updating cache only when necessary. Also updates `is_snpe_model` to pass the `started` state to the runner determination function, improving behavior for dynamic checks.
* parse inputs via metadata
* load model and metadata dynamically
* cherry pick from devtekve as base
* lateral_control_params & prev_desired_curv: MLSIM V0 to Null Pointer
* old desired_curv data: MLSIM V1 to Postal Service
* Bringing what was on master back then
* Cleaning up
* Refactor model pipeline for modularity and dynamic input handling
Refactored the model pipeline by introducing helper functions to modularize model loading, metadata extraction, and input preparation. Improved flexibility in handling dynamic input keys and parsing outputs based on model configuration. Removed deprecated or unused code segments for cleaner and more maintainable structure.
* Push NDv2 because why not and fix modeld
* `Refactor model parsing and clean unused code dependencies`
Simplified `parse_outputs` by removing unnecessary `input_keys` parameter, ensuring cleaner logic. Updated `PROCESS_NAME` for standardization and eliminated deprecated `Pathlib` dependencies in model paths. Minor adjustments improve input handling for lateral control parameters.
* Refactor model and metadata loading functions.
Simplified and clarified `load_model` by renaming it to `get_model_path` and removing redundant variable assignments. Streamlined `load_metadata` by directly returning the loaded metadata without intermediate variables. These changes improve code readability and maintainability.
* Refactor modeld process selection based on SNPE support.
Introduce conditional logic to determine and start the appropriate modeld process (SNPE or default) based on hardware support. This improves flexibility and ensures correct process management.
* Walrus baby
* Update longitudinal_planner.py
* Improve model download progress handling and translations
Refactored model download status handling logic for better clarity and added mechanisms to track status changes efficiently. Updated UI text and translations across multiple languages to reflect consistent and accurate model download states.
* Revert "Update longitudinal_planner.py"
This reverts commit b44a687e4c.
* Fix variable naming for curvature size in modeld.py
Renamed the variable `len` to `length` to avoid conflict with the built-in `len()` function, improving code clarity and preventing potential errors. Also removed trailing spaces in commented-out sections for better formatting consistency.
* sync with upstream
* some are different
* should work
* sim_pose only exists in in ndv3 and prior
* dynamic meta constants
* fix
* uiview: disable power saving
* fix this
* ain't coasting for y'all
* Static analysis
* Refactor initialization of model inputs for clarity.
Removed redundant pre-initialization of `driving_style`, `nav_features`, and `nav_instructions` variables. Instead, directly initialize these within their respective conditional blocks for better readability and reduced memory usage.
* default to none
* enable in next PR
* more
* Revert "more"
This reverts commit f5a4220588.
* Revert "enable in next PR"
This reverts commit 621cc4f18e.
* no need to cast bool
* nuke
* fix desired curvature for pre LAv1 models
* mypy
* static
* fix
* new json
* Going to a test branch with a different model json list
* renamed model json
* Update model runner handling in custom.capnp and helpers
Refactored model runner logic by introducing a `runner` field in `custom.capnp` and simplifying `get_active_model_runner` logic. Removed deprecated function `get_model_runner_by_filename` and added a temporary filter in `fetcher.py` to enforce `snpe` until full tinygrad support is implemented.
* Revert "Update model runner handling in custom.capnp and helpers"
This reverts commit f34d872c13.
* Revert "renamed model json"
This reverts commit 15c6ed303b.
* Revert "Going to a test branch with a different model json list"
This reverts commit 4c1408fee5.
* Reapply "renamed model json"
This reverts commit c6fec6912a.
Reapply "Going to a test branch with a different model json list"
This reverts commit 83e253e9a3.
* Add 'runner' property to 'ModelBundle' and update relevant functions
The 'ModelBundle' class in 'custom.capnp' has been extended to include a 'runner' property. This required updating 'fetcher.py' to handle the 'runner' property when parsing model bundles. Additionally, the helper function 'get_model_runner_by_filename' has been removed from 'helpers.py' as it is no longer needed because the 'runner' property provides this information. The 'get_active_model_runner' function has also been updated in light of these changes.
* Refine bundle selection logic in SoftwarePanelSP
Improve logic for determining which model bundle to display by considering download status and failure state. Remove unnecessary function call to enhance clarity and maintainability.
* tmp
* Add retrieval of active model bundle in manager loop
Introduce a call to `get_active_bundle` to fetch the active model bundle and store it in `self.active_bundle`. This ensures the active bundle is always up-to-date during the model management process.
* Add "Use Default" option for model selection
Introduced a "Use Default" option in the model selection dropdown, allowing users to reset to the default model. Adjusted logic to handle default selection and ensure proper parameter updates. Fixed bundle status handling during the download process in the model manager.
* Refactor type hint in active_bundle assignment.
Removed an unnecessary type hint in the active_bundle assignment for cleaner and more maintainable code. This change does not affect functionality but improves code readability.
* no nested
* update json url
* split out
* format
* condense
* more
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
* Add job to fetch and upload model artifacts
Introduced a new `get_model` job to retrieve and upload model artifacts as part of the workflow. Updated the `build_model` job to download and clean up model files before building, ensuring an isolated and streamlined process. These changes improve modularity and artifact handling in the CI pipeline.
* Refine model file handling in build workflow
Restrict deletion and download commands to ".onnx" files to prevent unintended removal or overwriting of non-ONNX files. This ensures a more targeted and safer workflow for handling model artifacts.
* Update model artifact handling in build workflow
Changed artifact upload path to include only .onnx files and commented out the deletion of existing models. Also added a dependency for the build stage to ensure proper execution sequence.
* Update build workflow to refine model artifact handling
Removed unused code for deleting models and fixed the artifact path. Added a reference file logging custom name and upstream branch for better traceability. These changes streamline the workflow and improve clarity.
* Set dynamic run-name for sunnypilot build workflow
Added a customizable `run-name` field in the sunnypilot build model workflow. This allows more informative and dynamic naming based on input parameters such as `custom_name` or `upstream_branch`. Improves clarity and traceability in workflow runs.
* Add customization options and metadata generation to build
Introduce new inputs for file name prefix and 20Hz model specification in the workflow. Enable renaming of model files, generation of file hashes, and creation of a `metadata.json` file containing build details. This improves flexibility and enhances artifact information management.
* Refactor CI workflow to remove redundant get_model job
The `get_model` job has been removed, and its relevant steps have been merged into the `build_model` job to streamline the workflow. Additionally, a patch for `SConstruct` has been added to support an arbitrary cache directory configuration. This simplifies the pipeline while maintaining functionality.
* powersave ok ok
* Revert "powersave ok ok"
This reverts commit 716b9f1e2d.
* Update build process to use .thneed files over .pkl
Replaced .pkl file references with .thneed in the sunnypilot build workflow. Adjusted file renaming, hashing, and metadata handling to align with the new file format. This ensures compatibility with the updated file structure.
* let's seeeeeeeeee
* Remove unused CXXFLAGS from build step in workflow
CXXFLAGS options `-Wno-vla-extension` and `-Wno-vla-cxx-extension` were removed from the `scons` command as they are no longer necessary. This simplifies the build configuration and ensures cleaner workflows.
* modeld: Retain pre-20hz drive model support
* Method not available anymore on OP
* some fixes
* Revert "Long planner get accel: new function args (#34288)"
* Revert "Fix low-speed allow_throttle behavior in long planner (#33894)"
* Revert "long planner: allow throttle reflects usage (#33792)"
* Revert "Gate acceleration on model gas press predictions (#33643)"
* Reapply "Gate acceleration on model gas press predictions (#33643)"
This reverts commit 76b08e37cb.
* Reapply "long planner: allow throttle reflects usage (#33792)"
This reverts commit c75244ca4e.
* Reapply "Fix low-speed allow_throttle behavior in long planner (#33894)"
This reverts commit b2b7d21b7b.
* Reapply "Long planner get accel: new function args (#34288)"
This reverts commit 74dca2fccf.
* don't need
* retain snpe
* wrong
* they're symlinks
* remove
* put back into VCS
* add back
* don't include built
* Refactor model runner retrieval with caching support
Added caching for active model runner type via `ModelRunnerTypeCache` to enhance performance and avoid redundant checks. Introduced a `force_check` flag to bypass the cache when necessary. Updated related code to handle cache clearing during onroad transitions.
* Update model runner determination logic with caching fix
Enhances `get_active_model_runner` to utilize caching more effectively by ensuring type consistency and updating cache only when necessary. Also updates `is_snpe_model` to pass the `started` state to the runner determination function, improving behavior for dynamic checks.
* default to none
* enable in next PR
* more
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* modeld: Retain pre-20hz drive model support
* Method not available anymore on OP
* some fixes
* Revert "Long planner get accel: new function args (#34288)"
* Revert "Fix low-speed allow_throttle behavior in long planner (#33894)"
* Revert "long planner: allow throttle reflects usage (#33792)"
* Revert "Gate acceleration on model gas press predictions (#33643)"
* Reapply "Gate acceleration on model gas press predictions (#33643)"
This reverts commit 76b08e37cb.
* Reapply "long planner: allow throttle reflects usage (#33792)"
This reverts commit c75244ca4e.
* Reapply "Fix low-speed allow_throttle behavior in long planner (#33894)"
This reverts commit b2b7d21b7b.
* Reapply "Long planner get accel: new function args (#34288)"
This reverts commit 74dca2fccf.
* don't need
* retain snpe
* wrong
* they're symlinks
* remove
* put back into VCS
* add back
* don't include built
* Refactor model runner retrieval with caching support
Added caching for active model runner type via `ModelRunnerTypeCache` to enhance performance and avoid redundant checks. Introduced a `force_check` flag to bypass the cache when necessary. Updated related code to handle cache clearing during onroad transitions.
* Update model runner determination logic with caching fix
Enhances `get_active_model_runner` to utilize caching more effectively by ensuring type consistency and updating cache only when necessary. Also updates `is_snpe_model` to pass the `started` state to the runner determination function, improving behavior for dynamic checks.
* default to none
* enable in next PR
* more
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Increase timeout for test report creation by 1 minute
Adjusted the `timeout-minutes` value to allow more time for the
test report creation step.
* Add script to disable power save in build workflow
This commit integrates the `disable-powersave.py` script into the sunnypilot build workflow. It ensures power save mode is disabled during the build process, improving reliability and consistency.
* Set PYTHONPATH before running disable-powersave.py
The change ensures the correct Python module path is set when executing the disable-powersave script. This update prevents potential import issues by including the GitHub workspace in the PYTHONPATH.
* Refactor powersave handling with a dedicated script
Replaced inline powersave disable logic with a new script `manage-powersave.py` to handle enabling and disabling power saving mode. Updated the CI workflow to use this script and added a step to re-enable powersave after builds. This improves clarity and modularity for power management operations.
* Enable CPU core count display in power save script
Introduce multiprocessing to show the number of CPU cores available. Added messages to indicate power save mode state and core count, improving script feedback and user clarity.
* Refine power save mode logging output.
Improve clarity of logging messages in `manage-powersave.py` by indicating CPU core counts before and after applying changes. Simplified the power save state message for better readability.
* Updated scons cache key restore logic in GitHub workflows
This commit updates the restore key logic in two GitHub workflow config files (sunnypilot-build-model.yaml and sunnypilot-build-prebuilt.yaml). The restore key sequence has been revised for improved accuracy and consistency. This should optimize the cache hit rate and speed up the subsequent builds.
* Add comments on GitHub Actions cache isolation behavior
Clarifies the cache isolation enforced by GitHub Actions for security reasons. Notes that only caches from the default branch are shared across all builds, and this behavior cannot be changed. This improves maintainability and understanding of the workflow configuration.
Ensure the cache is treated as expired when last_sync is zero. This prevents potential issues with uninitialized or missing sync timestamps, enhancing reliability.
* cabana: enhance message heatmap visualization (#34239)
* enhance message heatmap visualization
* TODO
* improve log_factor
* typo
* bit_flip_counts
* Openpilot webcam support improved (#34215)
* control webcam with ENV vars
* WIP: actual instructions
* wording
* file no longer exists
* this is expected behavior, just untested
* more readable
* tested on fresh install
* wording tweaks
* explicit USE_WEBCAM toggle required
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* debug-ability improved
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* newline removed
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Update metadrive wheel (#34292)
* test
* new wheel
* fix IR power scaling (#34293)
* fix IR power scaling
* Update system/hardware/tici/hardware.h
* replay: Update video immediately after seek when paused. (#34237)
replay: Update video immediately after seeking when paused.
Otherwise, if paused then have to resume playback for the video
frame to update and show the new location.
Implemented by temporarily un-pausing replay for a single
frame time.
* cabana: add live and time-window heatmap modes for enhanced signal analysis (#34296)
add live and time-window heatmap modes
* timed: diff against absolute value of timedelta (#34299)
* cabana: miscellaneous bug fixes and enhancements (#34297)
* toHexString
* use QToolBar
* fix incorrect groove rect
* limit CAN_MAX_DATA_BYTES
* add series type selector to chart toolbar
* dim inactive messages
* rename
* add help to chart
* cleanup
* cabana: real-time cursor and video frame sync for chart and video (#34301)
* sync cursor and thumbnail between chart and video
* Revert "replay: Update video immediately after seek when paused. (#34237)"
This reverts commit 3363881844.
* use thumbnails while scrubing
* draw alert
* no update on resume
* draw timestamp
* cleanup
* replay: fix various synchronization and event handling issues (#34254)
fix various synchronization and event handling issues
* cabana: fix crash in live streaming mode by skipping thumbnail display (#34302)
resolve crash in live streaming mode
* bump panda
* [bot] Update Python packages (#34304)
Update Python packages
Co-authored-by: Vehicle Researcher <user@comma.ai>
* cleanup touch_replay (#34305)
mathematics
* uv from brew doesn't have self update
* Skip registration on newer devices (#34316)
* tici: fix cpp device type (#34315)
fix cpp
* Tinygrad upstream master (#34325)
Upstream master
* [bot] Update Python packages (#34320)
Update Python packages
Co-authored-by: Vehicle Researcher <user@comma.ai>
* cabana: fix missing transmitter after undoing DBC message removal (#34329)
fix missing transmitter after undoing DBC message removal
* Quick GC pass heading into 2025 (#34330)
* first pass
* bye bye snpe
* [bot] Update Python packages (#34334)
Update Python packages
Co-authored-by: Vehicle Researcher <user@comma.ai>
* Notre Dame model in tinygrad (#34324)
* release model: 6f23a03f-486b-4d3e-a314-19d149644c7c/700
* old style model in tinygrad
* fix desire
* tg hack
* 20Hz
* no gas probs
* No gas here
* better indexing
---------
Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
---------
Co-authored-by: Dean Lee <deanlee3@gmail.com>
Co-authored-by: Mike Busuttil <31480000+MikeBusuttil@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Co-authored-by: Angus Gratton <gus@projectgus.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
* Update model manager logic and handle offroad transitions
Added is_onroad state tracking in SoftwarePanelSP to handle offroad transitions. Updated model manager conditions for improved bundle validation. Removed unnecessary clear operation for ModelManager_DownloadIndex during offroad transitions to optimize behavior.
* Using is_onroad softwarePanel
* Enable model label button only when conditions are met
Previously, the button's state update was misplaced, leading to potential issues with its interactive availability. The logic has been adjusted to ensure it is properly enabled or disabled based on onroad status and download progress. This change improves UX consistency and prevents unintended actions.
* Remove redundant setEnabled call for currentModelLblBtn
The setEnabled call was unnecessary as its functionality was not required in this context. Cleaning up this code improves readability and removes redundant operations. No changes to functionality or behavior were introduced.
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* tinygrad with snpe
* force with snpe to validate
* fix path
* fix more paths
* Adjust modeld execution logic based on active model runner
Introduced a check to conditionally execute `modeld` based on the active model runner. Added support for distinguishing between SNPE and TinyGrad runners using new helper functions and updated `custom.capnp` definitions. This change optimizes process management by ensuring compatibility with the selected model runner.
* Refactor modeld process function checks.
Introduce `is_stock_model` to clarify logic and replace direct uses of `is_snpe_model` where the stock model condition is needed. Additionally, rename the duplicate "modeld" process in sunnyPilot to "modeld_snpe" for clarity and consistency.
* ignore tg
* fix process name
* ruff
* fix thneed paths
* mypy
* remove our own
* use upstream compile3
* fix thneed
* try this
* Revert "remove our own"
This reverts commit 1cf4f57502.
* try using compile2.py again
* add back symlink
* fix path
* more fix
* wrong path again
* Revert "wrong path again"
This reverts commit f5301c19d5.
* update
* hardcode path to our submodule
* force path
* try this
* fix file name
* try this
* again
* Revert "again"
This reverts commit 17c8cd7376.
* Revert "try this"
This reverts commit 767f78bbcf.
* Revert "fix file name"
This reverts commit 485eef68da.
* Revert "try this"
This reverts commit 41fef87680.
* Revert "force path"
This reverts commit 5c3b408937.
* Revert "hardcode path to our submodule"
This reverts commit 5ee1950b6f.
* Revert "update"
This reverts commit fb313bd7fb.
* Reapply "wrong path again"
This reverts commit 309639aeb3.
* Revert "wrong path again"
This reverts commit f5301c19d5.
* Revert "more fix"
This reverts commit 23dd423e78.
* Revert "fix path"
This reverts commit 75d338f2bd.
* Revert "add back symlink"
This reverts commit 9f71ad0b8a.
* Revert "try using compile2.py again"
This reverts commit 914117d2e1.
* Reapply "remove our own"
This reverts commit b1996377b3.
* don't even compile anymore
* need it for default snpe model
* add to lfs
* bring onnx back for sim
* must add this back
* need this
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* onroad init
* init model renderer
* Add default virtual destructors to HudRenderer and AnnotatedCameraWidget
This ensures proper cleanup of derived classes if they override these destructors. Adding default destructors promotes better memory safety and adheres to modern C++ best practices.
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add Sunnylink integration for improved device communication
This commit introduces Sunnylink support, including modules for API interactions, device registration, logging, and uploader processes. Key changes involve adding Sunnylink-related components, such as sunnylinkd, manage_sunnylinkd, and associated utilities, along with seamless integration into process management.
* Refactor Sunnylink modules and update import paths
Standardize parameter handling in Sunnylink functions by initializing Params within functions as needed. Update imports to use fully-qualified paths for better clarity and consistency. Also, refactor logging messages for improved readability and maintainability.
* Add Sunnylink support and improve log handling
Introduced Sunnylink-specific functionality, including compression for oversized logs and platform-specific socket handling for macOS. Improved logging mechanisms, refactored log queue management, and fixed exception handling in sunnylinkd.
* Refactor and fix minor coding style inconsistencies
Remove unnecessary string concatenation, adjust spacing for better readability, and ensure cleaner code in `athenad.py` and `sunnylink.py`. Added a macOS-specific comment for TCP_KEEPALIVE configuration to improve code clarity.
* Replace platform system check with sys platform in athenad.py
To check for macOS platform, the code in athenad.py has been altered. Originally, the platform.system() function was used. However, the function has been replaced with sys.platform for a more consistent and preferable syntax. Particularly, this has been modified in the context of setting socket options.
* Apply suggestions from code review
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Simplify imports and reformat API function.
Removed unused `platform` import for cleanup in `athenad.py`. Improved readability of `api_get` in `__init__.py` by reformatting the long return statement into multiple lines.
* Adjust backoff logic and refactor API call formatting.
Introduce randomness to backoff calculation in Sunnylink API to reduce synchronization issues. Minor code refactoring improves readability in the API call logic.
* Refactor Sunnylink network check logic.
Removed hardware-based network check due to performance concerns and replaced it with a real-time device state monitoring loop. This improves efficiency and ensures accurate online status before proceeding with Sunnylink registration.
* Apply suggestions from code review
* `Refactor saveParams error handling and simplify logic`
Removed redundant try-except block wrapping the entire method for clarity. Moved error logging directly inside the loop to handle individual parameter exceptions more effectively. Simplified dictionary construction and improved error logging format.
* Add BACKUP flag to select persistent parameters
This commit introduces a new BACKUP flag and applies it to specific persistent parameters in `params.cc` and `params.h`. The BACKUP flag enhances data retention by designating parameters for inclusion in backups, ensuring crucial information is preserved across sessions.
* Simplify Sunnypilot params formatting
Removed unnecessary blank lines and adjusted the Sunnypilot comment format for better readability and consistency. No functional changes were made.
* SP: Move Sunnypilot-related code to sunnypilot/sunnylink (#504)
* Refactor and relocate sunnylink-related modules
sunnylink components have been reorganized for better modularity and clarity, with files moved under `sunnypilot/sunnylink`. Unused code was removed, and reusable utilities were separated for easier maintenance. Adjusted references across the project to reflect these changes.
* Permissions
* adding init py
* Add sunnylink toggle to developer panel and translations
This commit introduces a new toggle for enabling or disabling sunnylink in the developer panel. Corresponding translation entries have been added for all supported languages to ensure compatibility across the UI.
* Add SunnyLink integration and multi-language support updates
Enhanced SidebarSP with SunnyLink connection status and temperature display. Extended translations for multiple languages, including new strings. Updated build scripts and added utility functions for SunnyPilot-specific features.
* Need it this way as it's intentionally shortened. Sorry
* format
* only block drawing
* format
* format
* fix path
* cleanup translations
* sunnylink panel
* offroad transition
* remove stretch
* add panel to ui preview
* Translating to spanish
* just reorder params
* Refactor sidebar drawing method names and remove unused code.
Renamed `paintSidebar` to `drawSidebar` for better clarity across both `Sidebar` and `SidebarSP` classes. Removed unused utility functions `drawRoundedRect` and `interpColor` to streamline the codebase and improve maintainability.
* Updating translations
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add Sunnylink integration for improved device communication
This commit introduces Sunnylink support, including modules for API interactions, device registration, logging, and uploader processes. Key changes involve adding Sunnylink-related components, such as sunnylinkd, manage_sunnylinkd, and associated utilities, along with seamless integration into process management.
* Refactor Sunnylink modules and update import paths
Standardize parameter handling in Sunnylink functions by initializing Params within functions as needed. Update imports to use fully-qualified paths for better clarity and consistency. Also, refactor logging messages for improved readability and maintainability.
* Add Sunnylink support and improve log handling
Introduced Sunnylink-specific functionality, including compression for oversized logs and platform-specific socket handling for macOS. Improved logging mechanisms, refactored log queue management, and fixed exception handling in sunnylinkd.
* Refactor and fix minor coding style inconsistencies
Remove unnecessary string concatenation, adjust spacing for better readability, and ensure cleaner code in `athenad.py` and `sunnylink.py`. Added a macOS-specific comment for TCP_KEEPALIVE configuration to improve code clarity.
* Replace platform system check with sys platform in athenad.py
To check for macOS platform, the code in athenad.py has been altered. Originally, the platform.system() function was used. However, the function has been replaced with sys.platform for a more consistent and preferable syntax. Particularly, this has been modified in the context of setting socket options.
* Apply suggestions from code review
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Simplify imports and reformat API function.
Removed unused `platform` import for cleanup in `athenad.py`. Improved readability of `api_get` in `__init__.py` by reformatting the long return statement into multiple lines.
* Adjust backoff logic and refactor API call formatting.
Introduce randomness to backoff calculation in Sunnylink API to reduce synchronization issues. Minor code refactoring improves readability in the API call logic.
* Refactor Sunnylink network check logic.
Removed hardware-based network check due to performance concerns and replaced it with a real-time device state monitoring loop. This improves efficiency and ensures accurate online status before proceeding with Sunnylink registration.
* Apply suggestions from code review
* `Refactor saveParams error handling and simplify logic`
Removed redundant try-except block wrapping the entire method for clarity. Moved error logging directly inside the loop to handle individual parameter exceptions more effectively. Simplified dictionary construction and improved error logging format.
* Add BACKUP flag to select persistent parameters
This commit introduces a new BACKUP flag and applies it to specific persistent parameters in `params.cc` and `params.h`. The BACKUP flag enhances data retention by designating parameters for inclusion in backups, ensuring crucial information is preserved across sessions.
* Simplify Sunnypilot params formatting
Removed unnecessary blank lines and adjusted the Sunnypilot comment format for better readability and consistency. No functional changes were made.
* SP: Move Sunnypilot-related code to sunnypilot/sunnylink (#504)
* Refactor and relocate sunnylink-related modules
sunnylink components have been reorganized for better modularity and clarity, with files moved under `sunnypilot/sunnylink`. Unused code was removed, and reusable utilities were separated for easier maintenance. Adjusted references across the project to reflect these changes.
* Permissions
* adding init py
* more
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* allow re-regage
* bump opendbc
* bump panda
* apply pause/resume fix for hyundai (should do this in a separate PR)
* bump opendbc
* fix
* rename
* Fix?
* make sure to disengage for allow always cars
* fix
* combine
* more fix
* not needed
* check if engagement is from openpilot's state machine
* Rename
* fix panda safety
* fix
* no fake lfa button for @devtekve ;)
* fix non drive gear re-engage
* fix settings
* combine
* add replace method
* use replace
* remoev already checks if it exists
* fix
* group
* add todo
* reserve events
* cleaner
* hyundai: only allow for cars with lfa button
* sunnyParams
* make sure it's car only
* Move car-specific changes to opendbc
* no need
* bump opendbc
* more fixes
* no more available
* more!
* final?
* always emit user disable
* no longer needed
* move unit test
* add sunnypilot to unit tests
* bump opendbc
* use new cereal
* bump opendbc
* static analysis
* no unittest
* no need available
* UI border update
* show MADS updates
* Add TODO
* no longer needed
* fix changed events
* fix cluster enabled
* don't add pre enable if not long
* should use enabled
* enabled <-> active
* better format
* bump opendbc
* static analysis
* static analysis
* Rename test as collector was dying
* Show our overriding
* Revert "show MADS updates"
This reverts commit daf0ad62
Revert "fix changed events"
This reverts commit 31d8c97f
* ignoring reserved events
* adjusting creation delays
* back to stock
removing allow_cancel
* should be enabled
* revert
* silent lkas disable
* no need
* user disable tests
* just warning
* MUST REMOVE test process replay
* fix no entry
* fixme
* bump opendbc
* need this check
* cleanup
* allow entering paused state if no entry from disabled
* brake hold should apply to all
* in lists
* update unit test
* simpler
* unused
* same thing
* fix
* only mads in enabled state and long in disabled state
* unify silent enable
* do this for dlob
* bump submodules
* fix
* bump submodules
* bump opendbc
* less frequent
* more events
* fix
* allow no entry to paused for non-drive gears
* fix
* use cereal
* Revert "allow no entry to paused for non-drive gears"
This reverts commit 6d64a4dd9c.
* allow in all
* Revert "allow in all"
This reverts commit 6375f14891.
* should not be all!
* rename for clarity
* silent park brake
* flipped
* bump submodules
* Bump to latest mads-new panda
* bump panda
* more nissan
* bump panda
* bump msgq
* bump panda
* bump submodules
* bump opendbc
* bump opendbc
* improving the state
* Revert "PlayStation® model (#34133)"
This reverts commit 5160bee543.
* should be none
* bump panda
* bump opendbc
* Apply suggestions from code review
* bump panda
* bump ref panda
* add todo-sp
* bump panda ref
* bump more panda
* changing refs
* nuke nuke nuke
* use sunny's newer states
* bump with new panda
* bump panda
* Parse more flags from alt exp, more tests, hyundai main cruise allowed
* Parse more flags from alt exp, more tests, hyundai main cruise allowed
* missed
* mutation for controls allowed rising edge
* ford mutation
* license
* remove
* unused
* bump submodules
* use always allowed mads button alt exp
* fix
* whitelist jason's lastname to codespell
* test_processes: update ref logs to 82c0278
* bump submodules
* bump submodules
* bump submodules
* bump panda
* add controls mismatch lateral event
* Simplify lateral disengagement logic for MADS configuration
Reversed the conditional to align the logic with the `disengage_lateral_on_brake` parameter. This ensures that lateral disengagement behavior is more intuitive and matches the expected configuration. Improves code readability and reduces potential misconfigurations.
* remove unified engagement mode in panda
* controls allow should be allowed at all times
* squash! treat MADS button as user entry
* heartbeat for mads
* heartbeat mismatch exit control
* remove always allow mads button from alt
* move to safety_mads
* remove main cruise allowed from alt
* bump panda
* heartbeat engaged mads mismatch mutation test
* bump panda
* use mads the third panda
* ignore pre enable with mads
* only force exit if actually actuating
* use brake signal instead of pedal events when dlob is active
* fix tests
* fix panda tests
* bump panda
* new events to retain long blocks
* format
* uem: do not engage mads if long is engaged
* bump submodules
* fix not allowed engaged bug
* block uem from engaging
* flipped
* use different heartbeat check if dlob
* hard code to skip heartbeat check
* remove toyota lta status for lkas, causes weird behaviors
* block tesla
* bump panda
* bump to merged panda
* bump opendbc
* bump opendbc
* bump opendbc
* bump opendbc
* Apply suggestions from code review
* code ignore spells
* needs to be in carstate
* Bump opendbc
* Update MADS toggle descriptions for clarity.
Added notes to clarify behavior of the "MadsMainCruiseAllowed" setting, particularly its impact on vehicles without LFA/LKAS buttons. This ensures users are informed about potential implications when disabling this feature.
* Updating translations + Adding spanish
* Disengage Lateral on Brake -> Pause Lateral on Brake
* test_processes: update ref logs to dd41005
* Apply suggestions from code review
* fix mads button not allowed
* bump submodules
* bump submodule
* test_processes: update ref logs to 0a0b998
* has multiple lists
* Revert "has multiple lists"
This reverts commit a37c1d26fe.
* base
* Reapply "has multiple lists"
This reverts commit d1cd8dcc81.
* migrate mads toggles to sp panel
* this is why it keeps crashing
* house keeping
* more housekeeping
* more housekeeping
* don't show description by default (yet)
* reset to main panel when clicked away
* more
* some more with interactions
* don't stretch cause it looks weird with descriptions
* simpler to handle offroad transition
* some are toggleable while onroad
* remove unused event
* slight cleanup
* default to true for HKG main cruise toggle
* append to list after
* add Customize MADS to UI preview
* simpler
* move to sp list
* how tf was this removed
* update mads settings button on show event
* test_processes: update ref logs to efa9c32
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Introduce Model Manager to handle downloads and verification
This commit introduces a new Model Manager responsible for handling model downloads, including driving and navigation application models. The manager also verifies file hashes and communicates download progress for an improved user experience.
The Model Manager is asynchronous and utilizes asyncio and aiohttp for enhanced performance, including robust error handling.
Impacted files in the 'cereal', 'common', 'sunnypilot', and 'system' directories have been updated accordingly. The 'ModelsFetcher' process configuration has been modified to run only when off-road, ensuring optimum resource management.
This update aims to enhance code clarity, improve performance, and streamline the handling of model downloads.
* "Update model management and fetching for SunnyPilot"
This update refactors the model management, downloading and cache verification mechanisms of SunnyPilot. New functionalities, such as smart cache handling, have been implemented in ModelFetcher in sunnypilot/models/model_fetcher.py. Also, the model downloading process has been moved to a separate async function _download_bundle in ModelManagerSP in sunnypilot/models/model_manager.py. Hash verification of files is now performed in an async function verify_file in sunnypilot/models/model_helper.py. Changes in system parameters related to model management have been reflected in system/manager/manager.py.
* Integrate download ETA calculations in model manager
This commit introduces a new feature that calculates and tracks the Estimated Time of Arrival (ETA) for downloading models in the model manager component. The 'eta' property in the 'DownloadProgress' structure in 'custom.capnp' is changed from 'Float32' to 'UInt32'.
In the 'model_manager.py' file, a new method '_calculate_eta' has been added to perform ETA calculations. An additional dictionary '_download_start_times' has been created to keep track of the start time of each model download. The ETA is calculated every time a portion of the model file is downloaded, and it gets updated in the 'DownloadProgress' structure. Finally, the start time is cleared after the download completes.
In 'model_manager_audit.py', an additional check is added to only print downloadProgress for the downloads currently in progress.
* format
* no default model cache {} because it can be considered a valid json, we do not want that
* Refactor typing annotations to use PEP 604 syntax.
Updated type hints to adopt PEP 604 union syntax (`X | None`) and replaced `List` and `Dict` with modern built-in `list` and `dict`. This change improves consistency and readability while aligning with Python 3.10+ standards.
* Simplify logging messages and remove unused imports.
Removed an unused import from `model_manager.py` to improve clarity and maintainability. Also refined a log message in `model_fetcher.py` by removing unnecessary formatting for consistency.
* Refactor model handling and simplify cache fallback logic.
Updated type annotations for `selected_bundle` in `model_manager.py` for clarity. Streamlined cache fallback logic in `model_fetcher.py` by removing redundant conditionals while preserving functionality. These changes improve code readability and maintainability.
* "Fix formatting for ModelManager_DownloadIndex retrieval
Condensed parameter alignment in the get method for improved readability and adherence to style guidelines. This change does not affect functionality but ensures consistent code formatting."
* Need to have main defined for process_config to be able to run it
* Refactor model management to support active bundle tracking
Introduce the concept of an active model bundle with a new persistent parameter and API updates. Added fields for `generation` and `environment` in model metadata, improved caching, and updated methods to manage active model states efficiently.
* UI commit (#515)
* Refactor model management to support active bundle tracking
Introduce the concept of an active model bundle with a new persistent parameter and API updates. Added fields for `generation` and `environment` in model metadata, improved caching, and updated methods to manage active model states efficiently.
* Add new driving model selection feature to settings
This commit introduces a new feature to the settings that allows users to select different driving models. It fetches available models and displays their download progress. The created UI also suggests a calibration reset after model download. The changes include the creation of 'SoftwarePanelSP' within 'settings.' Additionally, 'sunnypilot/SConscript' has been updated to include 'settings.cc' and 'software_panel.cc'. Changes also include localization for this feature.
* Show model description during download status
This update ensures the model description is displayed when a model is in the downloading state. It improves the user interface by providing real-time feedback during the download process.
* Update translations for multiple languages
Added new and updated translation strings in several language files, including Spanish, Arabic, Chinese (Simplified and Traditional), Turkish, Korean, Thai, Japanese, and Brazilian Portuguese. These updates include placeholder translations for new UI elements and features.
* Refactor model name handling and add generation check.
Replaced `bundleName` with `model_name` for better clarity in status messages. Added a generation mismatch check before showing the reset parameters dialog to avoid unnecessary prompts.
* Update model handling in SoftwarePanelSP
Remove unused "common/model.h" and replace "CURRENT_MODEL" with "..." as the default return value in GetModelName. Adjust logic to check for active bundles instead of selected bundles for improved accuracy. Minor text change for clarity in UI label.
* Rename `GetModelName` to `GetActiveModelName` for clarity.
The new name better reflects the function's purpose of retrieving the active model name, improving code readability. All relevant calls and references have been updated to ensure consistency across the codebase.
* Update sunnypilot/models/model_helper.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Refactor download status handling and add 'cached' state
Introduce 'cached' as a new download status and adjust relevant logic across components to support it. Simplify and streamline model status handling in the software panel for better readability and maintainability. Ensure consistent status reporting for all model types.
* Update translations for multiple languages
Refined and expanded translations across various languages, replacing placeholders with meaningful text. This improves clarity and user experience in the multilingual interface.
* Update terminology from 'bundle' to 'model' in UI texts
Replaced occurrences of 'bundle' with 'model' in button labels, dialog titles, and messages in the SoftwarePanelSP code. This improves clarity and aligns terminology with current functionality.
* Update translation placeholders for model fetching texts
Replaced "Fetching bundles" with "Fetching models" across multiple languages to align text placeholders with the updated functionality. Adjusted related background download messages for clarity and consistency.
* cleanup
* not used, and likely not needed
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* cleaning up
* Update system/manager/process_config.py
* Simplify model parsing and index handling logic.
Refactored `ModelManager_DownloadIndex` retrieval to use the walrus operator, streamlining the conditional logic. Additionally, restructured model list initialization in `_parse_bundle` for improved readability and maintainability. These changes enhance code clarity and reduce redundancy.
* `Improve error handling in model cache retrieval`
Revised the `get` method to ensure it returns an empty dictionary on errors or missing data, avoiding potential `None`-related issues. Added logging for clearer diagnostics when cached model data is unavailable or retrieval fails. This improves reliability and debuggability of the model fetching process.
* Fix cached model data handling by parsing JSON response
Previously, cached model data was returned as a raw string, causing potential issues when using the data. The change ensures the cached data is properly parsed into JSON format before returning, improving reliability and consistency.
* Adjust modelManagerSP rate and Ratekeeper frequency
Reduced the rate for modelManagerSP in services and aligned the Ratekeeper frequency in model_manager.py to 0.1.
* Update model fetcher URL and adjust modelManagerSP rate
Updated the model fetcher URL to point to the correct resource for driving models. Adjusted the rate of modelManagerSP in both its service definition and the corresponding Ratekeeper initialization to 1 Hz for improved consistency.
* Refactor model download logic for clarity and efficiency
Simplify the logic for finding the model to download by combining redundant constructs into a single line. This improves code readability and reduces unnecessary variable assignments.
* Fix cache keys for manual prebuilt actions because they were missing the cache when manually built
* no need to log
* formatting
* revert ci changes
* Refactor and restructure `modeld` to `models` module.
Renamed `modeld` directory to `models` for clarity and consistency. Updated all references and imports to reflect the new structure. This improves maintainability and aligns with naming conventions.
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add script for squash and merge workflow automation
Introduced `squash_and_merge.py` to automate the process of squashing a source branch and merging it into a target branch. The script handles backups, commit message creation, stashing, cleanup, and includes optional push functionality. Provides user prompts and error handling to simplify complex merge workflows.
* temp1
* Switch to PEP 604 style for optional and generic type hints
Replaces `Optional` and `List` with the simpler `X | None` and `list[X]` syntax introduced in Python 3.10. Updated all function signatures accordingly for consistency and modernity. Also made minor string formatting consistency adjustments.
* Fix type annotation for temp_branch variable
Updated the temp_branch variable to include a proper type annotation (`str | None`). This change improves code clarity and aligns with Python typing standards.
* more hints
* add sp flag
* return if sp macro
* controls
* drive stats
* some more
* more
* skip the whole thing
* missed
* more
* more main
* not ready to push yet but sure
* get them icons
* later
* own icons
* Revert "own icons"
This reverts commit e07bd8e670.
* blank icon
* render differently on mac
* static
* set toggle and title space properly
* format
* remove prior objects
* good spacing for ButtonParamControlSP
* more space formatting
* on device fix
* update home wifi prompt
* handle AbstractControlSP_SELECTOR hide events properly
* use sp
* ignore name
* more
* keep spacing
* better flag
* settings button moved
* small cleanup
* move files to sp dir
* remove for now
* developer different icon
* add scrolling to ui test
* Revert "add scrolling to ui test"
This reverts commit c8d1c65d89.
* format
* make them virtual
* do we still need this?
* Apply suggestions from code review
Co-authored-by: DevTekVE <devtekve@gmail.com>
* revert for now
* shorter license
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* Add CLion run configs and external tools setup
Introduced CLion configuration files for "Build Debug" and "Build Release," along with external tool definitions for Poetry SCons commands. Additionally, commented out `.idea` in `.gitignore` to track necessary project-specific settings.
* rename
* only exclude specific files from gitignore
* wildcard
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* Add support for GitHub Actions runner management
Introduce a new process and configuration to manage a GitHub Actions runner. Added a persistent "EnableGithubRunner" parameter and a script to control the runner service. Integrated the feature into the system's process manager logic.
* Restrict GitHub runner usage on metered networks.
This update modifies the `use_github_runner` function to include a check for metered networks using `HARDWARE.get_network_metered()`. This ensures the GitHub runner is not enabled when the network is metered, improving network usage efficiency.
* Add GitHub runner service toggle to developer panel
Introduces a new toggle in the developer panel to enable or disable the GitHub runner service. This provides developers with a convenient way to control the service from the UI.
* translations
* Refactor network condition check for GitHub runner.
Updated `use_github_runner` to include network type in metered network checks. This ensures more accurate validation by considering specific network types when determining metered status.
* Mark as executable
* Update paths and shebangs for consistency across scripts
Modified file paths to align with the new directory structure under `/data/media/0/github` and updated the shebang in `github_runner.sh` for better environment compatibility. Adjusted the `BUILD_DIR` in the GitHub workflow to reflect the new path.
* Fix string translation for GitHub runner parameter text
Added translation support for the GitHub runner service description text. This ensures consistent localization across the UI.
* Remove gitlab_runner.sh from Sunnypilot blacklist.
The script is no longer required to be blacklisted, likely due to updates or changes in its usage. This improves the maintainability of the blacklist by removing unnecessary entries.
* lang stuff
* Update BASE_DIR determination based on mount point
Refactored scripts to dynamically set BASE_DIR depending on whether /data/media is a valid mount point. This ensures compatibility with different environments and improves robustness of path resolution.
* Refactor GitHub runner logic in process_config.
Simplified enabling conditions for the GitHub runner by removing dependency on hardware network checks and adding a logical combination of offroad and runner-related functions. This improves code readability and reduces hardware coupling.
Update version identifier in workflow for staging and release
Appended "-staging" and "-release" to the VERSION variable in the GitHub Actions workflow to clearly distinguish build types. This ensures clarity in versioning for staging and release environments.
* Add support for custom model naming in workflow
This update introduces a new optional input `custom_name` to the `sunnypilot-build-model` GitHub workflow. If provided, it customizes the artifact name; otherwise, the default naming scheme is used. This enhances flexibility for build artifact identification.
* fix name
* Update cache key logic in build workflow
Replaced `github.ref_name` with a fallback to `github.head_ref || github.ref_name` in cache keys to handle branches and pull requests more reliably. This ensures consistent cache retrieval and improves workflow efficiency.
* Simplify artifact upload logic in CI workflow
Consolidated redundant artifact upload steps into a single action, leveraging a fallback mechanism for naming. This streamlines the workflow, reducing duplication and improving maintainability.
* Make publish step resilient and add conditional notify
Added `continue-on-error` to the publish step to allow workflow progression even if it fails. Introduced a condition to notify step that depends on publish outcome being successful. These changes improve workflow reliability and error handling.
* Fix conditional syntax in GitHub Actions workflow
Updated the conditional statement in the notify job to use the correct GitHub Actions expression syntax. This ensures proper evaluation of the publish step's success outcome.
* Update condition for notify step in GitHub Actions workflow
Replaced the deprecated syntax `${{ steps.publish.outcome == 'success' }}` with the recommended `success()` function. This ensures compatibility with newer GitHub Actions features and improves maintainability.
* Update build workflow to handle PR drafts and improve concurrency
Added support for pull request draft events to trigger the workflow, ensuring drafts are not missed. Removed `continue-on-error` in the publish step to improve reliability and prevent silent failures. Simplifies and enhances workflow robustness.
* Update pull request workflows and add draft check logic
Removed unnecessary pull request event types and drafts settings, consolidating logic. Added a condition to skip publishing for non-draft pull requests, ensuring better control over the deployment process.
* Create a GitHub Actions workflow for synchronizing the repository to GitLab and enhance GitLab CI settings
A new GitHub Actions workflow for mirroring the current repository to GitLab is added. This workflow is triggered by both push and delete events in addition to manual triggering. The role of GitHub actions runner is defined through a series of steps. A new '.gitlab-ci.yml' build configuration file is also introduced, with a more comprehensive definition of variables, jobs, and pipeline rules for its utilization in the GitLab CI/CD pipeline.
Further, other changes include the addition of scripts for installing and uninstalling GitLab CI runner, along with modifying the SCons build system configuration file to include custom cache directory. Moreover, 'release_files.py' has been revised to include additional blacklisted and whitelisted files specific to Sunnypilot, ensuring suitable settings for the CI flow.
The improvements facilitate a smoother integration between GitHub and GitLab, powerfully harnessing the capabilities of both platforms for more efficient and effective CI/CD pipelines and version control management.
* not needed for this
* Update workflow to build model from upstream repository
Revised the CI workflow to build directly from the upstream `commaai/openpilot` repository. Simplified configuration, removed unused steps, and added support for specifying the upstream branch dynamically via inputs.
* Update SConstruct to allow passing arbitrary cache_dir
Modified the SConstruct file to enable setting a custom cache directory via arguments. This enhances flexibility in configuring cache paths during the build process.
* Refactor build workflow to improve branch handling logic.
Reorganized conditions for setting environment variables, replacing repository_dispatch with workflow_dispatch for prebuilt builds. Added a fallback error message for unsupported triggers to improve robustness. This enhances clarity and ensures compatibility with the intended workflow triggers.
* test test test
* test test test
* test test test
* Enable publication flag during build configurations
Added `SHOULD_PUBLISH=true` to all relevant build configuration steps to ensure proper handling of publishing logic. Updated environment variables to include this flag for downstream usage. Removed the error-check step for unsupported configurations.
* Simplify publish condition in workflow logic
Replaced the previous condition for publishing with a single output variable, `should_publish`, to streamline logic and improve maintainability. This change reduces redundancy and makes the workflow more adaptable to future updates.
* Simplify restore key patterns in build workflow.
Removed unnecessary trailing dashes in SCons cache restore keys to streamline and slightly improve key matching logic. This ensures better consistency with the current workflow setup.
* Update cache key usage in build workflow
Replaced `github.ref_name` with `github.head_ref` for cache keys to ensure accurate branch-specific caching. Added fallback restore-keys for master branches to improve cache efficiency and reduce redundant builds.
* Improved debug logging in GitHub actions workflow
This commit refines the debug logging in our GitHub Actions workflow for the Sunnypilot build. This change provides more granularity, enabling logging only during debug mode, which helps to keep the runtime logs less cluttered during normal operations. This includes the conditionally displaying of environmental variables, GitHub output contents, and directory listings.
Additionally, debug mode verbosity was added to rsync commands to aid troubleshooting file transfers during the build process.
Blank lines were also reduced for better readability and cleaner code presentation.
* test diff path
* Refactor SCons cache handling in build workflow
Replaced hardcoded cache directory paths with an environment variable (`SCONS_CACHE_DIR`) for better maintainability and flexibility. Updated related workflow steps to utilize the new variable and adjusted cache key usage. Removed unused `BASE_BUILD_NUMBER` variable to clean up the configuration.
* Update cache key to include commit SHA in workflow
This change adds the commit SHA to the cache key in the GitHub Actions workflow. It ensures more precise caching by differentiating builds based on the specific commit, reducing potential conflicts.
* clean
Update GitHub runner service to set environment variables
Updated the ExecStart command to explicitly set HOME, USER, LOGNAME, and MAIL environment variables. This ensures the runner operates with the correct environment configuration, improving reliability and compatibility.
Refactor GitHub runner service ExecStart command.
Replaced direct command execution with running the service as a specific user using `su`. This improves compatibility and aligns with best practices for user-based execution. No functional changes are expected.
Update GitHub runner service to set environment variables
The ExecStart command now sets HOME, USER, LOGNAME, and MAIL environment variables for the runner process. This ensures proper environment initialization for the designated user, improving compatibility and reliability during execution.
Refactor GitHub runner service template handling.
Revised the `modify_service_template` function to create a properly structured service template for the GitHub runner. Updated service permissions, execution parameters, and enabled the function call to ensure usage during runner setup.
* Refactor GitHub Runner installer to improve argument parsing.
Reworked the script to implement flexible and explicit command-line argument parsing using flags like `--token`, `--repo`, and `--start-at-boot`. Added support for setting default values and enabling/disabling auto-start based on the `--start-at-boot` flag. Improved error handling and usage messaging for better user experience.
* Update cache keys in sunnypilot build workflow
Modified the cache keys to include `github.ref_name` for more precise caching and restore behavior. This improves build consistency by better differentiating between branches and refs. No changes to the overall workflow logic.
* Remove 'tinygrad/*' from release file exclusions
This change modifies the release file exclusions by removing 'tinygrad/*'. The adjustment ensures that files in the 'tinygrad' directory are now included in the release process, aligning with updated packaging requirements.
* Simplify release file exclusions list.
Removed redundant and unnecessary file patterns from the exclusions list in `release_files.py`. This streamlines the file handling process and reduces maintenance overhead.
* Refactor SCons cache path and key structure.
Updated the SCons cache directory path to `SCONS_CACHE_DIR` for clarity and consistency. Improved the caching key structure to include `github.head_ref` for better cache differentiation and restore hierarchy. Adjusted related build instructions to reflect the new environment variable.
* Refactor branch configuration in CI workflow
Standardize branch name handling by replacing hardcoded values with environment variables. This improves maintainability and simplifies updates to branch names across the workflow. Updated references to use the new dynamic environment variable approach.
set python upper bound to 3.13 (#34286)
* try
* test
* ...
* wow
* y
* docker
* <
(cherry picked from commit 9c9b273a3e)
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Allows us to automatically keep our LFS in sync with comma's and also to manually perform a sync if we need to. Even able to sync the LFS from a given commit hash or a given branch. Useful for model stuff.
* Adding script to pull from comma's LFS before pushing to ours
* updating the script a little to allow pulling all when needed if needed
* static ..
* format
* Fuck the simulator always failing
* Apply suggestions from code review
* Apply suggestions from code review
---------
Co-authored-by: devtekve <devtekve@gmail.com>
* Adding script to pull from comma's LFS before pushing to ours
* updating the script a little to allow pulling all when needed if needed
* static ..
* format
* Fuck the simulator always failing
* Apply suggestions from code review
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* initial updates to the actions to run for sp
* ignore license file
* more updates
* undoing some of the changes because I was blocking the runs on
* allowing the submodule check as well
* Allowing macos builds
* test adding cache key
* don't attempt build_release for selfdrive for the time being.
* Blocking macos builds as well since they have a 10x miltiplier for GH aciton minutes, waaaay too much!
* lol nice typo codespell
* change ref commit id to check if replay passes
* Sync up submodules for ESCC
* Remove ESCC base and interfaces classes
Consolidated ESCC functionalities directly into the Hyundai ESCC module, removing redundant base and interface classes. This simplified the class structure and improved code maintainability.
* Removing hints because they were causing a circular dependency
* bump opendbc
* bump opendbc
* Bump opendbc
* Fixing inconsistencies thanks to the tests!
* Bumping opendbc after fixing tests
* update opendbc
* Updating to the new flags ordinal on cereal
* Reverting some of the misc changes, clarifying naming and passing the scc12 and fca11 values to the methods as they are defined out of order
* undoing more naming changes to simplify diff
* More naming and tiny adjustments
* use constant for msg id
* bump opendbc
* bump submodules
* already added
* bump opendbc
* bump opendbc
* bump opendbc
* fix init
* bump submodules
* bump submodules
* unit test!
* rename
* always use true radar tracks if available
* update comment
* bump submodules
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Fixes the GitHub action that was failing when the pipeline was running as a result of a push to master-new because it was not properly recognized as "master"
* more fix
* forcing a change on UI to test
* undo ui change for test
* temp add branch
* adding more ways to set the master uo
* more bruteforce
* undoing force
* bump opendbc
* Bump opendbc to our changed car params
* New Int16 test
* spFlags
* original name?
* Testing more carparams combinations
* Another crazy idea
* typo
* use this field
* bump
* bump opendbc
---------
Co-authored-by: DevTekVE <devtekve@gmail.com>
* initial updates to the actions to run for sp
* ignore license file
* more updates
* undoing some of the changes because I was blocking the runs on
* allowing the submodule check as well
* Allowing macos builds
* test adding cache key
* don't attempt build_release for selfdrive for the time being.
* Blocking macos builds as well since they have a 10x miltiplier for GH aciton minutes, waaaay too much!
* lol nice typo codespell
* change ref commit id to check if replay passes
console.log(`Removed '${process.env.TRUST_FORK_PR_LABEL}' label from PR #${prNumber} as it received new commits`);
// Add a comment to the PR
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: `The \`${process.env.TRUST_FORK_PR_LABEL}\` label has been automatically removed because new commits were pushed to this PR. This PR will need to be re-reviewed before the label can be applied again.`
stale-pr-message:'This PR has had no activity for ${{ env.DAYS_BEFORE_PR_STALE }} days. It will be automatically closed in ${{ env.DAYS_BEFORE_PR_CLOSE }} days if there is no activity.'
close-pr-message:'This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.'
stale-pr-label:stale
delete-branch:${{ github.event.pull_request.head.repo.full_name == 'commaai/openpilot' }}# only delete branches on the main repo
delete-branch:${{ github.event.pull_request.head.repo.full_name == 'sunnypilot/sunnypilot' }}# only delete branches on the main repo
exempt-pr-labels:"ignore stale,needs testing"# if wip or it needs testing from the community, don't mark as stale
MODEL_SIZE=$(python3 -c "from openpilot.common.transformations.model import MEDMODEL_INPUT_SIZE as s; print(f'{s[0]}x{s[1]}')")
CAMERA_RES=$(python3 -c "from openpilot.common.transformations.camera import _ar_ox_fisheye as a, _os_fisheye as o; print(f'{a.width}x{a.height} {o.width}x{o.height}')")
# We do a bit of a hack here to avoid canceling the publishing job if a new commit comes in while we're publishing by adding the sha to the group name.
# This means that if multiple commits come in while we're publishing, they will be queued up and publish one after the other.
# Otherwise, if a job is waiting to be published due to environment wait time, it would be canceled by a new commit and restart the wait time.
if ! git ls-remote --heads origin ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} | grep -q "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"; then
echo "Target branch ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} does not exist, creating it from ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to view and modify the Software, subject to the following conditions:
1.**Permission Required**: Permission Required for Commercial, For-Profit, or Closed Source Use: Use of the Software, in whole or in part, for any commercial purposes, for-profit projects, or in closed source projects requires explicit written permission from the original author(s).
2.**Redistribution**: Any redistribution of the Software, modified or unmodified, must retain this license notice and the following acknowledgment:
"This software is licensed under a custom license requiring permission for use."
3.**Visibility**: Any project that uses the Software must visibly mention the following acknowledgment:
"This project uses software from Haibin Wen and SUNNYPILOT LLC and is licensed under a custom license requiring permission for use."
4.**No Warranty**: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contact sunnypilot Support <support@sunnypilot.ai> for permission requests.
[sunnypilot](https://github.com/sunnyhaibin/sunnypilot) is a fork of comma.ai's openpilot, an open source driver assistance system. sunnypilot offers the user a unique driving experience for over 300+ supported car makes and models with modified behaviors of driving assist engagements. sunnypilot complies with comma.ai's safety rules as accurately as possible.
<p>
<b>openpilot is an operating system for robotics.</b>
<br>
Currently, it upgrades the driver assistance system in 300+ supported cars.
</p>
## 💭 Join our Community Forum
Join the official sunnypilot community forum to stay up to date with all the latest features and be a part of shaping the future of sunnypilot!
First, check out this list of items you'll need to [get started](https://community.sunnypilot.ai/t/getting-started-using-sunnypilot-in-your-supported-car/251).
Next, refer to the sunnypilot community forum for [installation instructions](https://community.sunnypilot.ai/t/read-before-installing-sunnypilot/254), as well as a complete list of [Recommended Branch Installations](https://community.sunnypilot.ai/t/recommended-branch-installations/235).
</div>
## 🎆 Pull Requests
We welcome both pull requests and issues on GitHub. Bug fixes are encouraged.
<table>
<tr>
<td><a href="https://youtu.be/NmBfgOanCyk" title="Video By Greer Viau"><img src="https://github.com/commaai/openpilot/assets/8762862/2f7112ae-f748-4f39-b617-fabd689c3772"></a></td>
<td><a href="https://youtu.be/VHKyqZ7t8Gw" title="Video By Logan LeGrand"><img src="https://github.com/commaai/openpilot/assets/8762862/92351544-2833-40d7-9e0b-7ef7ae37ec4c"></a></td>
<td><a href="https://youtu.be/SUIZYzxtMQs" title="A drive to Taco Bell"><img src="https://github.com/commaai/openpilot/assets/8762862/05ceefc5-2628-439c-a9b2-89ce77dc6f63"></a></td>
</tr>
</table>
Pull requests should be against the most current `master` branch.
## 📊 User Data
Using openpilot in a car
------
By default, sunnypilot uploads the driving data to comma servers. You can also access your data through [comma connect](https://connect.comma.ai/).
To use openpilot in a car, you need four things:
1.**Supported Device:** a comma four, available at [comma.ai/shop/comma-four](https://www.comma.ai/shop/comma-four).
2.**Software:** The setup procedure for the comma four allows users to enter a URL for custom software. Use the URL `openpilot.comma.ai` to install the release version.
3.**Supported Car:** Ensure that you have one of [the 275+ supported cars](docs/CARS.md).
4.**Car Harness:** You will also need a [car harness](https://comma.ai/shop/car-harness) to connect your comma four to your car.
sunnypilot is open source software. The user is free to disable data collection if they wish to do so.
We have detailed instructions for [how to install the harness and device in a car](https://comma.ai/setup). Note that it's possible to run openpilot on [other hardware](https://blog.comma.ai/self-driving-car-for-free/), although it's not plug-and-play.
### Branches
Running `master` and other branches directly is supported, but it's recommended to run one of the following prebuilt branches:
| `release-mici` | `release-tizi` | openpilot.comma.ai | This is openpilot's release branch. |
| `release-mici-staging` | `release-tizi-staging` | openpilot-test.comma.ai | This is the staging branch for releases. Use it to get new releases slightly early. |
| `nightly` | `nightly` | openpilot-nightly.comma.ai | This is the bleeding edge development branch. Do not expect this to be stable. |
| `nightly-dev` | `nightly-dev` | installer.comma.ai/commaai/nightly-dev | Same as nightly, but includes experimental development features for some cars. |
To start developing openpilot
------
openpilot is developed by [comma](https://comma.ai/) and by users like you. We welcome both pull requests and issues on [GitHub](http://github.com/commaai/openpilot).
* Join the [community Discord](https://discord.comma.ai)
* Check out [the contributing docs](docs/CONTRIBUTING.md)
* Check out the [openpilot tools](tools/)
* Code documentation lives at https://docs.comma.ai
* Information about running openpilot lives on the [community wiki](https://github.com/commaai/openpilot/wiki)
Want to get paid to work on openpilot? [comma is hiring](https://comma.ai/jobs#open-positions) and offers lots of [bounties](https://comma.ai/bounties) for external contributors.
Safety and Testing
----
* openpilot observes [ISO26262](https://en.wikipedia.org/wiki/ISO_26262) guidelines, see [SAFETY.md](docs/SAFETY.md) for more details.
* openpilot has software-in-the-loop [tests](.github/workflows/tests.yaml) that run on every commit.
* The code enforcing the safety model lives in panda and is written in C, see [code rigor](https://github.com/commaai/panda#code-rigor) for more details.
* panda has software-in-the-loop [safety tests](https://github.com/commaai/panda/tree/master/tests/safety).
* Internally, we have a hardware-in-the-loop Jenkins test suite that builds and unit tests the various processes.
* panda has additional hardware-in-the-loop [tests](https://github.com/commaai/panda/blob/master/Jenkinsfile).
* We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.
<details>
<summary>MIT Licensed</summary>
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.
**THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT.
YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS.
NO WARRANTY EXPRESSED OR IMPLIED.**
</details>
<details>
<summary>User Data and comma Account</summary>
By default, openpilot uploads the driving data to our servers. You can also access your data through [comma connect](https://connect.comma.ai/). We use your data to train better models and improve openpilot for everyone.
openpilot is open source software: the user is free to disable data collection if they wish to do so.
openpilot logs the road-facing cameras, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
sunnypilot logs the road-facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
The driver-facing camera and microphone are only logged if you explicitly opt-in in settings.
By using openpilot, you agree to [our Privacy Policy](https://comma.ai/privacy). You understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
</details>
By using this software, you understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.
## Licensing
sunnypilot is released under the [MIT License](LICENSE). This repository includes original work as well as significant portions of code derived from [openpilot by comma.ai](https://github.com/commaai/openpilot), which is also released under the MIT license with additional disclaimers.
The original openpilot license notice, including comma.ai’s indemnification and alpha software disclaimer, is reproduced below as required:
> openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
>
> Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys’ fees and costs) which arise out of, relate to or result from any use of this software by user.
>
> **THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT.
> YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS.
> NO WARRANTY EXPRESSED OR IMPLIED.**
For full license terms, please see the [`LICENSE`](LICENSE) file.
## 💰 Support sunnypilot
If you find any of the features useful, consider becoming a [sponsor on GitHub](https://github.com/sponsors/sunnyhaibin) to support future feature development and improvements.
By becoming a sponsor, you will gain access to exclusive content, early access to new features, and the opportunity to directly influence the project's development.
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="PayPal this" title="PayPal - The safer, easier way to pay online!" border="0" />
</a>
<br></br>
Your continuous love and support are greatly appreciated! Enjoy 🥰
A supported vehicle is one that just works when you install a comma device. All supported cars provide a better experience than any stock system. Supported vehicles reference the US market unless otherwise specified.
|Hyundai|Kona 2020|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|6 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai B connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Hyundai Kona 2020">Buy Here</a></sub></details>|||
|Hyundai|Kona 2022-23|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai O connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Hyundai Kona 2022-23">Buy Here</a></sub></details>|||
|Hyundai|Kona Electric 2018-21|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai G connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Hyundai Kona Electric 2018-21">Buy Here</a></sub></details>|||
|Hyundai|Kona Electric 2022-23|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai O connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Hyundai Kona Electric 2022-23">Buy Here</a></sub></details>|||
|Hyundai|Kona Electric (with HDA II, Korea only) 2023|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai R connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Hyundai Kona Electric (with HDA II, Korea only) 2023">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=U2fOCmcQ8hw" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|Hyundai|Kona Electric (with HDA II, Korea only) 2023|Smart Cruise Control (SCC)|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai R connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Hyundai Kona Electric (with HDA II, Korea only) 2023">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=U2fOCmcQ8hw" target="_blank"><img height="18px" src="assets/icon-youtube.svg" /></a>||
|Hyundai|Kona Hybrid 2020|Smart Cruise Control (SCC)|openpilot available[<sup>1</sup>](#footnotes)|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 Hyundai I connector<br>- 1 OBD-C cable (2 ft)<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Hyundai Kona Hybrid 2020">Buy Here</a></sub></details>|||
|Toyota|Mirai 2021|All|openpilot|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Mirai 2021">Buy Here</a></sub></details>|||
|Toyota|Prius 2016|Toyota Safety Sense P|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius 2016">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=8zopPJI8XQ0" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|Toyota|Prius 2017-20|All|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius 2017-20">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=8zopPJI8XQ0" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|Toyota|Prius 2021-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius 2021-22">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=J58TvCpUd4U" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|Toyota|Prius Prime 2017-20|All|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius Prime 2017-20">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=8zopPJI8XQ0" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|Toyota|Prius Prime 2021-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius Prime 2021-22">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=J58TvCpUd4U" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>||
|Toyota|Prius 2016|Toyota Safety Sense P|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius 2016">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=8zopPJI8XQ0" target="_blank"><img height="18px" src="assets/icon-youtube.svg" /></a>||
|Toyota|Prius 2017-20|All|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius 2017-20">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=8zopPJI8XQ0" target="_blank"><img height="18px" src="assets/icon-youtube.svg" /></a>||
|Toyota|Prius 2021-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius 2021-22">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=J58TvCpUd4U" target="_blank"><img height="18px" src="assets/icon-youtube.svg" /></a>||
|Toyota|Prius Prime 2017-20|All|Stock|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius Prime 2017-20">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=8zopPJI8XQ0" target="_blank"><img height="18px" src="assets/icon-youtube.svg" /></a>||
|Toyota|Prius Prime 2021-22|All|openpilot|0 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius Prime 2021-22">Buy Here</a></sub></details>|<a href="https://www.youtube.com/watch?v=J58TvCpUd4U" target="_blank"><img height="18px" src="assets/icon-youtube.svg" /></a>||
|Toyota|Prius v 2017|Toyota Safety Sense P|Stock|19 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota Prius v 2017">Buy Here</a></sub></details>|||
|Toyota|RAV4 2016|Toyota Safety Sense P|Stock|19 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota RAV4 2016">Buy Here</a></sub></details>|||
|Toyota|RAV4 2017-18|All|Stock|19 mph|0 mph|[](##)|[](##)|<details><summary>Parts</summary><sub>- 1 OBD-C cable (2 ft)<br>- 1 Toyota A connector<br>- 1 comma four<br>- 1 comma power v3<br>- 1 harness box<br>- 1 mount<br><a href="https://comma.ai/shop/comma-3x?harness=Toyota RAV4 2017-18">Buy Here</a></sub></details>|||
<sup>1</sup>openpilot Longitudinal Control (Alpha) is available behind a toggle; the toggle is only available in non-release branches such as `nightly-dev`. <br />
<sup>2</sup>Refers only to the Focus Mk4 (C519) available in Europe/China/Taiwan/Australasia, not the Focus Mk3 (C346) in North and South America/Southeast Asia. <br />
<sup>3</sup>See more setup details for <a href="https://github.com/commaai/openpilot/wiki/gm" target="_blank">GM</a>. <br />
<sup>4</sup>2019 Honda Civic 1.6L Diesel Sedan does not have ALC below 12mph. <br />
<sup>5</sup>See more setup details for <a href="https://github.com/commaai/openpilot/wiki/nissan" target="_blank">Nissan</a>. <br />
<sup>6</sup>In the non-US market, openpilot requires the car to come equipped with EyeSight with Lane Keep Assistance. <br />
<sup>7</sup>Enabling longitudinal control (alpha) will disable all EyeSight functionality, including AEB, LDW, and RAB. <br />
<sup>8</sup>Some 2023 model years have HW4. To check which hardware type your vehicle has, look for <b>Autopilot computer</b> under <b>Software -> Additional Vehicle Information</b> on your vehicle's touchscreen. See <a href="https://www.notateslaapp.com/news/2173/how-to-check-if-your-tesla-has-hardware-4-ai4-or-hardware-3">this page</a> for more information. <br />
<sup>9</sup>See more setup details for <a href="https://github.com/commaai/openpilot/wiki/tesla" target="_blank">Tesla</a>. <br />
<sup>10</sup>openpilot operates above 28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>11</sup>The J533 harness plugs in at the CAN gateway under the dashboard, just above the steering column. More information can be found at <a href="https://docs.howtocomma.com/docs/j533-harness-install" target="_blank">this guide</a>. <br />
<sup>12</sup>Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform. <br />
<sup>13</sup>Refers only to the MQB-based European B8 Passat, not the NMS Passat in the USA/China/Mideast markets. <br />
<sup>14</sup>Some Škoda vehicles are equipped with heated windshields, which are known to block GPS signal needed for some comma four functionality. <br />
<sup>15</sup>Only available for vehicles using a gateway (J533) harness. At this time, vehicles using a camera harness are limited to using stock ACC. <br />
<sup>16</sup>Model-years 2022 and beyond may have a combined CAN gateway and BCM, which is supported by openpilot in software, but doesn't yet have a harness available from the comma store. <br />
<sup>5</sup>Enabling longitudinal control (alpha) will disable all CMBS functionality, including AEB and FCW. <br />
<sup>6</sup>See more setup details for <a href="https://github.com/commaai/openpilot/wiki/nissan" target="_blank">Nissan</a>. <br />
<sup>7</sup>In the non-US market, openpilot requires the car to come equipped with EyeSight with Lane Keep Assistance. <br />
<sup>8</sup>Enabling longitudinal control (alpha) will disable all EyeSight functionality, including AEB, LDW, and RAB. <br />
<sup>9</sup>Some 2023 model years have HW4. To check which hardware type your vehicle has, look for <b>Autopilot computer</b> under <b>Software -> Additional Vehicle Information</b> on your vehicle's touchscreen. See <a href="https://www.notateslaapp.com/news/2173/how-to-check-if-your-tesla-has-hardware-4-ai4-or-hardware-3">this page</a> for more information. <br />
<sup>10</sup>See more setup details for <a href="https://github.com/commaai/openpilot/wiki/tesla" target="_blank">Tesla</a>. <br />
<sup>11</sup>openpilot operates above 28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>12</sup>The J533 harness plugs in at the CAN gateway under the dashboard, just above the steering column. More information can be found at <a href="https://docs.howtocomma.com/docs/j533-harness-install" target="_blank">this guide</a>. <br />
<sup>13</sup>Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform. <br />
<sup>14</sup>Refers only to the MQB-based European B8 Passat, not the NMS Passat in the USA/China/Mideast markets. <br />
<sup>15</sup>Some Škoda vehicles are equipped with heated windshields, which are known to block GPS signal needed for some comma four functionality. <br />
<sup>16</sup>Only available for vehicles using a gateway (J533) harness. At this time, vehicles using a camera harness are limited to using stock ACC. <br />
<sup>17</sup>Model-years 2022 and beyond may have a combined CAN gateway and BCM, which is supported by openpilot in software, but doesn't yet have a harness available from the comma store. <br />
## Community Maintained Cars
Although they're not upstream, the community has openpilot running on other makes and models. See the 'Community Supported Models' section of each make [on our wiki](https://wiki.comma.ai/).
A model port is a port of openpilot to a new car model within an already supported brand. Model ports are easier than brand ports because the car's existing APIs are already known.
Here's an example of one: https://github.com/commaai/openpilot/pull/30672/.
* **onroad**: openpilot's system state while ignition is on
* **offroad**: openpilot's system state while ignition is off
* **route**: a route is a recording of an onroad session
* **segment**: routes are split into one minute chunks called segments.
* **comma connect**: the web viewer for all your routes; check it out at [connect.comma.ai](https://connect.comma.ai).
* **panda**: this is the secondary processor on the device that implements the functional safety and directly talks to the car over CAN. See the [panda repo](https://github.com/commaai/panda).
* **comma four**: the latest hardware by comma.ai for running openpilot. more info at [comma.ai/shop/comma-four](https://www.comma.ai/shop/comma-four).
@@ -6,9 +6,9 @@ Check out our [Python library](https://github.com/commaai/openpilot/blob/master/
For each segment, openpilot records the following log types:
## rlog.bz2
## rlog.zst
rlogs contain all the messages passed amongst openpilot's processes. See [cereal/services.py](https://github.com/commaai/cereal/blob/master/services.py) for a list of all the logged services. They're a bzip2 archive of the serialized capnproto messages.
rlogs contain all the messages passed amongst openpilot's processes. See [cereal/services.py](https://github.com/commaai/openpilot/blob/master/cereal/services.py) for a list of all the logged services. They're a zstd archive of the serialized [Cap’n Proto](https://capnproto.org/) messages.
## {f,e,d}camera.hevc
@@ -18,12 +18,10 @@ Each camera stream is H.265 encoded and written to its respective file.
*`ecamera.hevc` is the wide road camera
*`dcamera.hevc` is the driver camera
## qlog.bz2 & qcamera.ts
## qlog.zst & qcamera.ts
qlogs are a decimated subset of the rlogs. Check out [cereal/services.py](https://github.com/commaai/cereal/blob/master/services.py) for the decimation.
qcameras are H.264 encoded, lower res versions of the fcamera.hevc. The video shown in [comma connect](https://connect.comma.ai/) is from the qcameras.
qlogs and qcameras are designed to be small enough to upload instantly on slow internet and store forever, yet useful enough for most analysis and debugging.
qlogs and qcameras are designed to be small enough to upload instantly on slow internet, yet useful enough for most analysis and debugging.
onroad="openpilot's system state while ignition is on."
offroad="openpilot's system state while ignition is off."
route="A route is a recording of an onroad session."
segment="Routes are split into one minute chunks called segments."
"comma connect"="The web viewer for all your routes; check it out at [connect.comma.ai](https://connect.comma.ai)."
panda="The secondary processor on the device that implements the functional safety and directly talks to the car over CAN. See the [panda repo](https://github.com/commaai/panda)."
"comma four"="The latest hardware by comma.ai for running openpilot. More info at [comma.ai/shop/comma-four](https://www.comma.ai/shop/comma-four)."
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](https://github.com/commaai/openpilot/blob/master/docs/INTEGRATION.md) and [limitations](https://github.com/commaai/openpilot/blob/master/docs/LIMITATIONS.md).
## How do I use it?
openpilot is designed to be used on the comma four.
## How does it work?
In short, openpilot uses the car's existing APIs for the built-in [ADAS](https://en.wikipedia.org/wiki/Advanced_driver-assistance_system) system and simply provides better acceleration, braking, and steering inputs than the stock system.
@@ -8,7 +8,7 @@ A car port enables openpilot support on a particular car. Each car model openpil
# Structure of a car port
Virtually all car-specific code is contained in two other repositories: [opendbc](https://github.com/commaai/opendbc) and [panda](https://github.com/commaai/panda).
All car-specific code is contained in the [opendbc](https://github.com/commaai/opendbc) project.
## opendbc
@@ -23,8 +23,8 @@ Each car brand is supported by a standard interface structure in `opendbc/car/[b
[Jason Young](https://github.com/jyoung8607) gave a talk at COMMA_CON with an overview of the car porting process. The talk is available on YouTube:
https://www.youtube.com/watch?v=XxPS5TpTUnI
## Brand Port
A brand port is a port of openpilot to a substantially new car brand or platform within a brand.
Here's an example of one: https://github.com/commaai/openpilot/pull/23331.
## Model Port
A model port is a port of openpilot to a new car model within an already supported brand. Model ports are easier than brand ports because the car's existing APIs are already known.
Here's an example of one: https://github.com/commaai/openpilot/pull/30672/.
A comma four is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console).
A comma device is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console).
## Serial Console
On both the comma three and comma four, the serial console is accessible from the main OBD-C port.
Connect the comma four to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power.
On the comma 3X, the serial console is accessible from the main OBD-C port, forwarded through the panda.
Access it using `panda/scripts/som_debug.sh`.
On the comma three, the serial console is exposed through a UART-to-USB chip, and `tools/scripts/serial.sh` can be used to connect.
comma four also exposes a serial console, albeit through an internal debug connector. Dedicated debug hardware coming soon to the comma shop.
On the comma four, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script.
Login to the default user with:
* Username: `comma`
* Password: `comma`
@@ -25,7 +25,7 @@ In order to SSH into your device, you'll need a GitHub account with SSH keys. Se
* Port: `22`
Here's an example command for connecting to your device using its tethered connection:<br />
`ssh comma@192.168.43.1`
`ssh comma@192.168.43.1 -i ~/.ssh/my_github_key`
For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding).
@@ -45,7 +45,7 @@ In order to use ADB on your device, you'll need to perform the following steps u
* Here's an example command for connecting to your device using its tethered connection: `adb connect 192.168.43.1:5555`
> [!NOTE]
> The default port for ADB is 5555 on the comma four.
> The default port for ADB is 5555.
For more info on ADB, see the [Android Debug Bridge (ADB) documentation](https://developer.android.com/tools/adb).
@@ -55,7 +55,7 @@ The public keys are only fetched from your GitHub account once. In order to upda
The `id_rsa` key in this directory only works while your device is in the setup state with no software installed. After installation, that default key will be removed.
#### ssh.comma.ai proxy
## ssh.comma.ai proxy
With a [comma prime subscription](https://comma.ai/connect), you can SSH into your comma device from anywhere.
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](https://github.com/commaai/openpilot/blob/master/docs/INTEGRATION.md) and [limitations](https://github.com/commaai/openpilot/blob/master/docs/LIMITATIONS.md).
## How do I use it?
openpilot is designed to be used on the comma four.
## How does it work?
In short, openpilot uses the car's existing APIs for the built-in [ADAS](https://en.wikipedia.org/wiki/Advanced_driver-assistance_system) system and simply provides better acceleration, braking, and steering inputs than the stock system.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.