Commit Graph

56 Commits

Author SHA1 Message Date
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
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 7fce9f4fdf ui: disable controls unresponsive alert on PC
old-commit-hash: 2699bae778fa7d9a4d40cf169b1eb56c74cb22c8
2022-06-16 16:07:04 +02:00
HaraldSchafer 08ad733229 Remove laneless toggle (#24738)
* Remove laneless toggle

* Update refs
old-commit-hash: 7f16e19f791d9f709b40e2ef9781b88eb930aa98
2022-06-03 14:04:14 -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
Adeeb Shihadeh 5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86a621dd35f4ff25da7a26ee506bac76
2022-04-18 17:55:23 -07:00
Shane Smiskol 5f4ac6cb96 ui: grey border and alert when pre-enabling (#24057)
* make border and alert grey when overriding

revert cereal

* no state machine changes

* typo
old-commit-hash: 8e34ddc70e988e5ee142e0749c2e4cf5052237a0
2022-03-28 20:03:52 -07:00
Adeeb Shihadeh b695ffbfdb UI: fix power buttons disable logic (#23774)
old-commit-hash: 00d469dbc9d5ab8237247f7036892fe74c5e3c8a
2022-02-15 16:18:09 -08:00
Willem Melching 5d55924fac ui: fix onroad transition with active nav (#23757)
old-commit-hash: e76ef93a833396dba4e3478966f9b48894c08638
2022-02-14 13:55:30 +01:00
Willem Melching 30a0b40b5d ui: configure tethering based on prime type (#23733)
* Store prime type in param

* set tethering metric based on prime type

* update existing connections

* returning zero is fine

* always set

* add callback on activate

* call systemctl

* match server enum

* add delay

* assume field is there

* snake case
old-commit-hash: 4e4cb07297485eac378058c6b4e60901e10cbd15
2022-02-09 20:27:58 +01:00
Dean Lee fab73e6e9f remove trailing whitespaces (#23716)
old-commit-hash: 786152f0f125f9c78dc129cab8f24a98d93f36a1
2022-02-06 10:42:41 -08:00
Dean Lee 336d37e95c UI: run set_brightness in QtConcurrent (#23326)
* use QFuture

* update at 10 hz

* don't change frequency
old-commit-hash: cd9813ab6a160d7da2e86ce2bb6daa69e7e2adad
2022-01-04 14:03:27 +01:00
Dean Lee 2701743349 ui: emit offroadTransition in UIState::updateStatus (#23265)
old-commit-hash: 21ee6d25c7f84be810a6ed31cc2cf5aa94a89c11
2022-01-03 17:35:05 -08:00
Adeeb Shihadeh 487f8cdeaf UI: less harsh controls unresponsive when not engaged
old-commit-hash: 2d8578545ffdaa7c40527aaeb68819515f7f2039
2021-12-20 23:56:25 -08:00
Dean Lee 9321e1bb6c ui: remove variable world_objects_visible, use rcv_frame (#23264)
old-commit-hash: e4de82f90636a551a2490ccda1abc30a9b7f30b1
2021-12-17 21:37:29 -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
Dean Lee c031c1a8d4 UI: add timeout to close settings window while onroad (#22980)
* refactor updateWakefulness

* don't hide sidebar

* rename reset->reset_timeout

* move related variables and functions into class Device

* reset timeout in ctor

* set timeout to 10s if ignition is on

* cleanup

* remove unused QTimer *timer

* check getTimestamp

* keep socket reading in update_state

* keep filtering

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: c5dbee4e58aad2efca6d91baa4c7c4171ee8953f
2021-12-14 11:22:16 +01:00
Adeeb Shihadeh 2063ff2d71 UI: remove burn in prevention (#23173)
old-commit-hash: 755ec71c051b20238185039a0d85272a7c9a66d6
2021-12-08 13:58:06 -08:00
Jason Shuler cabd6c6b95 ui.h: add missing optional header include (#23160)
old-commit-hash: af275af38f2ac2eb031d2b7275765abcfd2f146a
2021-12-07 13:44:58 -08:00
Dean Lee 88ebf835bb 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
old-commit-hash: 20f571db3c37c6d009ca3d9a646874769aa07acd
2021-12-06 14:02:39 -08:00
Dean Lee 53c7684956 OnroadHud: update engageability and DM icons at 2Hz (#23134)
old-commit-hash: 5ab6bff67016585edbbec134123c54db2e471599
2021-12-05 12:54:35 -08:00
Dean Lee 2da9327191 UI: move onroad hud to Qt (#23040)
* onroad hud

* improve boudingrect, same as nanvg

* QRect

* Update selfdrive/ui/paint.cc

* stacked with nvgWindow

* cleanup ui.h

* rename to road_view_layout

* no lambda

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: ad09507e1ba2d758fe435d06a3dc28def33c14e8
2021-12-04 23:02:10 -08:00
Adeeb Shihadeh dccb8b4010 New sounds (#22652)
* new engage/disengage + amp config

* first family

* cleanup audible alerts

* tici isn't special

* fix up debug cycle alerts

* these were better

* extend range

* use distracted sound

* log scaling

* getting closer

* slightly louder

* prompt

* update tests

* update refs

* fix c2 test

* resolve todo

* adjust tolerance

* revert for now

* should work

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e679d05d9e98e267047c21c0b6b67fe9d61f8ed6
2021-11-30 19:47:33 -08:00
Dean Lee 5f299f7f3e ui/device: change last_brightness from float to int (#23029)
old-commit-hash: e376a621baa125063ffbf1fbd91560e25d45e8fd
2021-11-26 14:59:23 +01:00
Dean Lee 3492b1290f ui/device: fix uninitialized variable awake (#22983)
old-commit-hash: 7ce9ff1b0420e5e371570e7d69deb5c19d41ec0f
2021-11-19 20:40:29 -08:00
Adeeb Shihadeh 09ad54970c Revert "Revert "Fix build failures in Ubuntu 21.10 (#22952)""
This reverts commit caf0013a20b5330b4b964867adf40294bc407e43.

old-commit-hash: f2a81309e10a93b85d4d68a83392eab9d8df9155
2021-11-17 13:46:38 -08:00
Adeeb Shihadeh 64a51de881 Revert "Fix build failures in Ubuntu 21.10 (#22952)"
This reverts commit e50fe1bb134e652aacd734c40b590b49d443512a.

old-commit-hash: 5e2570dc7555609e855370ab8afdade3640282c4
2021-11-17 11:40:17 -08:00
Jason Shuler 6e92ec1cf2 Fix build failures in Ubuntu 21.10 (#22952)
* Fix compile on Ubuntu 21.10

* Add missing c++17 optional refs in ui
old-commit-hash: 61f9b3e653b08900e6a5011320f383efbe443c14
2021-11-17 18:59:36 +01:00
Dean Lee fb0a97b972 ui: replace nvg transfrom with QTransform (#21968)
old-commit-hash: c35ae999276a8f0385f5e20af06eae9f72c56971
2021-11-17 12:24:37 +01:00
HaraldSchafer 95d63ee981 tici: limit brightness with display uptime (#22918)
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c9218a55f3af82369883af0db90c8b2416a565f7
2021-11-15 22:11:17 -08:00
Adeeb Shihadeh c142416931 soundd: configure as persistent process (#22878)
* soundd: configure as persistent process

* update c2 test

* fix that

* little more

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ed8e6f857ca45a1d814dd9a98ddf5c40c6d08c20
2021-11-12 15:04:57 -08:00
Dean Lee c1a3683ccb soundd: misc cleanup + tests (#22796)
* pass AudibleAlert to setAlert

* apply reviews

* remove trailing underscore

* add current_alert_type

* common function get_alert

* same freq as ui

* small cleanup

* setvolumne on change

* static Alert::get

* test_sounds

* remove old test files

* loop twice

* assert loopsRemaining

* assert stop

* init to min_volumne

* Revert "remove old test files"

This reverts commit 12e8bfefae1ae7f8649d3eda1e4126ff8eb1fe17.

* move to ui/soundd

* move test to tests/test_sound.cc

* remove old tests

* cleanup

* lower volume

* Revert "remove old tests"

This reverts commit e6bb12abfa3d5cd0aa8986d2b8da0b1edc7ea31b.

* return Alert

* cleanup

* remove #include <optional>

* cleanup .gitignore

* revert to std::optional

* Revert "revert to std::optional"

This reverts commit a66291c51f3a846652837cc4a43d5d60dd81896b.

* cleanup

* remove volume check

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 797bb1acb0ed548bda23b9f76458a102bf7ccf5a
2021-11-09 14:18:29 -08: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
Mitchell Goff 075d7a85a0 Use TICI intrinsics by default on PC (#22546)
old-commit-hash: fd3fdea7b4f811038c3e1145d283b0f7e15a90f0
2021-10-13 12:44:36 -07:00
Willem Melching c3a226afbf Revert "ui: use C3 video sizes by default on PC"
This reverts commit 71484f14c0d13f9b3eb9bece3629726e834ea304.

old-commit-hash: abae4ef72c462eef55c8a35f14365ed8b94c2bcc
2021-09-14 11:48:34 -07:00
Willem Melching b85209979a ui: use C3 video sizes by default on PC
old-commit-hash: cf4cd3b6935f7d0fcfc35ef0e9ea4ec0aae7155f
2021-09-14 11:27:34 -07:00
Dean Lee f4d8621be1 Qt/onroad: use CameraViewWidget (#21821)
* use CameraViewWidget

* no timer, updateFrame after frameSwapped

* use QOpenGLShaderProgram

* merge master

* remove that

* new function setStreamType

* continue

* remove showEvent

* cleanup

* cleanup

* little more

* fix black screen on startup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: a034926264cd1025c69d6ceb3fe444965f960b75
2021-09-08 13:13:27 -07:00
Dean Lee b558bbabab Alert::equal: pass Alert by const reference (#22044)
old-commit-hash: dec9addce019adde560f3b4bb2ca2f29ea502f32
2021-08-25 09:33:27 -07: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
Adeeb Shihadeh 6eea281a19 soundd (#21619)
* refactor alerts

* doesn't go here anymore

* soudd

* handle controls unresponsive

* same check

* fix path

* update sound test

* nice

* fix c2

* add script

* update tests

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 12948e661a6b6424739082ee614d81b4549c2753
2021-07-16 17:30:00 -07:00
Adeeb Shihadeh e24ff01513 sidebar: indicator for GPS fix (#21556)
* sidebar: indicator for GPS fix

* fix cutoff
old-commit-hash: a2f9259ebf2fb3c98dc560221e0f33f20955d825
2021-07-11 15:26:28 -07:00
Adeeb Shihadeh 468032d27e remove gps accuracy from sidebar
old-commit-hash: 8b6cf406abcb45496ca4f5d57291bde6e44c4910
2021-07-10 14:40:11 -07:00
Dean Lee cc75e9ba9f UI: remove zoom from struct UIState (#21520)
old-commit-hash: 13b2ce9391ca132a1d4fbeb7e40c32cc1f3264e0
2021-07-08 10:42:34 +02:00
Dean Lee 10029fb0b9 ui.h: const bg_colors (#21169)
old-commit-hash: 514111ca85daeda3d12feebac3f40cbdfa50fd81
2021-06-07 00:04:16 -07:00
Adeeb Shihadeh 78d65db218 limit icon flickering in UI (#21132)
old-commit-hash: 2ddfd829134effcf9420019a92984a3133a3f20b
2021-06-03 23:06:14 -07:00
Adeeb Shihadeh 56e9dbcf99 Qt driverview (#21063)
* CameraViewWidget

* continue

* cleanup

* mv DriverViewWindow to ui/qt/offroad

* write IsDriverViewEnabled in showEvent/hideEvnet

* sm.update(0) in onTimeout()

* CameraViewWidget

* use unique_ptr for vipc_client

* virtual draw

* fix viewport

* connected()->frameReceived()

* bg_colors use QColor

* fix draw

* rebase master

* whitespace

* apply reviews

* indent

* like onroad

continue

* white space

* continue

* show == false

* remove border

* use widget's size

* fix shadowed rect

* cleanup driverview

* fix transform

* remove video_rect

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 9876723169ba0fd0c61169699caaa63246473e85
2021-06-01 20:59:41 -07:00
Willem Melching c0984ebb97 cleanup brightness params (#21066)
old-commit-hash: 93424ec6b4f1fb18db61e27877f28fa0357c5455
2021-05-28 15:45:41 +02:00
George Hotz 6922150ede Move MCLK from 24 -> 19.2 mhz + Add accuracy in sidebar (#20960)
* wip

* one day i'll flip that right

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: f43671c9878e2babc7c524a6f1476c571e8b900a
2021-05-18 22:37:33 -07:00
Willem Melching 60ac2dd4c0 Update visionIPC stream and intrinsic matrix when going onroad (#20947)
* Choose correct vipc stream when going onroad

* whitespace
old-commit-hash: ccdec0291d97da29c8b2d0edce579e0f9a5ab07d
2021-05-18 14:17:38 +02:00
Dean Lee 5609f32cee Cleanup includes (#20925)
* remove #include <pthread.h>

* remove #include<stdbool.h> for cc files

* remove #include<iostream>
old-commit-hash: 0495426535490e7d8d503af35ace7a20dc70a7bb
2021-05-17 10:31:31 +02:00