Commit Graph

41 Commits

Author SHA1 Message Date
Shane Smiskol
0dd1dcc7d0 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.
2023-07-24 22:27:01 -07:00
Dean Lee
980ba1312f ui/map: remove unused variables (#29098) 2023-07-22 12:24:16 -07:00
Dean Lee
942a2f9760 ui/map: move MapInstructions & MapETA to separate files (#28976) 2023-07-20 21:58:46 +01:00
Shane Smiskol
5b368a67ea 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?
2023-07-20 04:01:55 -07:00
Mitchell Goff
ba03e94290 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>
2023-07-20 00:54:42 -07:00
Shane Smiskol
358a86b636 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
2023-07-17 21:28:10 -07:00
Dean Lee
ccfca97dfc ui/map: cache navigation images at startup (#28783)
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2023-07-14 20:18:49 +01:00
Dean Lee
ae4a375dd6 ui/map: handle & display error in MapWindow (#28854) 2023-07-13 10:26:58 +01:00
Cameron Clough
6643616c47 nav: hide settings on map request visible (#28884) 2023-07-11 21:40:33 +01:00
Dean Lee
e1ea1d58e4 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
2023-07-09 21:27:24 +01:00
Dean Lee
7a42e51c90 ui/map: use overlay widget to simplify code and improve rendering performance (#28800)
* move widgets into overlay

* adjust margin

* add spacing
2023-07-09 16:03:51 +01:00
Dean Lee
060490bdf1 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
2023-07-09 11:54:29 +01:00
Jason Young
e816c81a5a nav ui: restore speed-adaptive map zoom level (#28796)
Revert "map: fix repeated call to m_map->setZoom (#25784)"

This reverts commit f0665911b2.
2023-07-05 15:45:32 -07:00
Harald Schäfer
85c4b1a400 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
2023-06-27 19:09:45 -07:00
Cameron Clough
bc5a899024 UI: improved nav destination entry (#28476) 2023-06-22 19:57:29 +01:00
Kurt Nistelberger
2b611862be match style 2023-01-07 17:56:16 -08:00
Kurt Nistelberger
b6440304d5 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>
2023-01-07 17:53:14 -08:00
Dean Lee
f0665911b2 map: fix repeated call to m_map->setZoom (#25784)
Fix repeated map api calls
2022-09-15 20:36:13 -07:00
Willem Melching
a9401319df 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
2022-07-08 09:20:36 -07:00
Shane Smiskol
fb4b4773a5 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
2022-05-27 15:35:09 -07:00
Adeeb Shihadeh
cb8885cffb Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
2022-05-18 14:11:57 -07:00
Willem Melching
5069852573 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
2021-11-26 14:38:02 +01:00
eFini
52c4ab73a9 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>
2021-11-18 14:14:41 +01:00
Willem Melching
9f423a93cd nav: fix receiving navRoute while map is loading (#22929) 2021-11-16 14:27:38 +01:00
Willem Melching
bef686f275 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
2021-11-04 14:32:32 +01:00
Willem Melching
0ba40954b9 maps: allow using MAPBOX_TOKEN env variable (#22721) 2021-10-28 16:13:44 +02:00
Willem Melching
cca07c0c73 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
2021-10-26 18:59:17 +02:00
Willem Melching
f9f43578d1 Nav: only open map once (#21650) 2021-07-19 12:23:01 +02:00
Adeeb Shihadeh
86c255e3e8 nav: restore zoom and position on double click (#21551) 2021-07-11 00:32:11 -07:00
Willem Melching
9ea913bcc8 nav: various cleanup (#21521)
* nav: various cleanup

* eta resize instant

* show
2021-07-08 14:33:58 +02:00
Willem Melching
f32ca73724 nav: simplify segment transition (#21383) 2021-06-23 15:00:32 +02:00
Willem Melching
7e6a9ce9a5 nav: cleanup errors and wait for map to be loaded (#21381)
* Cleanup errors

* prevent flicker
2021-06-23 14:33:27 +02:00
Willem Melching
a3b155839b Nav: ETA layout improvements (#21361)
* bold and more space

* rounded corners

* oneline

* center

* fix am/pm

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

* optional
2021-06-21 15:50:23 +02:00
Willem Melching
43151389e7 nav: expand banner at correct distance from maneuver 2021-06-10 12:31:47 +02:00
Willem Melching
3c197953bc nav: add page to settings (#21208)
* add navigation panel to settings

* am/pm display and dynamic width
2021-06-10 09:59:34 +02:00
Willem Melching
561f3b3191 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
2021-06-08 16:48:20 +02:00
Willem Melching
41c96c99c7 nav: add current bearing to route request (#21186) 2021-06-08 16:00:31 +02:00
Willem Melching
21be443499 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
2021-06-07 12:14:08 +02:00
Willem Melching
14f09e4ee1 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
2021-06-04 13:45:42 +02:00
Willem Melching
86aefbe766 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>
2021-05-17 14:57:07 +02:00