Commit Graph

17952 Commits

Author SHA1 Message Date
rav4kumar 41ce29af86 feat: AccelPersonalityController 2026-05-27 11:58:59 -07:00
Jason Wen dfc3c98b22 Revert "DM: Lancia Delta HF Integrale model" (#1849)
Revert "DM: Lancia Delta HF Integrale model (#37696)"

This reverts commit d8569b07eb.
staging/2026.002.000/2026.05.27-4513
2026-05-26 23:31:54 -04:00
Jason Wen 107a6f4c00 version: bump to 2026.002.000 staging/2026.002.000/2026.05.18-4506 2026-05-17 21:24:19 -04:00
Jason Wen 059d0b6c4c sunnylink SDUI: tweak DisableUpdate param for clarity (#1842)
* sunnylink SDUI: tweak DisableUpdate param for clarity

* sync
staging/2026.001.000/2026.05.18-4503
2026-05-17 20:40:56 -04:00
github-actions[bot] c51ffe3808 [bot] Update Python packages (#1827)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
staging/2026.001.000/2026.05.14-4501
2026-05-14 02:24:09 -04:00
Jason Wen a15aed1a79 sunnylink: add CarParams fallback for brand-specific capabilities (#1839)
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
staging/2026.001.000/2026.05.13-4497
2026-05-13 01:29:18 -04:00
Nayan 78007e82e0 ui: show default model name (#1837)
* 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>
staging/2026.001.000/2026.05.11-4495
2026-05-11 01:19:10 -04:00
Jason Wen b1a6223b14 ci: simplify cereal validation to sparse-checkout + pycapnp, drop scons (#1836)
* 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>
staging/2026.001.000/2026.05.10-4491
2026-05-10 01:04:45 -04:00
Nayan e771dfa007 sunnylink: fix max time offroad values (#1835)
fix sunnylink values
staging/2026.001.000/2026.05.10-4488
2026-05-09 23:47:07 -04:00
Jason Wen c28eb95874 manager: disable DEVELOPMENT_ONLY reset (#1833) staging/2026.001.000/2026.05.07-4484 2026-05-07 18:42:06 -04:00
Jason Wen 7ed960f713 release: ignore upstream IsReleaseBranch (#1831) staging/2026.001.000/2026.05.07-4481 2026-05-07 10:53:21 -04:00
Jason Wen 7e2b8430c5 ui: update gates for certain toggles (#1830)
* don't use upstream's

* clean

* update schema

* fix

* mismatch test and fix
staging/2026.001.000/2026.05.07-4478
2026-05-06 21:27:43 -04:00
Jason Wen 521fa09b0d sunnylink SDUI: update stale reference in docs staging/2026.001.000/2026.05.06-4476 2026-05-06 12:14:47 -04:00
Jason Wen b9aa1962ca Update CHANGELOG.md staging/2026.001.000/2026.05.06-4473 2026-05-05 22:59:44 -04:00
Jason Wen 6b1b6aca05 Update CHANGELOG.md staging/2026.001.000/2026.05.06-4469 2026-05-05 21:14:19 -04:00
Jason Wen 41a8bc3fc4 Update CHANGELOG.md 2026-05-05 20:54:43 -04:00
Jason Wen 540f4f5933 Platform List: dynamically migrate CarPlatformBundle (#1828) staging/2026.001.000/2026.05.06-4466 2026-05-05 20:27:11 -04:00
DevTekVE 53e5ae0578 sunnylink: switch athena domain (#1826)
use new domain
staging/2026.001.000/2026.05.05-4464
2026-05-05 04:31:07 -04:00
Amy Jeanes 2182be05ea ui: fix cellular toggles (#1810)
UI: Fix ToggleSP._render() missing return value breaking toggle callbacks

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
staging/2026.001.000/2026.05.03-4460
2026-05-03 15:52:35 -04:00
Nayan 3e44c90c68 [MICI] ui: align upstream changes with sunnypilot settings buttons (#1782)
* align with upstream

* lint

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
staging/2026.001.000/2026.05.03-4458
2026-05-03 15:29:19 -04:00
Jason Wen 2d35bd895f sunnylink: SDUI (#1780)
* 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>
staging/2026.001.000/2026.05.03-4456
2026-05-03 13:18:15 -04:00
Jason Wen 855d5022ad MADS: suppress espActive event when long is not engaged (#1823) staging/2026.001.000/2026.05.03-4452 2026-05-03 02:30:19 -04:00
github-actions[bot] 6a363365ab [bot] Update Python packages (#1822)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
staging/2026.001.000/2026.05.03-4449
2026-05-03 01:00:33 -04:00
Jason Wen ddb9039493 torque: show static override values in Dev UI & gate useParams on custom torque tune (#1821)
torque: show static override values in Dev UI
staging/2026.001.000/2026.04.28-4440
2026-04-28 07:26:05 -04:00
Jason Wen 0b7df7df10 DM: wheel touch enforcement in MADS (#1820) staging/2026.001.000/2026.04.28-4438 2026-04-28 01:29:54 -04:00
github-actions[bot] dd3feac854 [bot] Update Python packages (#1812)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
staging/2026.001.000/2026.04.28-4435
2026-04-27 23:20:24 -04:00
Jason Wen 10a33a4bf1 tg: reapply changes (#1817)
* Reapply "bump tg (#37700)"

This reverts commit 9022b4d322.

* fixup! Reapply "bump tg (#37700)"

* Revert "Revert "autodetect tg backend (#37778)""

This reverts commit b782958a

* Reapply "autodetect tg backend: use CPU:LLVM on Linux (#37785)"

This reverts commit 3fa6726f88.

* Reapply "Modeld: support uncompiled"

This reverts commit 8c240cc1a4.

* fixup! Reapply "bump tg (#37700)"

* fixup! Reapply "autodetect tg backend: use CPU:LLVM on Linux (#37785)"

* fixup! Revert "Revert "autodetect tg backend (#37778)""

* fixup! Reapply "autodetect tg backend: use CPU:LLVM on Linux (#37785)"

* fixup! Reapply "autodetect tg backend: use CPU:LLVM on Linux (#37785)"

* fixup! Revert "Revert "autodetect tg backend (#37778)""

* fixup! Reapply "bump tg (#37700)"

* fixup! Reapply "bump tg (#37700)"
staging/2026.001.000/2026.04.26-4432
2026-04-26 01:32:55 -04:00
DevTekVE 8714203d2c sunnylink: Remove unused API endpoint (#1814)
remove ws_queue thread and associated api endpoint
- Simplified thread management by removing unused `ws_queue`.
- Eliminated `resume_queued` API call for better maintainability.
staging/2026.001.000/2026.04.25-4429
2026-04-25 11:21:55 -04:00
Nayan 18406e77ee [MICI] ui: add sunnylink info & connectivity check (#1798)
* add info & connectivity check

* meh, no icon

* lint

* fix state

* good bot

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
staging/2026.001.000/2026.04.19-4419
2026-04-19 11:55:00 -04:00
Jason Wen fdd43f49e0 ci: validate upstream compat by schema diff typeId (#1809) staging/2026.001.000/2026.04.18-4416 2026-04-18 16:06:15 -04:00
Jason Wen f93481d0d4 Reapply "controls: always default Torque Lateral Control to v0 Tune" (#1806) (#1807)
* Reapply "controls: always default Torque Lateral Control to v0 Tune" (#1806)

This reverts commit 5f6e05410d.

* this is better
staging/2026.001.000/2026.04.18-4414
2026-04-18 03:10:40 -04:00
Jason Wen 5f6e05410d Revert "controls: always default Torque Lateral Control to v0 Tune" (#1806)
Revert "controls: always default Torque Lateral Control to v0 Tune (#1804)"

This reverts commit d1d6fae613.
staging/2026.001.000/2026.04.18-4412
2026-04-18 00:48:28 -04:00
Jason Wen d1d6fae613 controls: always default Torque Lateral Control to v0 Tune (#1804)
* controls: always default Torque Lateral Control to v0 Tune

* add fixme
staging/2026.001.000/2026.04.17-4410
2026-04-17 03:28:58 -04:00
github-actions[bot] 35aeeee657 [bot] Update Python packages (#1799)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
staging/2026.001.000/2026.04.17-4408
2026-04-17 03:07:56 -04:00
Jason Wen a6fdef77df Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1803) staging/2026.001.000/2026.04.17-4406 2026-04-17 02:47:36 -04:00
Jason Wen df66604a45 Merge branch 'upstream/openpilot/master' into sync-20260417
# Conflicts:
#	docs/CARS.md
#	opendbc_repo
#	panda
#	system/updated/updated.py
#	tinygrad_repo
2026-04-17 02:36:53 -04:00
Trey Moen c001f3c9b4 esim: implement download profile (#37806) 2026-04-15 22:06:54 -07:00
Adeeb Shihadeh 752fe03118 docs: add feedback guide (#37842)
* docs: add feedback guide

* lil more feedback

* the
2026-04-15 19:13:30 -07:00
Adeeb Shihadeh 84c276bb6c misc docs updates (#37839)
* that's home

* more extensions

* lil fixups

* lil more

* collapse car ports

* fix links
2026-04-15 18:37:23 -07:00
Adeeb Shihadeh 9042cfa1ad rm home 2026-04-15 15:55:37 -07:00
Adeeb Shihadeh 83e6e7da93 docs: setup zensical (#37838) 2026-04-15 15:46:43 -07:00
Adeeb Shihadeh 31403f4a5c jotplugger: render segment range slices properly (#37837) 2026-04-15 10:50:24 -07:00
Ethan Reish 117d5cee4f updated: complete branch migration dict for mici and tizi (#37830) 2026-04-15 10:46:15 -07:00
Adeeb Shihadeh fa18e6395c tools: remove sentry logging (#37836) 2026-04-15 10:26:12 -07:00
Adeeb Shihadeh 75e352e5d0 jotpluggler: CAN parsing is best effort (#37835) 2026-04-15 10:24:37 -07:00
Shane Smiskol 63ab2fb1b3 four: calibrate DM orientation (#37149)
* calib face

* clean up

* fix double neg

* cmt

* local changes

* keep for dm preview for now

* comments

* comments

* Update selfdrive/ui/mici/onroad/driver_state.py

* Update selfdrive/ui/mici/onroad/driver_state.py
2026-04-15 10:15:32 -07:00
commaci-public 97f1bac71d [bot] Update Python packages (#37815)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2026-04-15 09:54:46 -07:00
Trey Moen 00b7c8e8ad esim: implement ES9P HTTP and notification processing (#37807) 2026-04-15 09:44:28 -07:00
Daniel Koepping 1276452cfc add blocked-startup offroad label (#37833)
add blocked-startup offroad label
2026-04-15 00:15:57 -07:00
Daniel Koepping 8b2eac4d1f use warning as alert icon (#37832)
replace bell with warning icon
2026-04-15 00:09:59 -07:00