Commit Graph

92 Commits

Author SHA1 Message Date
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 2c5e890a23 UI: wrap all text for translation (#24961)
* rough multiple language demo

* more wrappings

* stash

* add some bad translations

* updates

* map from french to spanish still has same problem of needing to call setText on everything

* add files

* restart UI

* use return code

* relative path

* more translations

* don't loop restart

* Toggle and prime translations

* try on device

* try QComboBox with readable style

* stash

* not yet scrollable

* stash

* dynamic translations (doesn't work for dynamic widget strings yet)

* clean up multiple option selector

* store languages in json

* try transparent

* Try transparent popup

* see how this looks

* tweaks

* clean up

* clean up

* clean up 2 and missing tr

* wrap more strings

* missing updater

* fixes

* add basic test to ensure all strings wrapped

* try in CI

* clean up

* test name

* fix test

* always install qt dev tools

* fix deps

* fast test

* add section so it prints multiple errors

* debug

* debug

get rid of those

* make any difference?

* comment

* oh...

* run with offscreen platform

* try out section

* clean up

* fix missing wrappings (it works!)

* move down

* space

* clear relevant params, set TICI=1
old-commit-hash: 879a7c3201a037c27c92ad6b92143114f52f29d3
2022-06-29 14:47:46 -07:00
Adeeb Shihadeh 9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b01f34de9714c99228f411558b44231
2022-06-11 16:38:24 -07:00
Willem Melching 2c343d2fe3 navd: rewrite in python (#24621)
* navd: start python rewrite

* use enum

* send empty instruction packet

* parse banner

* cleanup

* switch to coordinate class

* add segment transition logic

* add recompute logic

* cleanup old navd code

* split out helpers

* cleanup release files

* fix typo

* fix docs

* add typing to helpers

* small fixes

* move outside of ui

* get last pos from param

* add ui restart detection

* check running

* send route

* set navInstruction to invalid with no active route

* whitespace

* do not overwrite response and use ratekeeper

* reuse params object

* remove navd exception
old-commit-hash: e72d6b5689dd95f5fd7a6558c72c2e02b37f8b12
2022-05-30 15:15:51 +02: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
Willem Melching 0817a5aaef ui: only open map pane when route is not empty (#24352)
old-commit-hash: bff0db566bfc20a8f2ab936646c67be22b9ade76
2022-04-28 14:51:02 +02:00
Willem Melching 3de449a993 nav: set settings stack based on uiState.prime_type (#23770)
* nav: set settings stack based on uiState.prime_type

* also show on success
old-commit-hash: f8c81103fc1dc98b0403a89c549947a9777f87ce
2022-02-15 16:39:10 +01:00
Willem Melching 06add8928d nav: handle route responses with duplicate points (#23769)
old-commit-hash: 14f7a7825151ab55975a24f53e4178fb7a595bea
2022-02-15 16:14:57 +01:00
Dean Lee f0eb7a5402 qt/util: new function scaledPixmap (#23103)
* new function scaledPixmap

* rename to loadpixmap
old-commit-hash: 75687169eb978a7a49f15fb086df87cc959a871a
2021-12-14 22:58:47 -08:00
Dean Lee 1fc1819c2b ui: singleton uistate (#22789)
* singleton uistate

* merge master

* merge master

* merge master

* connect uistate in sidebar

* move to device
old-commit-hash: 2483fc5d5dd7ad586a92b62b2ef5bc8f9094f262
2021-12-14 22:28:12 -08:00
Willem Melching e59fb59785 nav: open map on new route without valid OpenGL context (#23140)
old-commit-hash: 790a64af907331ee4ae9ae6fea388e4bba3bf5b0
2021-12-06 13:50:42 +01:00
Dean Lee 67c748d62a refactor httprequest: emit single signals (#23039)
* refactor httprequest

* Trigger Build
old-commit-hash: 3fd02649601856b2780168d36c49940ff49f4de2
2021-11-29 11:19:08 +01: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 a25637897b nav: render at 20fps instead of 10fps
old-commit-hash: 5648b22833c4ec5eaa1b76af3018f856f6cfaf6f
2021-11-17 12:26:17 +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 8797c043bd nav: check valid flag on PositionGeodetic measurement (#22858)
old-commit-hash: 306df7f94f2fb57076a5883339d960b79a37b26a
2021-11-11 10:24:10 +01:00
Dean Lee 6e027a8aa6 util.h: add unit conversion constants (#22813)
* Add unit conversion constants.

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

* fix replay

* more build fixes

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 5246f0231e6bfa572c0dd89c60e538910817faa2
2021-11-02 17:08:53 +01:00
Willem Melching 82ebe9f0ee nav: support multiple banners in route segment (#22722)
old-commit-hash: d4433cc2d8363ad30ceec62fb80e333ec09f39b7
2021-10-28 19:11:29 +02: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
lipniak 69fb512da8 UI: add missing header to fix Ubuntu 21 build (#22577)
Co-authored-by: predicate@bonzo <noreply@example.com>
old-commit-hash: df9492d1e118aa610d355a7220fdeaeef46efdc1
2021-10-16 13:30:14 -07:00
Adeeb Shihadeh 361ee0e83c UI: auto wide detection on PC (#22392)
* UI: auto wide detection on PC

* invert width

* cleanup
old-commit-hash: 23ae67bbf95fd95e9a092ca19bd3391a2f16f453
2021-09-30 20:48:02 -07:00
Adeeb Shihadeh 706542a7b2 nav: add button to clear current route (#22167)
* nav: add button to clear current route

* fix scroll

* retab

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d5475ba9462ad9c6a18db05e96a4fa9d3bf9772a
2021-09-07 17:39:24 -07:00
Adeeb Shihadeh b3f5ad454e nav: set map widget parent
old-commit-hash: d5face26a82b717ce694aa848641b879076dfe1f
2021-09-06 22:51:09 -07:00
Willem Melching 9373ea74be map fixes, #22105 (#22152)
old-commit-hash: 576459ca4595e5baaf7db23a8873a9fb0bddd272
2021-09-06 16:53:09 -07:00
Willem Melching 10447b6d04 nav: do not transition to next segment if we need to recompute
old-commit-hash: 512ab3d8fbee97ef3cfb2dcd0773c0dca2de8656
2021-08-12 19:50:14 +02:00
HaraldSchafer 3eb667e29d Fix orientation in map (#21863)
* fix calibrated orientation

* update ref

* cleaner

* update ref

* master

* update again

* update ref again again

* actually compiled this tim,e
old-commit-hash: e0087fc313b4032532e3736a4be2b07510a0c9bf
2021-08-05 21:06:46 -07:00
Harald Schafer acd45c486b Revert "nav: use calibrated orientation (#21853)"
This reverts commit cd19b37a6b187e0c26cdfe7c42e975abb1dc0155.

old-commit-hash: e63d94d8d24975d308e17b7ce71fdb6b5529dac4
2021-08-04 10:41:49 -07:00
HaraldSchafer 1c35dc951d nav: use calibrated orientation (#21853)
* calibrate map

* msg added
old-commit-hash: 4b209f31a11546a3a56032558c656c2aa0b3175f
2021-08-04 09:58:04 -07:00
Dean Lee ceb40d8384 api: use API_HOST env variable everywhere (#21814)
* api base url to global constant

* update api/__init__.py
old-commit-hash: 543e019f715a7e485c7402d1e145dc8e81d43611
2021-08-03 13:49:49 +02:00
Dean Lee c40edd4b56 qt/util: new function getDongleId (#21810)
* new function getDongleId

* return std::optional
old-commit-hash: 073b96e5d16c4780ed4adfb50b506fa1afd40d68
2021-08-02 11:21:51 +02:00
Willem Melching 3267bd5c14 nav: Only recompute when onroad (#21797)
old-commit-hash: c09cff23aa0a69063edb168afcdb8e1212bb0e19
2021-07-30 12:13:51 +02:00
Willem Melching 380a3e1923 nav: Send DELETE to clear next destination on server (#21746)
old-commit-hash: 34bb5b935fd3c2bb481129cb4bc27ce646c24f12
2021-07-28 11:02:32 +02:00
Willem Melching 5dab3d577e nav: update favorites/recents while onroad
old-commit-hash: 94f85c615cff5177b29bbac8abb7da06af460d10
2021-07-27 14:46:38 +02:00
Willem Melching fe1eb7e99f nav: show error when route request fails
old-commit-hash: f6b7128741f01c383b31dbd7d3241f26f1e23070
2021-07-26 14:56:53 +02:00
Willem Melching 63a4bdf281 nav: double click reset pan/zoom timers
old-commit-hash: 34346c8525d81fbfb7b12ee9a5ae550a1472f156
2021-07-26 14:00:42 +02:00
Dean Lee ae1b7a85f3 Qt: draw border in OnroadWindow (#21594)
* draw border in OnroadAlerts

* non transparent

* no scissor

* set video_rect to the full size

* fix header gradient

* Revert "fix header gradient"

This reverts commit f5565c19d5cabda22fe6b60af23dc26727ecd5bc.

* Revert "set video_rect to the full size"

This reverts commit c012db105a8cabd140971208431d83ae3592b70e.

* fix scissor

* fix header gradient

* set scissor box to video_rect when draw lines

* move up eta

* init alert_size to NONE

* remove glScissor

* cleanup

* rename draw_video_frame to draw_vision_frame

* remove space

* add comment

* move border to OnroadWindow

* cleanup signals

* fw declare MapWindow

* fix build err

* remove viz_rect

* fix build err

* continue

* cleanup

* text rect:no border

* use signals

* remove space

cleanup

* merge master

* fix map eta

* get bgColor from alerts

* update alerts in OnroadWindow

* add function clearAlert

* repaint border

* init bg color to STATUS_DISENGAGED

* no black frame

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: f0389f7e2d45f7f42e35bdea6a3daff0cd3aa919
2021-07-23 21:45:47 -07:00
Willem Melching 47a646ecb1 nav: show settings without token (#21624)
* map settings always in sidebar

* show screenshot when no prime

* remove print

* repaint to fix star sizing

* checked in sconsscript

* match designs
old-commit-hash: 190409c9387ade9bc988b6603ac6f41248e0a5fd
2021-07-19 14:18:01 +02:00
Willem Melching 40fe85f18e Nav: only open map once (#21650)
old-commit-hash: f9f43578d1b41f97b90f43215ca320bce72e114c
2021-07-19 12:23:01 +02:00
Willem Melching e3b454a804 nav: update style url
old-commit-hash: 0c3f25ff8597eb692b2d1a001934b83ceefc3fc5
2021-07-16 11:26:43 +02:00
Willem Melching 52ace7309a nav: force request retry
old-commit-hash: baa0e47e50e6c39c04cd374be1ac6db9eafb752b
2021-07-14 15:46:18 +02:00
Willem Melching 2417bac975 nav: cleanup settings page (#21561)
old-commit-hash: a148bcb3efdaf34e41ad8392f7656ad6c7662f8b
2021-07-12 13:44:30 +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
Adeeb Shihadeh c583cc99a3 nav: scroller for recents (#21549)
* nav: scroller for recents

* stretch

* one more stretch
old-commit-hash: bec054116f4eea51c3ed9db606076be4c460d5af
2021-07-10 22:56:18 -07:00