Commit Graph

16360 Commits

Author SHA1 Message Date
Nayan
49e58a2532 Device: Driving Screen Off (#1252)
* 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>
2025-09-30 21:06:11 -04:00
Jason Wen
ae901d1562 ui: add Display settings panel (#1301)
* 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>
2025-09-30 20:17:53 -04:00
Jason Wen
85d2653fda Speed Limit Assist: No Easter Eggs 2025-09-30 17:50:35 -04:00
Jason Wen
0f4828df82 ui: only longitudinal cars can use Speed Limit Assist (#1300) 2025-09-30 13:39:11 -04:00
Jason Wen
dc0fd4ca96 Longitudinal: Speed Limit Assist (SLA) (#833)
* 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 a29bccff12b9ed9d64efe7a5722bf614214002c4.

* 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 f0083d6241380e84ed259c402941fa2c78e03fdf.

* 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 be8068e8ab9b52c7e8e1b3f29e89f994b3e911df.

* Revert "get buttonEvents at 100 hz and process for 20 hz consumption"

This reverts commit a739d4d4379080fceffda8d7d080c0260519f144.

* 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 1eec763be795e1269f2046f8fe65781b3abedd0a.

* 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>
2025-09-30 13:13:45 -04:00
Jason Wen
90adc18032 MADS: enforce certain soft disable events by user when in motion (#1298)
* MADS: enforce soft disable events by user when the vehicle is in motion

* flipped
2025-09-29 19:18:52 -04:00
Jason Wen
db65937fc7 Revert "ui: generic check with ICBM param" (#1286)
Revert "ui: generic check with ICBM param (#1274)"

This reverts commit d5a873ed86.
2025-09-25 19:15:36 -04:00
James Vecellio-Grant
8ebe9b69af bug: fix Speed Limit Resolver initialization (#1285)
bug: fix speedlimitresolver init
2025-09-25 10:11:51 -04:00
Jason Wen
4c40be8b1f ui: always convert speedLimitFinalLast 2025-09-25 07:01:32 -04:00
Jason Wen
082ea8119b Speed Limit Resolver: abstract more speed limit attributes (#1284)
* Speed Limit Resolver: abstract more speed limit attributes

* update ui

* lint
2025-09-24 22:17:03 -04:00
Jason Wen
1465e38c7b SCC-M: overriding is an enabled state (#1281) 2025-09-23 10:11:52 -04:00
Jason Wen
ecee67dd64 Locationd: reimplement liveLocationKalman and use position_geodetic in liveMapDataSP (#1275)
* init

* desc

* llk welcome back

* more

* new param to write

* update mapd

* no migration

* no refactor for now

* exec

* rename

* bearing

* fix test

* lint
2025-09-22 23:39:55 -04:00
Jason Wen
ea6178e53e Smart Cruise Control: Map (SCC-M) (#1280)
* init

* more

* a bit more

* expose

* bruh

* some fixes

* ui

* lint

* Update map_controller.py

* add overriding

* draw in orders
2025-09-22 22:54:45 -04:00
Jason Wen
01a0ad496d ui: more speed limit improvements (#1278)
* 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
2025-09-22 19:50:59 -04:00
Jason Wen
b64d5a0fa4 liveMapDataSP: parse bearing from GPS (#1279)
* simpler approach pls

* fix
2025-09-22 09:39:22 -04:00
Jason Wen
005c6aed95 ui: separate road name toggle param and bigger fonts (#1277)
* ui: separate road name toggle param and bigger fonts

* slightly lower
2025-09-22 08:54:16 -04:00
Jason Wen
2fa66d6f4d ui: include Speed Limit Offset for Speed Limit Warning (#1276)
* ui: include Speed Limit Offset for Speed Limit Warning

* fix
2025-09-22 01:35:13 -04:00
Jason Wen
d5a873ed86 ui: generic check with ICBM param (#1274) 2025-09-21 02:53:03 -04:00
Jason Wen
563ae65443 ui: Road Name param should be persistent (#1273) 2025-09-21 00:33:43 -04:00
Jason Wen
2efe78a4ef ICBM: allow button commands at all speeds (#1271)
* ICBM: allow button commands at all speeds

* use openpilot state
2025-09-20 17:48:13 -04:00
Jason Wen
569a9216db ui: only draw speed limit offset when speed limit is valid (#1270) 2025-09-20 17:36:13 -04:00
Jason Wen
629cfd845f ui: fix scrolling behavior in Speed Limit settings (#1269)
* rename

* ui: fix scrolling behavior in Speed Limit settings
2025-09-20 17:23:24 -04:00
Jason Wen
2892dc05c8 mapd: use SubMaster polling to validate GPS status (#1268) 2025-09-20 16:20:22 -04:00
Jason Wen
632b416f2a ICBM: use longitudinalPlanSP.vTarget directly for evaluation (#1266)
* ICBM: add SCC-V to v_targets list

* Longitudinal planner: expose custom vTarget and aTarget

* use the source directly
2025-09-20 14:22:10 -04:00
Jason Wen
5f3821c1f9 Longitudinal planner: expose custom vTarget and aTarget (#1267) 2025-09-20 12:21:13 -04:00
Jason Wen
55b7529ca4 ui: Road Name (#1265) 2025-09-20 05:23:02 -04:00
Jason Wen
c248f307f8 ui: Speed Limit Warning (#1263)
* ui: Speed Limit Warning

* missed

* behind toggle

* missed

* reorder

* fix type
2025-09-20 01:59:07 -04:00
Jason Wen
bdb83b6be1 ui: remove redundant code (#1262) 2025-09-20 01:40:51 -04:00
Kumar
c55f40e77d ui: Speed Limit Information (#995)
* 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>
2025-09-20 01:01:08 -04:00
Jason Wen
ddf63701e8 Speed Limit: Resolver (#1256)
* 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 a29bccff12b9ed9d64efe7a5722bf614214002c4.

* 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 f0083d6241380e84ed259c402941fa2c78e03fdf.

* 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 15c6834d4e68e2ba8f717c9442ec8d4d269d2b83.

* some rename

* translations

* unused for now

* more

* lint

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-09-19 18:32:20 -04:00
Jason Wen
28098bb7c4 ICBM: disable hysteresis (#1260)
* ICBM: disable hysteresis

* notes
2025-09-19 17:36:33 -04:00
Kumar
60e056cc0a mapd: Bump version v1.10.0 -> v1.11.0 (#1111)
* bump mapd v1.10.1

* v1.11.0

* v1.11.0

* permission

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-19 00:34:03 -04:00
Jason Wen
fb743d313e Reapply "Intelligent Cruise Button Management (ICBM)" (#1257) (#1258)
* Reapply "Intelligent Cruise Button Management (ICBM)" (#1257)

This reverts commit 4441671227.

* ICBM: `pcmCruiseSpeed` is true during initialization

* bump

* fix tests
2025-09-18 16:47:40 -04:00
Jason Wen
4441671227 Revert "Intelligent Cruise Button Management (ICBM)" (#1257)
Revert "Intelligent Cruise Button Management (ICBM) (#1242)"

This reverts commit 1f8941367d.
2025-09-18 16:02:51 -04:00
Jason Wen
1f8941367d Intelligent Cruise Button Management (ICBM) (#1242)
* 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
2025-09-18 00:06:16 -04:00
Jason Wen
784e1d6658 Smart Cruise Control: Vision (SCC-V) (#997)
* 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 b67281bcac0dce0c6c3237afc2584cf29144c83c.

* 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>
2025-09-17 22:55:36 -04:00
Jason Wen
cb94d3b055 Longitudinal: Smart Cruise Control prerequisites (#1249)
* 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 b67281bcac0dce0c6c3237afc2584cf29144c83c.

* 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>
2025-09-16 22:51:32 -04:00
DevTekVE
94f93a9f26 ui: Add standstill timer to HUD (#1251)
* 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>
2025-09-16 10:05:34 +02:00
Jason Wen
747460363f panda: consolidate supported panda checks (#1248)
* panda: fix upstream merge conflicts

* move it higher

* consolidate checks

* update

* bump

* actual bump
2025-09-14 23:51:29 -04:00
James Vecellio-Grant
b32c6dafee modeld: add laneline helper for plan indices calculation (#1240)
* 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>
2025-09-14 21:45:22 -04:00
DevTekVE
bffb2fb6fa bugfix: param store to support the latest param changes (#1244)
* bugfix: update parameter handling to use custom CarControlSP.Param and improve param retrieval

* bump opendbc
2025-09-14 20:22:51 +02:00
Jason Wen
688b694266 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (#1229) 2025-09-13 17:42:17 -04:00
Jason Wen
ec8f036850 Merge branch 'upstream/openpilot/master' into sync-20250908
# Conflicts:
#	.github/workflows/selfdrive_tests.yaml
#	README.md
#	docs/CARS.md
#	opendbc_repo
#	panda
#	selfdrive/car/tests/test_car_interfaces.py
#	selfdrive/modeld/modeld.py
#	selfdrive/selfdrived/selfdrived.py
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
#	system/hardware/hardwared.py
#	system/updated/updated.py
#	tinygrad_repo
#	uv.lock
2025-09-13 15:23:36 -04:00
Nayan
4f44d6e643 Reapply "UI: Developer UI" (#1238) (#1239)
This reverts commit 1be13fdc55.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-12 10:58:59 -04:00
Jason Wen
1be13fdc55 Revert "UI: Developer UI" (#1238)
* Revert "Revert & Reapply "UI: Developer UI" temporarily due to QT version mismatch (#1237)"

This reverts commit 810a2d9448.

* Revert "UI: Developer UI (#1233)"

This reverts commit 1bb4ca2547.
2025-09-12 08:37:24 -04:00
DevTekVE
810a2d9448 Revert & Reapply "UI: Developer UI" temporarily due to QT version mismatch (#1237)
* Revert "UI: Developer UI (#1233)"

This reverts commit 1bb4ca2547.

* Reapply "UI: Developer UI (#1233)"

This reverts commit b0a77049dacbdd59bc21d154820ba8cadf4ad201.

* QColorConstants is not on device's QT version. Thanks @kumar for the fix
2025-09-12 09:03:17 +02:00
Jimmy
c9dbf97649 jotpluggler: add icons, use monospace font, and fix ui quirks (#36141)
* use play/pause icons

* use monospace font

* x button for delete

* add icons for splitting

* many scaling + scrollbar fixes and niceties

* simplify texture loading code
2025-09-11 23:31:32 -07:00
Nayan
1bb4ca2547 UI: Developer UI (#1233) 2025-09-12 01:00:05 -04:00
Adeeb Shihadeh
2c04a27a2a ubloxd: cleanup unused files 2025-09-11 14:03:37 -07:00
DevTekVE
b7f8dd11a5 SL: bugfix parameter handling in sunnylink restore and remote setting (#1234)
* 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
2025-09-11 21:44:43 +02:00