Commit Graph

33 Commits

Author SHA1 Message Date
Dean Lee
b4f7e76531 ui/util: add a helper class ParamWatcher (#28978)
* new class ParamWatcher

* Update selfdrive/ui/qt/util.cc

* Update selfdrive/ui/qt/util.h

* Update selfdrive/ui/qt/util.cc

* Update selfdrive/ui/qt/util.cc

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-07-16 13:17:16 -07:00
Shane Smiskol
936bfcd7ba ui: use stencil buffer to draw polygons (#28902)
* Update ui.cc

* add a bunch of debugging stuff i don't want to lose

* Revert "add a bunch of debugging stuff i don't want to lose"

This reverts commit 2de6ab5b68bc528e913db68f7fe576b6ebe89a9b.

* enable stencil buffer

* lower ui CPU usage

* Revert "lower ui CPU usage"

This reverts commit 650241c0d89c1476de3995f1dc3f87f671dd1dd7.
2023-07-13 20:38:49 -07:00
Dean Lee
219590885f ui: remove function configFont. use struct InterFont (#28773) 2023-07-06 12:17:56 +02:00
Dean Lee
5493cb4289 ui/settings: allow driving personality without CarParams (#28753)
* allow driving personality without CarParams

* rename to hasLongitudinalControl

* Update selfdrive/ui/qt/util.cc

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-06-30 13:45:58 -07:00
Dean Lee
7ac22a0d7a ui/sidebar: Fix the inconsistent padding in different languages. (#28746)
cleanup
2023-06-30 13:40:28 -07:00
Willem Melching
7a31bd12af qt/util.c: clearLayout, support QFormLayout (#28105) 2023-05-04 10:59:37 -07:00
Willem Melching
475903e244 cabana: enable Hi-DPI support on MacOS (#27965) 2023-04-19 10:48:36 -07:00
Dean Lee
c21d9408a1 cabana: use bootstrap icons (#26981)
* use bootstrap icons

* typo

* build into asset_obj

* add to files_common
2023-01-18 13:19:23 -08:00
Adeeb Shihadeh
4639862bae UI: show git commit date (#26240)
* show version description while offroad

* ui fixups

* parse date

* cleanup
2022-10-25 15:21:43 -07:00
Dean Lee
3bb2b4df49 getTextRect: pass text by const reference (#25555) 2022-08-25 13:13:38 -07:00
Adeeb Shihadeh
2cff05be43 UI: exit gracefully (#25388)
* UI: exit gracefully

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
2022-08-07 18:41:54 -07:00
Shane Smiskol
ecba873208 Multilang: handle localized plurals (#25337)
* Add localized plural handling

* Do another location with plurals

* fix test
2022-08-02 12:44:21 -07:00
Shane Smiskol
949de4d2b6 UI: Internationalization support (#21212)
* 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

* update names

* Add Chinese (Simplified) translations

* Do missing French translations

* unit tests caught that :)

* fix test

* fix other test (on PC)

* add entries to dialog to test

* add cancel button, clean up a bit

* just chinese

* some clean up

* use quotes

* clean up

* Just quit, set timeout to 0

* half a second

* use exitcode

* don't print if it's expected

* this comment is outdated

* update translations

* Update translations

* re-order input classes

* Update line numbers

* use enabled property for button style

* Get rid of ListWidget

* Update line numbers

* Log failed to load language

* Log failed to load language

* Move to utils and fix english logging

extra line

* Update translations

* spacing

* looks a bit better

* try this instead of exitcode

fixes

fix

* only one function

* comment

* Update line numbers

* fixup some japanese translations

* clean up multi option dialog

* Update line numbers
2022-07-08 20:25:54 -07:00
Dean Lee
8d53e2c2b4 Multilang: remove redundant QString() around tr() (#25003)
remove qstring
2022-06-30 10:55:49 +02:00
Shane Smiskol
879a7c3201 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
2022-06-29 14:47:46 -07:00
Lee Jong Mun
4172191723 selfdrive/ui/qt/util.cc: missing include (#24867) 2022-06-15 17:35:46 +02:00
Willem Melching
d528cd5568 UI: new set speed design, show speed limits (#24736)
* basic US design

* place based on center position

* fix typo

* eu sign without rounded box

* same as steering wheel icon

* proper rounded bottom for eu sign

* add border

* proper placement/sizes

* needs to be semi bold

* color changes

* only when engaged

* move helpers into util.h

* Fix MAX placement

* only change color when at least 5 over

* implement override state

* pixel perfect spacing around us sign
2022-06-15 13:06:46 +02:00
Adeeb Shihadeh
1139fe507b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
2022-06-11 16:38:24 -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
Adeeb Shihadeh
5c48e7bc86 remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
2022-04-18 17:55:23 -07:00
Willem Melching
ca8d4e417e MacOS: ensure 1:1 rendering on HiDPI screens (#23860) 2022-02-25 14:36:27 +01: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
d4b8cba0f6 move LayoutWidget,ClickableWidget to controls (#23207) 2021-12-14 11:00:01 +01:00
Dean Lee
20f571db3c UI: move rest of NVG to Qt (#23133)
* move ui_draw_world to qt

* draw world if world_objects_visible is true

* cleanup

* cleanup includes

* continue

* cleanup

* cleanup

* enable  multisampling on all devices
2021-12-06 14:02:39 -08:00
Cameron Clough
140c7f430c api: send User-Agent on network requests (#22965)
* api: set User-Agent on network requests

The format of the User-Agent header matches the format in `common/api/__init__.py`.

Closes #22954.

* Update selfdrive/ui/qt/util.cc

* fix parentheses

* refactor into function

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-18 15:53:21 +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
Dean Lee
e573985c10 swagLogMessageHandler: replace magic number with macro (#21944) 2021-08-17 17:51:13 +02:00
Willem Melching
d1fb979962 ui: remove cache from getDongleId() 2021-08-02 11:29:39 +02:00
Dean Lee
073b96e5d1 qt/util: new function getDongleId (#21810)
* new function getDongleId

* return std::optional
2021-08-02 11:21:51 +02:00
Dean Lee
b7f8c6ad03 qt/spinner: reduce CPU usage from 17% to 12% (#21495)
* faster spinner

* initApp

* no brightness

* Update selfdrive/ui/qt/util.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-07-07 21:19:56 -07:00
Willem Melching
54b6a9f121 Qt logging through cloudlog (#21452)
* Qt logging through cloudlog

* sort imports

* rename to swaLogMessageHandler

* move to util

* info is high enough

* smaller diff
2021-07-02 14:01:59 +02:00
Dean Lee
f90a3eeb20 qt/util.h: move implementation to source file (#21412)
* Move implementation to source file

* space

* include the headers

* mv all to cc

* space
2021-06-29 14:05:37 -07:00
Willem Melching
9f98a3e44f nav: show recents (#21405)
* add recent buttons

* remove static request

* layout

* recent doesn't have to be a favorite

* work

* spacing

* spacing

* no recents

* query next

* not null

* this needs to live here

* less spacing between items
2021-06-25 16:26:02 +02:00