Commit Graph

43 Commits

Author SHA1 Message Date
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 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
Dean Lee 8d2a08723a ui/map: remove unused variables (#29098)
old-commit-hash: 980ba1312fc587b735c71887251e16dd20f6cec3
2023-07-22 12:24:16 -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
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 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 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
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 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
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 b6e6f008f1 UI: improved nav destination entry (#28476)
old-commit-hash: bc5a8990241311e347455ea8d69a064bd0693266
2023-06-22 19:57:29 +01: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
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 935ce9edad navd: render map into VisionIPC (#22800)
* navd: render simple map

* render route

* offscreen rendering

* cleanup

* more cleanup

* render into visionIPC

* rename class

* split position update from route update

* stop broadcast if not active

* gate vipc server behind flag

* add python library

* faster

* no vipc from python

* put behind extras

* only send when loaded

* add glFlush just to be sure

* cleanup settings into helper function

* function ordering

* broadcast thumbnails

* put behind param

* adjust zoom level

* add route to python bindings

* revert that freq change

* add logging if map rendering is enabled

* use rlogs if available

* bump cereal
old-commit-hash: 5069852573128f40dd0174eb1d0f3f983367863d
2021-11-26 14:38:02 +01:00
eFini 039e8be5a0 nav: flip instruction images for RHD (#22877)
* nav instruction icon for rhd

* we dont need rhd for active direction

* define suffix as constant

* ps version icon

* reflect icon instead

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 52c4ab73a979d114bc3bd073e991da05acded46f
2021-11-18 14:14:41 +01:00
Willem Melching 6493034aea nav: fix receiving navRoute while map is loading (#22929)
old-commit-hash: 9f423a93cd1c56ab7178dce11f478e2932fe68f5
2021-11-16 14:27:38 +01:00
Willem Melching dc3075790e Move navigation into separate daemon (#22767)
* Add navd folder

* prints route instructions to console

* broadcast NavInstuction without lanes

* show basic instructions and eta

* parse out lane info

* use swaglog

* clip distance on ui side

* draw lane directions

* show route

* add to process config

* add to release files

* small cleanup

* show route without gps

* pop open map on initial route

* fix error messages around no gps

* done

* make persistent process

* handle end of route

* clear route on offroad

* only one timer

* fix layout hacks

* explicit rendering at 20Hz
old-commit-hash: bef686f2752bcad4bb3116c2be63157ee01eab73
2021-11-04 14:32:32 +01:00
Willem Melching 8d9783a379 maps: allow using MAPBOX_TOKEN env variable (#22721)
old-commit-hash: 0ba40954b9bf6810e223600c30affdc15a2b4f9c
2021-10-28 16:13:44 +02:00
Willem Melching 8a0c57433e navigation: use mapbox proxy server (#22660)
* use mapbox proxy

* remove MapboxToken param

* do not log jwt

* remove import

* move to staging url

* put has_prime in ui state

* logic was flipped

* Update selfdrive/ui/qt/maps/map.h
old-commit-hash: cca07c0c730eb6e0d8dab0bde099a2ed706d14de
2021-10-26 18:59:17 +02:00
Willem Melching 40fe85f18e Nav: only open map once (#21650)
old-commit-hash: f9f43578d1b41f97b90f43215ca320bce72e114c
2021-07-19 12:23:01 +02:00
Adeeb Shihadeh 801ab5f5d6 nav: restore zoom and position on double click (#21551)
old-commit-hash: 86c255e3e881c81d6066b04f1d118fddb39b4a81
2021-07-11 00:32:11 -07:00
Willem Melching c042bbf09c nav: various cleanup (#21521)
* nav: various cleanup

* eta resize instant

* show
old-commit-hash: 9ea913bcc812ed55d2f8204ced892b81f20af326
2021-07-08 14:33:58 +02:00
Willem Melching 3aae7b5fc3 nav: simplify segment transition (#21383)
old-commit-hash: f32ca73724243ffaca59d8c4ef6fa46ff29fed38
2021-06-23 15:00:32 +02:00
Willem Melching 16143bef1b nav: cleanup errors and wait for map to be loaded (#21381)
* Cleanup errors

* prevent flicker
old-commit-hash: 7e6a9ce9a5c311940a9553dfef44cecd4db852c4
2021-06-23 14:33:27 +02:00
Willem Melching 3004b29805 Nav: ETA layout improvements (#21361)
* bold and more space

* rounded corners

* oneline

* center

* fix am/pm

* revert width change
old-commit-hash: a3b155839b1bac791f8819812feaffc7b814202c
2021-06-21 17:23:44 +02:00
Willem Melching aaa743ab7a Nav: No GPS warning (#21359)
* Nav: No GPS warning

* optional
old-commit-hash: e4e67985d610539ccaf0ceb7261e9fc937bc70b7
2021-06-21 15:50:23 +02:00
Willem Melching 94c76f41e9 nav: expand banner at correct distance from maneuver
old-commit-hash: 43151389e77ae6c4de8f61270e9a07e2d1c57f84
2021-06-10 12:31:47 +02:00
Willem Melching ba1a20414e nav: add page to settings (#21208)
* add navigation panel to settings

* am/pm display and dynamic width
old-commit-hash: 3c197953bc19c470547b950cd987af39909c5e9e
2021-06-10 09:59:34 +02:00
Willem Melching 0757dac4c6 nav: show ETA and remaining distance (#21188)
* abbreviate distance

* static values

* update distance

* set eta

* use distance along geometry to compute eta

* add traffic info

* formatting improvements

* remove old

* add using git lfs

* git lfs

* cleanup

* abstract

* bit larger
old-commit-hash: 561f3b3191806760dc8e2f4ce803cd06e9f4c728
2021-06-08 16:48:20 +02:00
Willem Melching f79ad64b31 nav: add current bearing to route request (#21186)
old-commit-hash: 41c96c99c7b37eb3067d610fe46094daebc02df8
2021-06-08 16:00:31 +02:00
Willem Melching 6f757fdd60 Fetch mapbox token from API (#21136)
* delay widget creation until going onroad

* let athena fetch mapbox token

* only tici

* add token

* cleaner

* rename slots

* that was missing
old-commit-hash: 21be4434998476669c807c3d1ba9b25c1cbc495f
2021-06-07 12:14:08 +02:00
Willem Melching 879a616ba8 Various nav improvements (#21133)
* various nav improvements

* use traffic aware routing

* read last position from param

* allow compute without gps when no route

* cleanup

* properly hide route

* set pitch
old-commit-hash: 14f09e4ee14ce9c0497c60fbd00bc12ab151ced6
2021-06-04 13:45:42 +02:00
Willem Melching efa94a89ff Mapbox widget (#20751)
* squash mapbox stuff

* only hacks for pc

* no hack there

* only update when needed

* get destination from param

* no need for user agent

* add athena method

* change nav path color

* layout cleanups

* margin top

* add build scripts

* rename header file

* set pitch

* fix icon blinking

* keep both options

* draw on top to fix last blinking

* only recomput with gps

* fix include

* put map in onroadwidget

* update mapbox plugin to allow specifying directions url

* cycle through views

* dynamic resize

* only when present

* add map_helpers

* whitespace

* small fixes

* let scons decide

* update setup files

* implicit dependency

* fix alerts

* Update selfdrive/ui/SConscript

* move clearLayout to util.h

* only build when map.cc present

* move maps to own folder

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 86aefbe7667f0693402c1883d286ce331e9d6215
2021-05-17 14:57:07 +02:00