Commit Graph

104 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
Shane Smiskol
13dc0325b2 ui/map: hide settings with showing map (#29127)
consistent map showing behavior
2023-07-24 18:25:46 -07:00
Shane Smiskol
d70c4916db 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
2023-07-20 22:40:31 -07:00
Shane Smiskol
e4dc86f44d ui: set global map transition duration (#29061)
* this works!

* revert properties

* more clean up

* more

* more

* add comment

* final
2023-07-20 16:11:23 -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
Shane Smiskol
d0ea8be95f nav: set icon anchor for destination pin (#29054)
* anchor!

* whoops

* fix anchor
2023-07-20 01:28:21 -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
7a673c87ff 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
2023-07-18 15:52:59 -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
53934c7fee ui/map: fix wrong remaining time (#28960) 2023-07-15 13:28:21 +01: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
Shane Smiskol
c158537df6 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
2023-07-11 19:04:41 -07:00
Shane Smiskol
34a5e626d6 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
2023-07-11 14:49:19 -07:00
Cameron Clough
6643616c47 nav: hide settings on map request visible (#28884) 2023-07-11 21:40:33 +01:00
Dean Lee
4544b40b70 ui/map: don't clear eta when map is hidden (#28878) 2023-07-11 10:23:45 +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
Dean Lee
5991aea10a 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
2023-07-05 15:00:33 -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
a2b7d2c867 update mapbox style (#28638)
updated map components and dataset
2023-06-22 22:10:42 +01:00
Cameron Clough
bc5a899024 UI: improved nav destination entry (#28476) 2023-06-22 19:57:29 +01:00
Harald Schäfer
d75ee19def Only trust locationd for nav (#27579)
* Only trust locationd for nav

* unused var
2023-03-14 09:25:09 -07:00
Harald Schäfer
4c33d94d3f 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
2023-01-14 16:56:14 -08: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
Dean Lee
69e9b285b3 UI/map: remove redundant QString ctor (#25704) 2022-09-08 15:53:23 -07:00
eFini
1de8ad891b Fix is_rhd param name in map.cc (#25464) 2022-08-17 20:21:38 -07:00
Adeeb Shihadeh
ac305dacef nav: same icon size for active & inactive lanes (#25383)
* nav: same icon size for active & inactive lanes

* update translations
2022-08-08 15:07:44 -07:00
Willem Melching
49dd56fc24 nav: draw inactive lanes with 50% opacity (#25157)
* nav: draw inactive lanes with 50% opacity

* update ts
2022-07-13 17:58:45 +02:00
Shane Smiskol
cbff8fcbd0 Nav: wrap strings (#25089)
* Wrap nav strings and translate

* Update QM

* Update QM
2022-07-08 21:17:00 -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
9307fe434c map.cc: fix crash on older route with missing liveLocationKalman values 2022-05-04 11:37:31 +02:00
Willem Melching
bff0db566b ui: only open map pane when route is not empty (#24352) 2022-04-28 14:51:02 +02:00
Dean Lee
75687169eb qt/util: new function scaledPixmap (#23103)
* new function scaledPixmap

* rename to loadpixmap
2021-12-14 22:58:47 -08:00
Dean Lee
2483fc5d5d ui: singleton uistate (#22789)
* singleton uistate

* merge master

* merge master

* merge master

* connect uistate in sidebar

* move to device
2021-12-14 22:28:12 -08:00
Willem Melching
790a64af90 nav: open map on new route without valid OpenGL context (#23140) 2021-12-06 13:50:42 +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
5648b22833 nav: render at 20fps instead of 10fps 2021-11-17 12:26:17 +01:00
Willem Melching
9f423a93cd nav: fix receiving navRoute while map is loading (#22929) 2021-11-16 14:27:38 +01:00
Willem Melching
306df7f94f nav: check valid flag on PositionGeodetic measurement (#22858) 2021-11-11 10:24:10 +01:00
Dean Lee
e29cc1c2ee util.h: add unit conversion constants (#22813)
* Add unit conversion constants.

* move to common/util.h
2021-11-08 10:19:34 +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
Mayfield
5246f0231e enable wshadow (#22756)
* enable wshadow (#22714)

* fix replay

* more build fixes

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-02 17:08:53 +01:00