Commit Graph

764 Commits

Author SHA1 Message Date
Dean Lee 8ca0e9b941 Display the current language in MultiOptionDialog (#25098)
* check the selected language in lange select dialog

* disable if user selects current option

* update line numbers

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: eb17291ca13035b40d653da107653d4420517aaa
2022-07-09 01:47:10 -07:00
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
Shane Smiskol 23de7b166e 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
old-commit-hash: 949de4d2b6b293d9f77d83c58212f5dee176cbf1
2022-07-08 20:25:54 -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
Adeeb Shihadeh 7e10f872cf UI: fix reset calibration description
old-commit-hash: ff3f6de149475ce995c21f8308da0bbc08922c54
2022-07-07 16:53:34 -07:00
Dean Lee 92da40952f UI: fix unable to scroll on 'Regulatory' page (#25014)
* fix unable to scroll on 'Regulatory' page

deleteLater after hide

* remove alert

* override exec

* set MousePressEventDelay to 0

* set to 0.01

* cleanup

* check event->pos()
old-commit-hash: dc3d94d662654a6bb2bf40560c2a17ed2303fa80
2022-07-07 15:01:02 -07:00
Shane Smiskol 79c27c0ec2 Add Chinese (traditional) translations (#25064)
* Add Chinese translations

* wrap these

* add to languages.json

* fix tests

* use tmp dir for tests (doesn't change translation files in git repo)

* defaultdict not used

* update main_zh.ts (test outdated QM file)

* test outdated QM file (prev commit tests missing)

* update qm file

* add sidebar translations

* no need for function
old-commit-hash: bd2ea158977f5c26658bed8ac683b72c2c592d06
2022-07-07 14:19:30 -07:00
Willem Melching 5751d166bb onroad.cc: fix mutcd sign width for metric speed limit
old-commit-hash: a3a9a0685c63ea57dc936e496cd5e6be5a71512e
2022-07-07 12:02:31 +02:00
Dean Lee da42de3d6a settings.cc: remove function network_panel (#25030)
remove function network_panel
old-commit-hash: 5f794fe49a1e0f2849e6a979c7bd12ca5ddb060a
2022-07-04 13:55:00 +02:00
Willem Melching 917ea653e9 cameraview.cc: qInfo -> qDebug
old-commit-hash: ca800da8951f83892a3593b2203e74be6af53844
2022-06-30 14:25:32 +02:00
Willem Melching bfcd08324c cameraview.cc: prev_frame_id static -> class member
old-commit-hash: af7d3c115a4780ad734c3f3a8d0084dd506aefec
2022-06-30 14:22:55 +02:00
Dean Lee 98046a880e ui: replace line_vertices_data with QPolygonF (#25001)
use QPolygonF

use push_front
old-commit-hash: 867a1cf35a200c10c9ea513140b74be04ce4bb83
2022-06-30 10:57:47 +02:00
Dean Lee 65e6ba763e Multilang: remove redundant QString() around tr() (#25003)
remove qstring
old-commit-hash: 8d53e2c2b4e549119538d1baf36d202dbe33d012
2022-06-30 10:55:49 +02: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
Willem Melching 403266fdb1 ui: disable sync with model until more stable (#24984)
old-commit-hash: 338df150d5112d4c6772edb797cb45370fdc3599
2022-06-28 15:48:57 +02:00
Shane Smiskol 0c32c661eb onroad UI: fix onroad double tap (#24982)
* The default implementation calls mousePressEvent().

* no sidebar when entering body

* wrong one

* you can't double tap with body anyway (fixes inconsistencies with prime vs not prime)

* hide sidebar
old-commit-hash: 3a2bcc092c74925edb161959cdcc66073a9cd8f3
2022-06-28 01:08:11 -07:00
Willem Melching c88c78a13b ui: use current calibration to center vanishing point (#24955)
* compute x and y offsets using calibration

* fix default calibration

* clamp to max values

* only use when valid

* not while calibrating

* less diff

* cleanup zoom
old-commit-hash: 915b4928ff044302bba0e8bdf15f154646f528e6
2022-06-27 16:03:26 +02:00
Willem Melching d3d90ef5d2 remove Open Sans fonts from assets (#24946)
old-commit-hash: 1908b89e29a968a3f1b8dd8cdd8213570e02c186
2022-06-22 20:41:24 +02:00
Willem Melching 53c8d96240 ui: change set speed, speed limit and current speed to Inter (#24932)
* ui: change set speed/speed limit to Inter

* switch current speed to Inter
old-commit-hash: 05e7ce731f4259a569f5d28392a0d576e90dec1b
2022-06-22 11:46:16 +02:00
Willem Melching e9677da2d4 ui: change sidebar font to Inter (#24931)
* change sidebar to inter

* clean up metric color rect radius

* fix text placement

* simplify rect placement
old-commit-hash: 963de402115a4eb8eb7944c5f5233e47dea31543
2022-06-22 11:46:00 +02:00
Willem Melching f22b124acf ui: change alerts to Inter (#24937)
* ui: change alerts to Inter

* fix up test
old-commit-hash: 88f246b909e3e111ac84e964bb811efefd923163
2022-06-22 11:45:38 +02:00
Willem Melching e55211359a ui: draw MAX above set speed (#24930)
old-commit-hash: 278f7b9e8a54839989d6a5bd8d37d6aeca789d2a
2022-06-21 13:15:26 +02:00
Willem Melching 3185d904bb ui: metric wider set speed box (#24890)
old-commit-hash: f7205f3b07d15ff4e9d840a689792d7f5b5be0d8
2022-06-21 11:14:25 +02:00
ZwX1616 cd2a98aa11 fullframe DM model (#24860)
* Revert "put cereal on master"

This reverts commit 4646c132bae7358079c9b2867725f8382906c1e5.

* Revert "Revert fullframe DM model (#24812)"

This reverts commit 59e8af4c3101785cead69a9880cc03e0a18081e1.

* revert revert cereal

* clip6

* 0.8 is fair

* Fiction compensation should be based on error

* Update refs

* Add deadzone

* not that

* good mg

* ref

* ref

* ee8f

* minor tweak

* ref

* recompile

* ref

* cereal

* match driverstatus

* new ref

* new ref

* pass token through jenkins credentials

* quote

* fix snpe dead weights

* final ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 1f2f9ea9c9dc37bdea9c6e32e4cb8f88ea0a34bf
2022-06-20 16:24:51 -07:00
Willem Melching 387314217b ui: onroad widget check if sockets alive (#24913)
* ui: onroad widget check if socket alive

* cleanup
old-commit-hash: 8270c1c1a3584c1244f12143fc1314cdbbb05541
2022-06-20 19:14:43 +02:00
Adeeb Shihadeh d9d83b0225 Move camerad to system/ (#24836)
* mv camerad

* add hardware symlink

* fix unit tests
old-commit-hash: 6123ab3d1c901ed3763e1a7cb8e1aac3f6b8fda3
2022-06-19 14:43:49 -07:00
Willem Melching b7b1c77fc2 ui: show empty box when speed limit is unavailable during nav (#24891)
* ui: show empty box when speed limit is unavailable during nav

* variant 2, long -
old-commit-hash: 33eaebfab2387ed92ef3fc69e3c610f27ee3db67
2022-06-17 19:47:37 +02:00
Lee Jong Mun 0ff374975e selfdrive/ui/qt/util.cc: missing include (#24867)
old-commit-hash: 41721917239e8eac314a2dc6c64cfb4695ff460e
2022-06-15 17:35:46 +02:00
Willem Melching 05e1412dd0 networking.cc: remove resolved TODO
old-commit-hash: bb02c1c5158b3403e7d2395611d2db1ab44aed5e
2022-06-15 16:19:04 +02:00
Lee Jong Mun bcca0281df ui: advanced network settings fix button colors and sizes (#24846)
* ui: button pressed color add

* match colors from other buttons

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: d2400150e51833678f8c216c0c605111cfa13018
2022-06-15 16:16:18 +02:00
Lee Jong Mun 35272ee466 ui: add black color define (#24866)
old-commit-hash: 849ec17b20f8cae7f6fd6589456d7b00b07e794b
2022-06-15 16:10:56 +02:00
Willem Melching 98742302c1 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
old-commit-hash: d528cd556848404891e28b3342d146498e3991cc
2022-06-15 13:06:46 +02:00
Joost Wooning 38f6e2726b ui: skip texture frame copy (#24700)
* ui_blit working

* simpler and working

* more believable that it's real

* working on device

* build on pc

* use hardware pc

* reduce cpu usage

* yuv conversion to EGL

* move everything to cameraview

* some cleanup

* more cleanup

* init array

* init images with std::map

* dont destroy images

* do destroy images

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1221aef233180a7d290ff813d2e2e53dbf87d586
2022-06-13 12:27:47 +02: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
ZwX1616 c73d4e5fc6 Revert fullframe DM model (#24812)
* Revert "fullframe DM: flip RHD yaw to use matching thresholds"

This reverts commit ce7daabc8847d18ba46e5d1879f5a6958d04ccc7.

* Revert "fullframe DM model (#24762)"

This reverts commit 817be81fb19004f4873881f6b29dcdfffbe7e3a8.

* revert cereal
old-commit-hash: c646eeee0ac54925db5afc51b95c5d869d6dba68
2022-06-10 16:16:46 -07:00
Adeeb Shihadeh c38766b061 Revert "UI: remove DM icon (#24771)"
This reverts commit f7f2bb2a1e70e0946edb362b70ed42e496f77f91.

old-commit-hash: 86ce2f8d4def65d3adb1136b24b75700e953a62f
2022-06-09 17:39:39 -07:00
ZwX1616 02f0f39b52 fullframe DM model (#24762)
* get log

* simplify two nonsense

* not needed

* libyuv is a joke

* clean up

* try small

* fast but not bad

* working

* clean up driverview

* simplified

* thats mirrored

* smol

* tweak

* ref is screen

* w/ ee

* update camera model

* no if TICI

* start

* update pose thresh

* less cpu more dsp

* new libyuv

* new snpe

* add files

* test

* should be fast

* update out len

* trigger test

* use master snpe

* add cereal

* update cereal

* refactor parsing

* missing ;

* get

* wrong type

* test model

* use driver data

* 10829278-72fe-4283-a118-2cef959ce174/1550

* no pf

* adapt driverview

* ;

* rhd learner

* update libyuv buildi x64

* ad4337ea

* remove blink slack

* test

* no

* use toggle

* b16

* fix for nv12

* 5b02cff5 both

* update test

* update cereal

* update cereal

* update cereal

* v2 packets

* revert libyuv

* no /

* update snpemodel

* ;

* memcpy

* fix test

* use toggle in driverview

* update power

* update replay

* Revert "update replay"

This reverts commit 1d0979ca59dbc89bc5890656e9501e83f0556d50.

* update model ref

* halve cpu

* fake 8bit onnx runner

* same thresh as report

* cereal master

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d6c07a6b158595c1ab10256dc6eee4fbdf902379
2022-06-08 20:13:46 -07:00
Adeeb Shihadeh d25c537b8b UI: remove DM icon (#24771)
old-commit-hash: 4d836c6edd6e0f2639a3e2500794990da339eddc
2022-06-07 13:59:48 -07:00
Jason Young 1f5667285b ui: fix prime ad storage duration (#24756)
fix ui prime ad storage duration
old-commit-hash: 7e5eec2e4fe826a79386ae89fb2ddfeb6e59f93b
2022-06-06 14:03:34 -07:00
Adeeb Shihadeh 59a58cd15f UI: don't disable toggles onroad
old-commit-hash: d3af76842c82c3f5bc19be7623264c739b21c740
2022-06-03 14:34:16 -07:00
HaraldSchafer 08ad733229 Remove laneless toggle (#24738)
* Remove laneless toggle

* Update refs
old-commit-hash: 7f16e19f791d9f709b40e2ef9781b88eb930aa98
2022-06-03 14:04:14 -07:00
Willem Melching 753045c73d less TICI when not needed (#24698)
* less TICI when not needed

* fix process replay

* move reading voltages into hw abstraction layer

* Update selfdrive/hardware/tici/hardware.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/hardware/hw.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/hardware/base.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* rename init function

* Update selfdrive/athena/athenad.py

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

* Update selfdrive/boardd/boardd.cc

* Apply suggestions from code review

* Update selfdrive/thermald/thermald.py

* update ref

* fix alert width if all cameras are bad

* add ecam to test_loggerd

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
old-commit-hash: f49a9c9fd2100a4f1401a93d88064ddbbbd935c1
2022-06-02 15:20:51 +02:00
George Hotz 2a6ffaf71d nv12: encoderd avoids a full frame copy (#24519)
* rgb to nv12

* nv12 works (w memcpy)

* correct now

* no copy

* fix nv12 with fast debayer

* reverts of unused stuff

* ui use nv12

* comment out thumbnails for now

* rebase fix

* dm read nv12

* model read nv12

* fix ffmpeg encoder

* thumbnails from nv12

* replay to nv12

* python framereader support nv12

* remove hardcoded frame/buffer sizes

* fix build

* ffmpeg encoder fix buffers

* small cleanup

* reduce power usage test

* fix cpu usage test

* fix snapshot

* fix loggerd test

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com>
old-commit-hash: ea5b8cdfb10686c972d8d2bc1778e6e6567e45a9
2022-06-01 17:18:28 +02:00
Gijs Koning 6a53db981b Simulator: Speed up process by removing second camera (#24679)
* simulator: support running wide camera only

* proper frame id

* use param name that makes more sense

* do some cleanup

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b5aed2bf6781cd4d74d28f6f44d24737ec08f0db
2022-05-30 15:25:07 +02: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 402a0800dd athena: remove redirect detection for old prime (#24662)
This worked on old magenta, but doesn't work on new magenta
or blue prime.
old-commit-hash: e38b93fc31f3ff89a3806675bc090c2149434cf7
2022-05-26 16:09:22 -07:00
Shane Smiskol 8d83408ace UI: draw camera on same frame from modelV2 (#24335)
* draw camera on same frame from modelV2

* fix reversing

* optimze

* sleep shorter

* heavy debugging

* clean up

* fix ui hang

* try this

* more generic implementation

* add unused flag back

* draw latest frames when camerad is coming up with no modeld

* only get modelV2 once

* fix drawing

* conflate, reduce buffer, and remove special case when starting

* make tests pass

* remove comments

* frame_id is a uint32_t

* not sure why passing to cameraview causes overflow

* ternary, not too complicated

* change to size

* rename to frame

* use unique_ptr

* Revert "use unique_ptr"

This reverts commit 955842d9511a26468d4deedd1807f096540cb40c.

* Assert buffer size

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* use one deque with pairs and uint32_t

* formatting

* frame offset

* Revert "frame offset"

This reverts commit a2cff8a2d57a02f314d9f6adb7221b193a150e4c.

* use array

* add prints

* Revert "add prints"

This reverts commit d6978746e5c316fb2d5a619091c9aaf849c31967.

* clean up

* this handles all cases

* we want to clip

* fixes going backwards when replay or modeld lags multiple frames, then skips multiple frames

fixes going backwards when replay or modeld lags multiple frames, then skips multiple frames

* fix rare case where camera is behind model

simpler comment

* draw latest frames if we start with no model, then hang on current frame until model catches up

fix

* store if it's updated

* accurate comment

* reset to latest on connect and showevent

* better order

* use quint32 for sending signal function

* use empty

* draft

* kinda works

* works

* one line

* debug

* clean up

* revert this

* to preserve behavior, think we need to poll these

* revert

* no timeout when modeld is not alive

* Update selfdrive/ui/qt/onroad.cc

* changes from other PR

* see if we're drawing dup model or camera frames

* looks good, just need to clean up

* debug

* clean up

* clean up

* revert these changes

* fix

* pretty simple, test on device

* clean up

* revert this

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c10a2ef2e40a49b527ab49b8b7fd4e924b847a2d
2022-05-24 17:08:06 -07:00
Adeeb Shihadeh dea5b1fbe0 define new prime types
old-commit-hash: ab7c653cc59c0935495ca359d30d5f87fbdaf69e
2022-05-18 18:50:42 -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