Commit Graph

102 Commits

Author SHA1 Message Date
Shane Smiskol
b119006f6a Cycle onroad when changing offroad-only toggles (#35361)
* bad

* Revert "bad"

This reverts commit 6b5475dd90c3a29c00d946c94d726563cbec6179.

* notify param

* doesn't need to live in low level paramcontrol, rename param

* should work

* fix

* disable while engaged

* note

* fix

* just in case

* param is cleared by manager -- this was all to ensure manager got our `started` transition

* clean up

* and that

* rm

* negative better than generic thing

* timer is needed as it's not clean to fix case where you toggle while no ignition -- you can't go onroad + this allows some nice tolerance time for user to switch 2 toggles

* these aren't required or useful

* add to description

* no longer unlive

* allow reset button too

* another pr -- Revert "allow reset button too"

This reverts commit 5d03edddc80d8625ceba5d5178b2781e9d10d9c9.

* rm space from i18n string

* car is powered on
2025-05-27 20:20:38 -07:00
Dean Lee
6baa541501 ui: refactor model updating and rendering into ModelRenderer class (#33702)
refactor model update

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-10-03 10:46:05 -07:00
Dean Lee
47409ab4d4 ui: refactor CameraView to serve as a generic vision stream display class (#33457)
refactor transform
2024-09-10 11:53:10 -07:00
Dean Lee
343de54030 ui: consolidate prime state management into PrimeState Class (#33473)
new class PrimeState
2024-09-09 14:34:11 -07:00
Dean Lee
43025c2836 ui: refactor driver monitor updating and rendering into DriverMonitorRenderer class (#33375)
* Refactor Driver Monitor Updating and Rendering

add comments

* rebase master

* rename dmon to driver_monitoring
old-commit-hash: af80a13716f2ba40b6652ab188d1881385b6aa71
2024-09-01 12:11:16 -07:00
Adeeb Shihadeh
1b2bc44227 controlsd: split out state/alerts into selfdriveState (#33421)
* setup selfdriveState

* little more

* update refs

* migration

* all too slow
old-commit-hash: 87051803ab
2024-08-31 18:48:17 -07:00
Dean Lee
a529422db0 ui: add prefix PRIME_TYPE_ to PrimeType enum values (#33371)
Add Prefix PRIME_TYPE_ to PrimeType Enum Values
old-commit-hash: 4bb00a042a
2024-08-25 09:44:18 -07:00
Dean Lee
973c6c2e7e ui: remove map & navigation related code (#32836)
remove map
old-commit-hash: 669553aa37
2024-06-25 21:45:44 -07:00
Shane Smiskol
272216b2a8 remove uiPlan (#32721)
* remove uiPlan from ui

* remove publishing

* Update log.capnp

* Update services.py

* no uiPlan here

* Update ref_commit
old-commit-hash: 684209e077
2024-06-11 21:31:10 -07:00
Adeeb Shihadeh
f641d7e851 ui: fix brightness when there's no camera (#32413)
old-commit-hash: 79c8fb0236
2024-05-13 13:27:05 -07:00
Dean Lee
9fcc783447 ui: fix pair button shows on paired device (#32109)
old-commit-hash: ba98786ee3
2024-04-14 18:00:01 -07:00
YassineYousfi
75a69e12b3 disable navigate on openpilot (#32106)
* 2eedcd90-b7db-46cb-86be-740f48ded7ab/700

* noop ciao

* here too

* mapsd too

* update translations

* disable mapsd test from test onroad

* disable mapRenderState test from timings

* lint

* fix exp mode toggle panel

* update tr

* french done

* dont build mapd

* only no nav

* just comment

* deprecate nav fields

* rm not comment

* dont deprecate too much

* remove from services

* merge cereal
old-commit-hash: 754dd45ffa
2024-04-09 10:40:38 -07:00
Dean Lee
2afcc4a9a6 ui: move struct Alert into OnroadAlerts (#32024)
* move Alert into OnroadAlerts

* multi-lang
old-commit-hash: fad9edf344
2024-03-27 15:34:38 -07:00
Shane Smiskol
ebfc450fac longitudinal personality: change via steering wheel distance button (#31792)
* start at param

* start by sending personality

* change to personality

* POC: button changes personality

* what's wrong with this?

* fix

* not really possible but fuzzy test catches this

* there's always a typo

* dang, we're dropping messages

* clean up

* no comment

* bump

* rename

* not all cars yet

* works but at what cost

* clean up

* inside settings

* write param so we save the distance button changes

* setChecked activates buttonToggled and already writes param!

* don't need this, we update from longitudinalPlan on changes

* some clean up

* more

* ui

* allow some time for ui to receive and write param

* plannerd: only track changes in case no ui

* Revert "plannerd: only track changes in case no ui"

This reverts commit 2b081aa6ceb92c67a621b74592b2292756d29871.

* write in plannerd as well, I assume this is atomic?

* don't write when setting checked (only user clicks)

* better nane

* more

* Update selfdrive/controls/lib/longitudinal_planner.py

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* doesn't write param now

* ParamWatcher is nice

* no debug

* Update translations

* fix

* odd drain sock proc replay behavior

* vanish

* Revert "odd drain sock proc replay behavior"

This reverts commit 29b70b39413e1852bb512155af6b6a94a5bd9454.

* add GM

* only if OP long

* move personality to controlsState, since eventually it won't be exclusive to long planner

more

bump

* diff without translations

* fix

* put nonblocking

* CS should start at up to date personality always (no ui flicker)

* update toggle on cereal message change

* fix

* fix that

* ubmp

* mypy doesn't know this is an int :(

* update translations

* fix the tests

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 3d63c7093a
2024-03-13 01:05:02 -07:00
Dean Lee
62525a60ee ui/onroad: avoid drawing invalid lanes and leads (#29666)
old-commit-hash: 33987d4cc9
2023-12-13 14:51:09 -08:00
Dean Lee
54346eccee modeld: remove modeldata.h (#30423)
* remove modeldata.h

* remove TRAJECTORY_SIZE
old-commit-hash: 335237aea0
2023-11-18 22:45:26 -08:00
Adeeb Shihadeh
cdb9993290 ui: add purple prime def
old-commit-hash: 0f0acc190b
2023-11-15 17:04:07 -08:00
Dean Lee
3196e129ca ui: make default_face_kpts_3d constexpr (#30239)
old-commit-hash: 383964cd5b
2023-10-14 09:14:20 -07:00
Cameron Clough
c7820cf1cc ui: hasPrime/primeChanged helper (#29590)
old-commit-hash: 05e91c074d
2023-08-24 12:47:22 +01:00
Dean Lee
c6db4c515c ui: use enum PrimeType for prime_type (#29491)
old-commit-hash: 99279b8eef
2023-08-24 12:26:45 +01:00
Dean Lee
97e9d55588 cpplint: build/include_what_you_use (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2d99521e75
2023-08-23 13:25:17 -07:00
Dean Lee
5cc9fbe23f ui: longer screen timeout for driver view (#27457)
* longer driverview timeout

* Update ui.cc

* reset timeout

* do cleanup

* Apply suggestions from code review

* Update selfdrive/ui/ui.cc

* reset to default timeout on hidden

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: f1568b960a
2023-08-16 22:22:39 -07:00
Dean Lee
b8110a90d2 ui: set max brightness when showing the QR code (#28907)
* set max brightness when showing the QR code

* set brightness in ui

* set in device
old-commit-hash: e958ce1c31
2023-07-14 12:22:35 -07:00
Shane Smiskol
222f7f6727 ui: singleton Device instance (#28908)
* singleton

* remove awake
old-commit-hash: b8dd4dcc28
2023-07-12 18:36:44 -07:00
Shane Smiskol
b9aa2c232f ui: fix timeout typo (#28905)
tim is out -> timeout
old-commit-hash: d68bd905fc
2023-07-12 13:09:42 -07:00
Shane Smiskol
37ee12de52 ui: show map with nav (#28867)
* accept touch events in map settings

* draft

* draft 2.0

* revert this stuff

* need this

* fix

* clean up debug prints

* fraft

* only show map on closeSettings if nav

* works!

* can't do it here

* I was going to connect signals from UIState to HomeWindow, then to OnroadWidget, but that seems like too much

* just need to keep track of it in onroad, seems like the cleanest option

* ideally we show the map where we set the scene variable, and that's in map.cc

* old variable

* comments

* less confusing

* app comment

* add back

* fix

* move to top

* remove this comment
old-commit-hash: 34a5e626d6
2023-07-11 14:49:19 -07:00
Dean Lee
b987242655 ui: fix alert disappear when no controlState is received in a frame. (#28811)
* always return alert

* don't get old alert
old-commit-hash: d9d5ce3634
2023-07-05 15:20:28 -07:00
Dean Lee
724ef9d7ef ui: more descriptive global names (#28813)
* rename global bdr_s to UI_BORDER_SIZE

* rename header_h to UI_HEADER_HEIGHT

* remove unused footer_h
old-commit-hash: 5991aea10a
2023-07-05 15:00:33 -07:00
Dean Lee
a001b46ce9 ui/device: remove method motionTrigger (#28754)
remove motionTrigger
old-commit-hash: 57e70278dc
2023-06-30 08:46:09 -07:00
Harald Schäfer
e7c96c1a95 Alerts: make standard alert more opaque (#28706)
More opaque standard alert
old-commit-hash: 124522e363
2023-06-26 09:33:24 -07:00
Adeeb Shihadeh
39d1e68030 UI: border is always engagement state (#27416)
* border is for engagement state

* round shading too

* alerts =/= status

* no debug print

* Full still full

* more cleanup

* more radius

* Update mui too

* normal black

* cleanup

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
old-commit-hash: 07a68ca032
2023-06-22 21:37:08 -07:00
Dean Lee
9858839db0 ui: refactor setPrimeType (#28143)
handle prime type change in new function UIState::setPrimeType
old-commit-hash: 8ca3be9788
2023-05-15 13:08:21 -07:00
Dean Lee
2936d72386 ui: auto detect available streams (#27470)
* auto detect available streams

* no switch if wide cam not available

* clear frames before getAvailableStreams

* warning

* clear at same time

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: d5375af2f5
2023-03-14 13:59:22 -07:00
Harald Schäfer
0ac73f2a81 MPC path in UI (#27380)
* 10s lat

* Full length MPC

* redfine N

* Leave controls the same for now

* Updates

* use long plan in lat plan

* interp plan

* simplergit add selfdrive/controls/plannerd.py selfdrive/controls/

* expand to 10s

* revert this

* fix linter

* vizualize

* fix long test

* typo

* cleanup

* compiles

* unused

* unused

* bump cereal

* bump cereal

* use model if no uiplanm

* update replay

* update ref commit

* bump cereal to master
old-commit-hash: eb8bdc0026
2023-02-17 19:58:30 -08:00
ZwX1616
8fd5f1b50d ui: dmoji (#27070)
* will draw

* gradient

* bg

* add sense of depth

* refactor

* cleanup

* fix endpoint

* clean up

* use array

* 1 matmul

* lives in modeldata

* standstill only

* remove bad pts

* do less math

* smooth

* kind

* fix d

* lineswidth

* fade in and out

* hide

* quick

* gray out

* fix joints

* offset

* rest icon

* clean up

* circle as state

* longlat

* new design

* gap and g

* scaledown, fix jts and unlock not standstill

* width

* different

* intermediate

* sand

* motion effect

* vis

* fix bg

* clean up

* t

* btn_size

* small speedup

* sligh

* clean up

* facelift

* match .2

* .4 is good

* size

* no ss

* rhd compat

* less filt

* more line

* engaged

* not white

* drop prop

* this is fine

* independent falg

* sg

* dont look like hitman

* cleanup

* little more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 955c1dff45
2023-02-08 19:06:59 -08:00
Lee Jong Mun
a5f952c69b remove unused space (#26680)
old-commit-hash: 92296ce55d
2022-12-02 18:53:50 -08:00
Adeeb Shihadeh
aec5f32f3c publish experimental mode state (#26512)
* publish experimental mode state

* remove that
old-commit-hash: 9c96b21367
2022-11-15 17:18:13 -08:00
Adeeb Shihadeh
74979a7c76 experimental mode (#26416)
* experimental mode

* rename param

* red lights
old-commit-hash: 9a3f468051
2022-11-08 14:45:01 -08:00
Adeeb Shihadeh
273b1c5b5c UI: draw onroad objects on right frame (#26306)
* update before draw

* fix a lot of janky

* fix more flicker

* cleanup

* fix flicker when opening settings

* simplify
old-commit-hash: c171fe9f9a
2022-10-31 23:01:22 -07:00
HaraldSchafer
ed91648949 UI: fade into wide camera (#26203)
* UI: fade into wide camera

* handle routes with no wide calib

* more cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dbc30c053c
2022-10-27 17:27:31 -07:00
Adeeb Shihadeh
6831f3499f UI: only show cell settings on non-prime connection (#25067)
* fix indentation

* add primeTypeChanged signal to uiState

* hide advanced networking toggles on prime type change

* switch between map settings on prime type change

* cleanup

* remove duplicate code, wait for signal

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 06e283a750
2022-10-05 16:10:14 -07:00
Cameron Clough
595d8471db UI: remove unused tap detection constant (#25956)
old-commit-hash: bc7be114d8
2022-10-03 13:58:40 -07:00
Adeeb Shihadeh
bcd69adc33 UI: remove imu tap detection (#25924)
old-commit-hash: 391780551a
2022-09-29 11:02:27 -07:00
Dean Lee
8256220a51 ui: multilang date (#25741)
* multilang date

* update translations

* add language to uistate

* update translations

* use it here too

Co-authored-by: sshane <shane@smiskol.com>
old-commit-hash: 27e1ec8fd3
2022-09-13 03:02:13 -07:00
Cameron Clough
1d78524b9d e2e long yellow path (#25679)
* yellow brick road

* live toggling

* path color from acceleration

* more yellow
old-commit-hash: a8134f2265
2022-09-07 08:58:33 -07:00
Greg Hogan
5dd12e194b nav: toggle to show on left side of onroad ui (#25169)
* nav: show on left side of onroad ui

* add toggle

* capitalization

* update translations

* single params object

* skip unfinished translations test

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 93cd0285ac
2022-07-18 13:57:21 +02:00
Dean Lee
98046a880e ui: replace line_vertices_data with QPolygonF (#25001)
use QPolygonF

use push_front
old-commit-hash: 867a1cf35a
2022-06-30 10:57:47 +02:00
Willem Melching
c88c78a13b ui: use current calibration to center vanishing point (#24955)
* compute x and y offsets using calibration

* fix default calibration

* clamp to max values

* only use when valid

* not while calibrating

* less diff

* cleanup zoom
old-commit-hash: 915b4928ff
2022-06-27 16:03:26 +02:00
Willem Melching
7fce9f4fdf ui: disable controls unresponsive alert on PC
old-commit-hash: 2699bae778
2022-06-16 16:07:04 +02:00
HaraldSchafer
08ad733229 Remove laneless toggle (#24738)
* Remove laneless toggle

* Update refs
old-commit-hash: 7f16e19f79
2022-06-03 14:04:14 -07:00