Commit Graph

115 Commits

Author SHA1 Message Date
Shane Smiskol 02a5c081cc navd: locationd is only trusted source (#29803)
* finish revert for https://github.com/commaai/openpilot/pull/27579

* comment out

* clean up
old-commit-hash: 96fd66e4e294c05601a93fd298740a6dfebf564e
2023-09-06 15:47:21 -07:00
Shane Smiskol dcf9d9e3a7 ui/map: clip vehicle speed to min of 10 m/s (#29601)
* all the changes I want to make

* Revert "all the changes I want to make"

This reverts commit c18132b73eb9bba4d7871631d7cd4155eb7efcd0.

* add initialized

* clip to 10 m/s

* fix bug

* rm

* here?
old-commit-hash: b8fb26055825f4ee35f647b6d84c2e6e6878a93f
2023-08-24 15:09:30 -07:00
Shane Smiskol 9a1f82a853 ui/map: initialize speed filter with current speed (#29605)
fix map starting from 0 zoom
old-commit-hash: b9d77afd7e91d46916b471bdc067f83edb2d64de
2023-08-24 14:53:47 -07:00
pencilpusher cc4f6c5fbe ui/map: keep the car icon aligned to its bearing (#29482)
* rotate icon with current bearing

When user is rotating the map, the car icon should stay fixed on the cars bearing, not the map.

* spacing

* comment

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 472151b6a004d387532415039196c2165f7d32df
2023-08-23 17:33:58 -07:00
pencilpusher fc14939f02 ui/map: interactive counter fix (#29470)
* use interactive_counter instead of separate zoom and pan counters

* use interaction_counter instead of separate zoom and pan counters

* same styling

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: f2d22075ebd3f5e17628d1cf1ea102c7ce0bbb09
2023-08-19 00:07:52 -07:00
Dean Lee f667936f3a ui/map: show map on destination set/change (#29327)
* show map on dest set/change

* check for rcv_frame

* clear current_nav_dest

* restore allow_open

* use requestShow

* cleanup

* one check

* revert behavior changes

* Update selfdrive/ui/qt/maps/map.cc

* more obvious

* Update selfdrive/ui/qt/maps/map.cc

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 3a277f1b81fbb16673a77a475421a18751127cf2
2023-08-17 01:32:22 -07:00
Shane Smiskol 312d80c877 map: set destination marker visibility once (#29444)
set visibility once
old-commit-hash: da38aed48300ca1db0a1032c12c26b0268ebb03c
2023-08-17 01:02:59 -07:00
Dean Lee e0439a516f ui/map: assign the return value to last_position (#29341)
assign the return value directly to last_position
old-commit-hash: 613bbb7e6da40b313dea86af9bfae71c057b375d
2023-08-14 16:39:43 -07:00
Dean Lee b065f5c9a2 ui/map: fix CSS error (#29332)
fix css error
old-commit-hash: 4a89928a9a1eebcf46e789a2df037af66b087252
2023-08-11 03:31:13 -07:00
Dean Lee eb695a00c2 ui/map: check NavDestination only if navInstruction is invalid (#29331)
* check NavDestination only if navInstruction is invalid

* Update selfdrive/ui/qt/maps/map.cc

Co-authored-by: Shane Smiskol <shane@smiskol.com>

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 80356b34f1c189bee4287c0b70c3e6a18e105cc3
2023-08-11 03:26:08 -07:00
Cameron Clough 6ed5aca05a ui/map: update mapbox style (#29186)
old-commit-hash: 748238f87cbce5e05ffa06a49f490012d5424864
2023-08-08 20:18:49 +01:00
Shane Smiskol d4ec764235 ui: new nav settings button (#29068)
* add image

* remove extra spacing

* add images

* use nav-settings-square-smaller.png

* draft

* clean up

* kinda works!

* nop need to update state

* can just use clicked

* MORE

* remove old button

* slightly smaller (todo change image))

* this works but is ugly

* remove old settings button

* draft

* no it's not

* draft 2.0

* clean up

* clean up

* let's make map_settings_btn public

* since we don't have map, use enabled

* fix image size

* can do clean up in another PR

show

* add line

* rename

* useless spacing

* use old nav icon

* handle DM icon (and test)

* clean up

* no reason

* remove old image

* don't use setCurrentIndex

* Revert "don't use setCurrentIndex"

This reverts commit 6fde765a3cd3a9ee39205614587a23fbfbc60950.

* also can use a ternary

* seems cleanest

This reverts commit f9287230704b94f46b6bb5376d9a17075a20caf7.
old-commit-hash: 0dd1dcc7d06e8d5873dc9a2fa5c3e220295bfc1c
2023-07-24 22:27:01 -07:00
Shane Smiskol 6d9a313f19 ui/map: hide settings with showing map (#29127)
consistent map showing behavior
old-commit-hash: 13dc0325b237a378304bf2a54b66ecb501fc2bea
2023-07-24 18:25:46 -07:00
Shane Smiskol b8bf3fc0c2 nav: improve no route alert text (#29076)
* kind of

* Revert "kind of"

This reverts commit 25abbbf1764b0f7e8fbcb83e37159ba6f8cdf641.

* more generic alert text, whenever we're waiting for navd.

* actual better comment

* update translations
old-commit-hash: d70c4916db0af3c5288034db9a361fd0aff39f7b
2023-07-20 22:40:31 -07:00
Shane Smiskol a069514c36 ui: set global map transition duration (#29061)
* this works!

* revert properties

* more clean up

* more

* more

* add comment

* final
old-commit-hash: e4dc86f44d6efc6153f8ace852a63802e4a65ca4
2023-07-20 16:11:23 -07:00
Dean Lee 7d5d1b1e70 ui/map: move MapInstructions & MapETA to separate files (#28976)
old-commit-hash: 942a2f97608b0b371c5ca48564d83b3744c82c77
2023-07-20 21:58:46 +01:00
Shane Smiskol a7b32acd4b nav: show warning for routing problems (#29055)
* all my debugging stuff

* this works

* add comment

* bb navd

* navInstruction is valid when we get a non-empty route response

* now don't need this

* stash

* big cleanup

* clean up

* clean up

* debug

* final clean up

* one line

* flip order

* update translations

* is this simpler?
old-commit-hash: 5b368a67eadff384e8c38085a5e8f10ecd37c1e5
2023-07-20 04:01:55 -07:00
Shane Smiskol 3a41e53b08 nav: set icon anchor for destination pin (#29054)
* anchor!

* whoops

* fix anchor
old-commit-hash: d0ea8be95fd5900930070b55c8582bafd329639e
2023-07-20 01:28:21 -07:00
Mitchell Goff 949375984f nav: draw destination pin on top of navigation path (#29050)
* Draw destination pin on top of navigation path

* fix draw ordering

fix draw ordering

* add todo

* rename to feature

* draft

* clean up

* testing

* testing 2

* Revert "testing 2"

This reverts commit fc236aafbc14bbdc5ddb52fb56265302247ddf4b.

* Revert "testing"

This reverts commit 982a508ad701268ebdae910980fd5464454f44a8.

* clean up

* add todo

* show!

* Update selfdrive/ui/qt/maps/map.cc

* lgtm

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: ba03e9429044e40477c3b1f38737688f5a24f4b4
2023-07-20 00:54:42 -07:00
Shane Smiskol 372ae37d91 nav: show green path when enabled (#29020)
* draft

* draft

* clean up

* clean up

* cleaner

* needs to be here to work

* or this works

* works too

* stash

* clean up qdebugs

* revert to master

* reapply changes

add bool

* consistent cmts

* clean up

* can be simpler combined

* clean up/fix
old-commit-hash: 7a673c87ffd8bac16debd306977d00e0db156360
2023-07-18 15:52:59 -07:00
Shane Smiskol d38f321d6e nav: show when using navigate on openpilot (#28958)
* draft

* clean up

* helper

* comment

* debug

* Revert "debug"

This reverts commit d30ff3e996e73818e14f28b51afed206337bf6da.

* nav path

* transition

* revert width transition

revert width transition

* 400 is better, hard to see flicker at 500

* add width back

* tune

* tune

* 12 might be good

* 400ms is good

* lower case company lcc

* up here

* up here

* clean up

* multiple lines

* self explanetory
old-commit-hash: 358a86b63682c4ed5d570020d254a9654c0d61df
2023-07-17 21:28:10 -07:00
Dean Lee cba02f9a59 ui/map: fix wrong remaining time (#28960)
old-commit-hash: 53934c7fee3da1aa7ee752c53796f3859e156815
2023-07-15 13:28:21 +01:00
Dean Lee 9212a16e54 ui/map: cache navigation images at startup (#28783)
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

old-commit-hash: ccfca97dfc08f2d7a583fe268bb816c5ae47fc6b
2023-07-14 20:18:49 +01:00
Dean Lee 387f6b6bf6 ui/map: handle & display error in MapWindow (#28854)
old-commit-hash: ae4a375dd658dbb2b5c3093a097100d7c0e1040a
2023-07-13 10:26:58 +01:00
Shane Smiskol 24bd763e45 ui: reset nav status on offroad transition (#28897)
* need to do this

* actually better to clear it on offroad transition, then onroad transition will be fine
old-commit-hash: c158537df69c21dc0f134774cdd02b48dfbadeeb
2023-07-11 19:04:41 -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: 34a5e626d6f55cd33bc292e4f9d4a21e1fd2972b
2023-07-11 14:49:19 -07:00
Cameron Clough 9716affb3b nav: hide settings on map request visible (#28884)
old-commit-hash: 6643616c475a2a9a884352af19233e596eb5e9e3
2023-07-11 21:40:33 +01:00
Dean Lee 22b1baff64 ui/map: don't clear eta when map is hidden (#28878)
old-commit-hash: 4544b40b7077b9aa7447c8fee1d0b254397eec65
2023-07-11 10:23:45 +01:00
Dean Lee 96b9902629 ui/map: reuse the Qlabels and remove call to clearLayout (#28788)
* dont clearlayout

* replace show with setVisible

* remove signals&connections, call updateDistance in updateInstructions

* refactor updateDistance to getDistance
old-commit-hash: e1ea1d58e4f8e96c9c14367ade2e4e650a9ffb9a
2023-07-09 21:27:24 +01:00
Dean Lee d70f51a8db ui/map: use overlay widget to simplify code and improve rendering performance (#28800)
* move widgets into overlay

* adjust margin

* add spacing
old-commit-hash: 7a42e51c90cc837248e4aac8bbc04d3eec7d474d
2023-07-09 16:03:51 +01:00
Dean Lee 0c814c0cf9 ui/map: draw ETA with rich formatted text (#28780)
* draw ETA with rich formatted text

* no rounded at the bottom corners

* add Params param to member

* fix font typo

* restore opendbc

* set antialiasing

* fix time format
old-commit-hash: 060490bdf1d812cf7d687cb2d04994daa0e75ed0
2023-07-09 11:54:29 +01:00
Jason Young 089a09a92a nav ui: restore speed-adaptive map zoom level (#28796)
Revert "map: fix repeated call to m_map->setZoom (#25784)"

This reverts commit 00cc1831bb13d838ba5df4fdfc6c071f7c704493.
old-commit-hash: e816c81a5af8684cf3eb6f0c9d578cf82ebc1588
2023-07-05 15:45:32 -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: 5991aea10a63d9314149e88e22898875801ef775
2023-07-05 15:00:33 -07:00
Harald Schäfer 659fc99be4 Nav: show gps as long as it's 100m accuracy (#28713)
* Nav: show gps as long as it's 100m accuracy

* Get norm

* get std
old-commit-hash: 85c4b1a400e9ab80536c0bf2ac8f1bacc4476c2c
2023-06-27 19:09:45 -07:00
Cameron Clough 7e697a0d3d update mapbox style (#28638)
updated map components and dataset
old-commit-hash: a2b7d2c86788be157c41edfc3e582c588fa32984
2023-06-22 22:10:42 +01:00
Cameron Clough b6e6f008f1 UI: improved nav destination entry (#28476)
old-commit-hash: bc5a8990241311e347455ea8d69a064bd0693266
2023-06-22 19:57:29 +01:00
Harald Schäfer f05cf4cdf1 Only trust locationd for nav (#27579)
* Only trust locationd for nav

* unused var
old-commit-hash: d75ee19defc279837f64fd62a0dbe2db4acd1a2d
2023-03-14 09:25:09 -07:00
Harald Schäfer 63efb985cd Revert locationd to gpsLocation (#26963)
* revert locationd laika change

* switch msg

* change proc replay

* back to gpslocation

* update ref

* no np floats in msg

* Ignore empty laikad messages in mapos

* more tolerance

* c++ doesnt work like that
old-commit-hash: 4c33d94d3f088c6f1fc88a0f40f3a828968c1c52
2023-01-14 16:56:14 -08:00
Kurt Nistelberger 95f4709f7d match style
old-commit-hash: 2b611862becd0cafbe6949961da04dfa4d252b4e
2023-01-07 17:56:16 -08:00
Kurt Nistelberger e142178284 Navigation: add destination marker (#26873)
* add navigation destination marker

* fix removal

* update default marker icon

* update default marker

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: b6440304d59d13b918842f68ce9f3417e3e0ecbc
2023-01-07 17:53:14 -08:00
Dean Lee 53c4262098 map: fix repeated call to m_map->setZoom (#25784)
Fix repeated map api calls
old-commit-hash: f0665911b2aa5807348ee5bf209ee21b8be2ca89
2022-09-15 20:36:13 -07:00
Dean Lee f2035fe63c UI/map: remove redundant QString ctor (#25704)
old-commit-hash: 69e9b285b3e125e319aedc9b587e4da44adb9913
2022-09-08 15:53:23 -07:00
eFini 9ca692179f Fix is_rhd param name in map.cc (#25464)
old-commit-hash: 1de8ad891bcf8c0b73b24f7e3eab17f3448e7473
2022-08-17 20:21:38 -07:00
Adeeb Shihadeh 62b8b25cdf nav: same icon size for active & inactive lanes (#25383)
* nav: same icon size for active & inactive lanes

* update translations
old-commit-hash: ac305dacef7b4267131543194e16c569488310fe
2022-08-08 15:07:44 -07:00
Willem Melching ce7948464f nav: draw inactive lanes with 50% opacity (#25157)
* nav: draw inactive lanes with 50% opacity

* update ts
old-commit-hash: 49dd56fc241d5ea3e0ab37e10175ad545ef4d528
2022-07-13 17:58:45 +02:00
Shane Smiskol 314166f5fd Nav: wrap strings (#25089)
* Wrap nav strings and translate

* Update QM

* Update QM
old-commit-hash: cbff8fcbd02b262860b3540a3dba7108237d2b46
2022-07-08 21:17:00 -07:00
Willem Melching c20b96764c nav: use laikad position if locationd is not yet available (#25033)
* ui: use laikad position when locationd is not ready

* cleanup

* same threshold as locationd

* use first bearing directly

* use in navd too
old-commit-hash: a9401319dfa89fea2d2699aaddc758cbc47b6396
2022-07-08 09:20:36 -07:00
Shane Smiskol a11084a6c6 UI: draw map with uiUpdate signal (#24632)
* draw map with same uiUpdate signal as onroad window

* fix

* fix

* fix

* test

* test

* clean up

* clean up

* clean up

* draw instantly when dragging

* self explanatory

* remove line

* fix spacing

* see if we call ui'c sm->update before mapwindow

* Revert "see if we call ui'c sm->update before mapwindow"

This reverts commit e5dcd70013750b871894c276e4d15d55b0c92e97.

* sort includes
old-commit-hash: fb4b4773a58a62783dd48e6058be5a0da6bb1fab
2022-05-27 15:35:09 -07:00
Adeeb Shihadeh f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb313bea258c012c3026461a22bf8135
2022-05-18 14:11:57 -07:00
Willem Melching 43b558f6db map.cc: fix crash on older route with missing liveLocationKalman values
old-commit-hash: 9307fe434cf7e9adb68a12d0b9073ebcf75e1f3e
2022-05-04 11:37:31 +02:00