Commit Graph

178 Commits

Author SHA1 Message Date
Willem Melching 651d4ce031 --std=c++17 (#2330)
* switch to c++17

* more 17

* 1z

* use std::clamp

* Fix types in clamp

* bump submodules

* bump laika

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 339d1967cb1e8ca73aeb1f0066a23b0933706ae5
2020-10-17 13:33:12 -07:00
Willem Melching 0db7cd7571 tici: set brightness in std::async (#2347)
* set brightness in std::async

* CI
old-commit-hash: 442f2543e326b6dccdadb71a89fe36e4b6587f92
2020-10-15 20:48:05 +02:00
Willem Melching 498ecbdf3c Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

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

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2e182e5c574ea1468678b5fd8d0597e34ed5898d
2020-10-13 16:23:23 +02:00
Willem Melching a331861873 Remove czmq part 1 (#2332)
* remove czmq

* remove streaming mode from loggerd

* Add include for usleep
old-commit-hash: a4ccfcffe8247bf467bddfb0e6c5b3eb8851e21a
2020-10-13 16:01:07 +02:00
Adeeb Shihadeh 51d59aefca UI cleanup + startup time improvement (#2295)
old-commit-hash: 671183184bd177d697285d397bce10c51afd5395
2020-10-08 19:29:56 -07:00
Adeeb Shihadeh f27bdfbee7 UI: refactor light sensor (#2129)
* refactor light thread

* qcom low power mode

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 06cb2f963ddd3a1e25d592ac4d2d25358e69c94a
2020-10-03 20:58:46 -07:00
Adeeb Shihadeh be29b8f236 tici light sensor (#2238)
old-commit-hash: 2490be762ddb4c05d3ed8fc9c865138115d24666
2020-09-28 14:49:07 -07:00
Willem Melching f275d06ff2 tici: fix ui rotation (#2222)
* fix rotation using wayland

* put back intrinsic matrix fix
old-commit-hash: 53e71f44ceec181e40c4cbd3f14a403798bca7bb
2020-09-23 23:16:55 +02:00
Dean Lee a7c8adcdbe read bool param with read_db_bool (#2205)
* read bool param with read_db_bool

* Update selfdrive/loggerd/loggerd.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 0e5a5efffce15cc507d8104aceb58c132689d7c8
2020-09-21 18:17:35 +02:00
Comma Device 4f622a1dbb Fix makefiles after read_file() helper
old-commit-hash: 4be0e23ca588f110056917863a725f164996ca49
2020-09-21 08:03:36 -07:00
Adeeb Shihadeh 864f32ce1b quick lgtm fixes
old-commit-hash: 4acc82604d456dc5280e62f946f3fdd1e0ce5810
2020-09-19 12:53:36 -07:00
Adeeb Shihadeh 98135d4482 tici: set volume at 90%
old-commit-hash: 002e0065cb7a57b03eddc346ef6986de1be0532c
2020-09-18 14:54:12 -07:00
ZwX1616 e8cbf6cf11 revert tici ui rotate
old-commit-hash: b3fad609d9886e55696529290acdc70263e59fff
2020-09-18 14:12:03 -07:00
Willem Melching 3ff821f18c tici: offroad ui powersave (#2191)
* ui powersaving

* Lower brightness even more
old-commit-hash: 9330070bb5b4afd424841cd97c3c9bf5cb8d33fb
2020-09-17 15:50:09 +02:00
Comma Device c6cfa6e30f fix tici ui lag
old-commit-hash: 45c58f561aa516da55b4e6371c32e675193ee164
2020-09-17 00:13:54 +00:00
Willem Melching 47b5b1516d tici: fix ui rotation (#2184)
* rotate ui 90 degree

* put rotation behind ifdef

* Also ifdef that

* ui intrinsic_matrix

* that doesnt do anything

* Keep parent on non qcom
old-commit-hash: 9bbb1663033776918a33846879bad0b22c33d2fc
2020-09-16 17:46:08 +02:00
Adeeb Shihadeh 64b92f49da fix stretched UI on pc
old-commit-hash: 16f40e6ff3f19af9d6d9c68fafbf142f5eb61271
2020-09-14 19:07:14 -07:00
Adeeb Shihadeh ac3422fc0f message builder (#2161)
* use custom MessageBuilder from cereal

* use MesageBuilder.toBytes

* bump cereal

* unused

* another one

* fix ui msg

Co-authored-by: deanlee <deanlee3@gmail.com>
old-commit-hash: 4d5733924a2fdd8a3bbaf5f48869ac744b983401
2020-09-12 21:48:15 -07:00
Dean Lee 2baf5c7356 UI: simplify layout calculation (#2131)
* add Rect struct

* simplify layout calculation by using viz_rect

* fix

* add whitespace

* use the correct value for vwp_w

* correct vwp_w again

* rebase

* dd
old-commit-hash: 8417be6f40a0b1ee92524da7c1bd4e114cd32674
2020-09-12 18:35:36 -07:00
Adeeb Shihadeh 6aebe5fa2a turn display on in spinner (#2148)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0ebc037be7a41ad8a42f157ef5c3368ab35062ec
2020-09-09 20:24:13 -07:00
Comma Device 934fce64ab wait 5s before showing waiting for controls
old-commit-hash: d6571aa633ba3a4602bcb1cf5f8cbad134e18c10
2020-09-09 13:19:20 -07:00
Adeeb Shihadeh 0ae5e7403e QT UI: sounds (#2078)
* move android into own dir

* fix name

* maybe this works? qt ui doesn't work on mac

* fix that

* pc sound works

* fix pc build

* lowercase

* that needs to be real_arch

* split into classes

* fix typo in lib

* Fix cycle alerts

* Add qt multimedia libs to install scripts

* Add ui/android folder

* Fix android build

* Raise exception if sound init fails

* add missing return

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: acd1bde496904fbc0d97f4d89e630358c4d11f7f
2020-09-09 19:04:28 +02:00
Willem Melching a351212c04 ui: glTexImage2D only redundant on QCOM
old-commit-hash: e8c8e9dab25c81fbeefa4fa05bf38166f9abe203
2020-09-08 14:33:27 +00:00
Willem Melching 1268a08fd3 link ui against right opengl(ES) lib
old-commit-hash: 7cd481577347529ba90d6b3454700d610e80941c
2020-09-07 17:13:47 +02:00
Adeeb Shihadeh 8a5dfc571e Always keep display on with ignition (#2138)
* keep display on with ignition

* fix typo

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: e386133c4b8bc2c27de2291257d6441d930b00a7
2020-09-07 13:13:10 +02:00
Adeeb Shihadeh 9c5bfdddd2 sidebar cleanup (#2130)
* sidebar cleanup

* undo that
old-commit-hash: 660e7340227a3928693cefffbc5a1ccc5867b296
2020-09-04 15:05:45 -07:00
Adeeb Shihadeh c3f623e432 UI vision refactor (#2115)
* refactor vision

* don't show slow frame message when in preview mode

* change draws to uint32_t

* set vision_seen=false after destroy

* remove vision_connect_thread

* refactor ui_update

* seelp 30ms when vision is not connected

* remove should_swap

* call ui_update_sizes before ui_draw

* rebase

* start bigger UI refactor

* don't need the touch fd

* fix qt build

* more cleanup

* more responsive

* more refactor

* fix for pc

* poll for frames

* lower CPU usage

* cleanup

* no more zmq

* undo that

* cleanup speed limit

* fix sidebar severity for athena status

* not aarch64

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 848301b091af11e129ba6873f7d297d4890c562b
2020-09-03 16:32:55 -07:00
Willem Melching 9788cf1ed3 add more opengl info on startup to pc ui
old-commit-hash: 8880ec81f258b06cda134f59a7e96d7e542b9a69
2020-09-03 14:31:31 +02:00
Willem Melching 16ef2f6a1b pc ui: print opengl version on startup
old-commit-hash: 92de562ed91594d20f10d3b9a30d499c801baeff
2020-09-02 15:46:39 +02:00
Willem Melching 35155d5efa ui: simplify shader versions and fix hardcoded texture size (#2112)
* fix shader version

* fix texture buffer size

* Attribute/Varying is deprecated
old-commit-hash: 42b6292fa5220ca979b0354de91aa16d2cf54039
2020-08-31 15:02:01 +02:00
Willem Melching fff4680443 Fix camera view on PC
old-commit-hash: 01b30794518ef1e8d8a4315baf5678095f3a8283
2020-08-31 13:16:30 +02:00
Adeeb Shihadeh cb3f689e36 remove read_param_timeout (#2095)
* remove read_param_timeout

* missed that
old-commit-hash: 9cd5180b43e03f84adb870fa25c91428a18394e0
2020-08-27 19:24:51 -07:00
Adeeb Shihadeh cc2c6180f9 Sound stability test (#2089)
* play sound

* clean this up

* no cereal

* fix module issue

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 685340d57897b8a0db4aa1c754c1760c59b92ead
2020-08-27 15:50:48 -07:00
Adeeb Shihadeh d2cdd7706c UI cleanup (#2091)
* remove unused UI code

* these params aren't used anymore

* this is cleaner

* remove one more timeout

* read that from carParams

* only android needs pm

* fix that

* fix that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 43e3ec1bc1ee0d7b8044c5cabbe4022c5ddc9783
2020-08-27 11:57:31 -07:00
Adeeb Shihadeh 4936fd4709 mac ui kind of works (#2079)
old-commit-hash: 7956bb6883c75d97ca823d33c038841ef9e9e679
2020-08-25 00:56:42 -07:00
Willem Melching cb21237c26 Thermald cleanup (#2049)
* Thermald cleanup

* no Temps, fix ui formatter

* Fix scaling

* Don't touch that

* typo

* Fix fan control

* Fix if

* change cereal

* Update comment
old-commit-hash: 9eb3d89ca273bf9960890c9e60687960b552346d
2020-08-24 14:17:41 +02:00
Dean Lee 205a47abaa paint.cc: deleted two meaningless lines (#2043)
old-commit-hash: 08d6fe18805c3e7e9fe512b1b343ab69d49f12da
2020-08-24 14:15:34 +02:00
Willem Melching 698d4e4af1 ui: larger font size
old-commit-hash: d7f3690e85b2712cadaa8da2a1d153d5d915393f
2020-08-20 21:37:28 +02:00
Willem Melching 191d2e55d0 ui: force GLES context
old-commit-hash: 2410c7e26bbf60dda83792d273f049586c1aa001
2020-08-20 21:33:32 +02:00
Willem Melching 473fb11d34 Qt ui for PC (#2023)
* qt ui boilerplate

* this kinda works

* cleanup

* render inside other widget

* cleanup

* more cleanup

* Not needed

* Handle click

* Draw at 20Hz

* create paint.hpp

* move stuff around

* update sidebar

* Draw vision

* this works again

* add clickable settings button

* Only collapse sidebar when started

* always use qt on linux

* fix width

* scrollable area

* talk to NetworkManager

* code to add a connection

* params toggles

* small cleanup

* add qt5 to dockerfile

* Qt on mac

* Add qt to release files

* fix macos build

* nore more ifdefs needed

* add icons

* make a bit nicer

* Hide scrollbar

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e115c514521c7705112bd0cb2e4bf865b536501a
2020-08-20 17:16:44 +02:00
Dean Lee ebd4f68cba ui: refactor model related functions (#2026)
* remove read_model

* remove structs for c-capnp

* remove duplicate #define from modeld

* add function fill_path_points

* fix Indentation

* use MODEL_PATH_DISTANCE instead of 192

* fix type

use validLen

* rename left_path_points&right_path_points to xxx_lane_points
old-commit-hash: f8ab6bd009410a9f7ab9c30ce7b72a82c6d2507b
2020-08-18 15:26:43 +02:00
Dean Lee fb8c67ba1f paint.cc: remove redundant calls (#2025)
* remove redundant calls

* set MODEL_LANE_PATH_CNT=2
old-commit-hash: fe43d51686da19063c4ee3ebdb09eadfdd3a56ad
2020-08-17 12:06:09 +02:00
Dean Lee 00e8238b78 fix two little bugs (#2033)
old-commit-hash: 934506e1545acd30bf65e9544e565005d6c56fc6
2020-08-17 11:59:27 +02:00
Chris 42538fd54b Kilometers per hour now displayed as km/h (#2032)
Fixes #2031

Signed-off-by: Christopher Rabotin <christopher.rabotin@gmail.com>
old-commit-hash: 1b52930a52828b1423c59c677c9b42a5ff76125c
2020-08-17 11:16:52 +02:00
Dean Lee 3e083c1074 remove duplicate call to getDMonitoringState (#1964)
old-commit-hash: 56e63bafa87995eb6795bd77df931a29bf89c684
2020-08-02 10:55:24 -07:00
Adeeb Shihadeh 069bd4061e Driver view refactor (#1869)
* quick driver view cleanup

* send at correct freq

* let manager handle that

* don't block starting on driver view

* fix UI hacks

* ui cleanup

* move driver view functionality into dmonitoringd

* dmonitoring thresholds shouldnt be in UI

* remove driver view file from release files

* timeout on frontview

* bump cereal
old-commit-hash: a7ee2a53a8a832f3678171403471380a9a72b9cb
2020-08-01 17:26:35 -07:00
Dean Lee b35f7909ba UI cleanup (#1941)
* remove unused variables

* remove unused variables
old-commit-hash: 2953ae28104c3ccde59a7659c25b853ea0421adc
2020-07-28 11:13:37 -07:00
Willem Melching daaefd6cca qcom2 build fixes
old-commit-hash: 405d94ec6d98727d9ffbfc4d469c92ca327dfa1a
2020-07-27 16:13:25 +00:00
Dean Lee 1bff58ff15 sidebar: remove unnecessary checks on uilayout_sidebarcollapsed (#1928)
* cleanup

* keep local variables

* done
old-commit-hash: 5cbdaa19bbe3a44b5fadcf5dfc77b4e885295cf2
2020-07-26 21:00:24 -07:00
Adeeb Shihadeh 660928eedf Only draw lead car indicators when controlling longitudinal (#1914)
old-commit-hash: 61548f5a483e0fa7fba6f167017c3fbe73e3f684
2020-07-23 13:28:58 -07:00