Commit Graph

109 Commits

Author SHA1 Message Date
Dean Lee 0818f7166d UI: Move the variables need to be updated by socket to UIScene (#19783)
* move variables into UIScene

* rebase master

* rebase master

* rebase master

* rebase master

* rebase master

* rebase master

* fix build error

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: dd603a89f6
2021-03-03 17:40:50 +01:00
Dean Lee 2c8696ddac move function calib_frame_to_full_frame to ui.cc (#20230)
* move calib_frame_to_full_frame to ui.cc

* cleaup includes
old-commit-hash: a1b2bdb844
2021-03-03 13:10:17 +01:00
Dean Lee 5e19cdb0d3 move intrinsic_matrix into modeldata.h, removed duplicate definitions. (#20051)
* move intrinsic_matrix into modeldata.h

* def __cplusplus
old-commit-hash: ae72d34a42
2021-03-03 11:47:48 +01:00
Dean Lee 4fd0fe80f0 UI: rename frontview to driver_view (#20228)
old-commit-hash: 8db3eea6c5
2021-03-03 11:38:41 +01:00
ZwX1616 f8966cecae tici driverview support (#20223)
* add tici support and clean up

* not exactly 4/3

* keep c2 style

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2a9e775bb9
2021-03-02 19:42:45 -08:00
HaraldSchafer 8bb63abe4f fixup ui (#20049)
* fixup ui

* works

* new formate

* more cleanup

* works I assume we need a library somehow

* more readable

* fix lead sign

* put on road

* transformations lib

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: ab0456c0eb
2021-02-09 17:23:46 -08:00
Dean Lee 99f19b5da6 UI: remove struct track_vertices_data (#20018)
* remove struct track_vertices_data

* space

* rebase master
old-commit-hash: c2aefab553
2021-02-08 12:06:14 +01:00
Dean Lee 766302fabe removed margin paramater from car_space_to_full_frame (#20017)
old-commit-hash: 40919a6f48
2021-02-07 18:00:56 -08:00
Dean Lee dc406c1b16 move global SET_SPEED_NA to function that uses it (#20026)
old-commit-hash: a7fe4560a6
2021-02-05 12:12:33 -08:00
Adeeb Shihadeh 966945880b Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
old-commit-hash: 000bd226aa
2021-02-03 19:57:30 -08:00
Dean Lee 58cf6b8a80 UI: mv sidebar_collapsed&viz_rect to struct UIState (#19782)
* mv sidebar_collapsed&viz_rect to struct UIState

* rebase master

* rebase master

* rebase master

* revert that

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: c22d6e315d
2021-02-01 16:10:15 -08:00
Comma Device a2f322de6e match driverView with new model
old-commit-hash: 75d0802804
2021-01-28 13:44:12 -08:00
Dean Lee 34952f246e draw lead indicator in 3D (#19793)
* lead indicator in 3D

* more

* Update selfdrive/ui/ui.cc

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

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 6bd9e5ca6a
2021-01-28 15:53:24 +01:00
Dean Lee 32dfaa9b2a UI: cleanup draw_alerts condition (#19875)
old-commit-hash: 8b4731ffc8
2021-01-22 12:16:45 -08:00
ZwX1616 d0726d1f7d face icon reflects DM policy (#19842)
* send that

* draw icon based on whether active

* Update selfdrive/monitoring/dmonitoringd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 88430f12f4
2021-01-19 15:11:15 -08:00
Dean Lee f0fce01b85 use std::map for images (#19768)
* use std::map for fonts&images

* rebase master

* use std::string

* remove cmp_str

* Update selfdrive/ui/paint.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 1796f63211
2021-01-16 13:50:06 -08:00
Dean Lee 3c9142a709 UI: refactor transform (#19658)
* refactor transform

* always draw chevron if there is a lead

* remove nvgSave&nvgRestore

* keep one point outside the screen

* zoom chevron

* more size

* still use margin

* still use margin
old-commit-hash: cc2d62a938
2021-01-15 11:41:20 +01:00
Dean Lee a6e3036aea Use Rect as the parameter of draw_rect (#19696)
* Use rect as the parameter of draw_rect

* add function ui_fill_rect

* simplify

* rebase master

* apply review
old-commit-hash: fcfba42c59
2021-01-15 11:15:48 +01:00
Adeeb Shihadeh 781accd0b3 fix camera malfunction alert (#19757)
* fix camera alert malfunction

* remove old alert
old-commit-hash: 40830a216b
2021-01-14 16:03:16 -08:00
Dean Lee 74dc639515 convert glutil.c to gltuil.cc & add class GLShader (#19720)
* c++ glutil

* function getUniformLocation

* rebase master
old-commit-hash: cef469cbed
2021-01-12 15:43:34 +01:00
Dean Lee 4b15f8a12d Refactor image texture stuff into class (#19719)
* Refactor image texture stuff into class

* cleanup

* Update selfdrive/common/visionimg.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b3107e153c
2021-01-11 15:52:58 +01:00
Dean Lee 38443793da Refactor alert blinking (#19583)
* add function get_alert_alpha()

* continue simplify

* reset alpha to 1.0 if blink_rate is 0

* review

* sine wave

* rebase master

* use time

* use cos
old-commit-hash: de309b156d
2021-01-08 12:05:07 -08:00
Dean Lee e8936467f5 refactor ui_draw_driver_view (#19597)
* refactor ui_draw_driver_view

* continue simplify

* fix gap
old-commit-hash: 4231b5b329
2021-01-08 11:30:37 -08:00
Willem Melching 3f950832b9 VisionIPC 2.0 (#19641)
* Squashed vipc

* Update release files

* Remove else

* add visionipc to release files

* use poller in vipc receive

* opencl framework instead of lib on macos

* Fix camera webcam

* Fix opencl on mac in ui

* more webcam fixes

* typo in ui sconsfile

* Use cur_yuv_buf

* visionbuf c++ class

* Camera qcom was still using visionbuf_allocate

* Turn loggerd back on

* fix snapshot

* No build needed

* update test camerad

* no more release callback

* make encoder c++

* Revert "no more release callback"

This reverts commit e5707b07002fee665d0483d90713154efc2d70d4.

* fix exit handlers

* No need to check errno

* move release callback call

* s/VIPCBufExtra/VisionIpcBufExtra/g

* use non blocking connect

* ui use non blocking connect

* Lower condition variable wait time

* Snapshot cleanup

* bump cereal

* bump cereal
old-commit-hash: fb496c692a
2021-01-08 14:54:25 +01:00
ffhspa 4ef1b8910f remove double semicolon in paint.cc (#19684)
old-commit-hash: dd9d8bba89
2021-01-07 11:15:59 +01:00
Dean Lee af4b8bb307 paint.cc car_space_to_full_frame less paramaters (#19676)
old-commit-hash: 93cd4eae55
2021-01-06 16:34:29 +01:00
Willem Melching 1cc43f8d7d UI: refactor model related functions (#19657)
Squashed commit of the following:

commit 7d7fb15e4cdd0e47fa38f949f79581dc611db015
Author: Willem Melching <willem.melching@gmail.com>
Date:   Wed Jan 6 11:31:09 2021 +0100

    no extern

commit 901893966e3f908435bceb8777253dfa916a3d91
Merge: 9816e01e c0703a57
Author: Willem Melching <willem.melching@gmail.com>
Date:   Wed Jan 6 11:27:29 2021 +0100

    Merge branch 'master' into refactor_model_draw

commit 9816e01e6ff0284521fa18b07ec15b3900577687
Author: deanlee <deanlee3@gmail.com>
Date:   Wed Jan 6 04:02:08 2021 +0000

    fix lead_d

commit 6fa500dbce26544cc3fdeb4d9b0d2d654382a40b
Author: deanlee <deanlee3@gmail.com>
Date:   Tue Jan 5 13:18:20 2021 +0000

    populate model data in update_socket

commit e25db7e28c1b543a04c3e837aa44431c42dbb5b2
Author: deanlee <deanlee3@gmail.com>
Date:   Tue Jan 5 12:59:13 2021 +0000

    update model in function

commit 0834a3ffe7eaa080671f13c32dd6475ae5392d5b
Author: deanlee <deanlee3@gmail.com>
Date:   Tue Jan 5 12:50:21 2021 +0000

    continue

commit 95b08679c2593eb0770a68b3cf1a59f1fb3b74f4
Author: Willem Melching <willem.melching@gmail.com>
Date:   Tue Jan 5 13:26:34 2021 +0100

    Update selfdrive/ui/paint.cc

commit 0eef065ae4f96c2ee5d97b4ccdfdbf0ae4945385
Author: Dean Lee <deanlee3@gmail.com>
Date:   Tue Jan 5 20:11:01 2021 +0800

    Update selfdrive/ui/paint.cc

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

commit 955ad9b03a176174b86b28d5bb6f48d6e2a09281
Author: deanlee <deanlee3@gmail.com>
Date:   Thu Dec 31 04:45:31 2020 +0000

    refactor model related functions

old-commit-hash: 37cb4bec63
2021-01-06 11:34:52 +01:00
Willem Melching b56d44bbd2 dont show speed below zero
old-commit-hash: d8e864e33d
2021-01-06 11:25:37 +01:00
Dean Lee ff7d537c96 fix problem with drawing path (#19670)
old-commit-hash: d0ba19fedb
2021-01-06 11:19:10 +01:00
Dean Lee 4765ba9478 cleanup draw alert (#19655)
* cleanup

* use Rect

* Revert "use Rect"

This reverts commit 96d04339a0adc7f7f543828ae8ff8101dd9f5f60.

* remove None from static map
old-commit-hash: 20918d82b6
2021-01-05 13:27:15 +01:00
Dean Lee 041db30454 refactor ui_draw_image (#19656)
old-commit-hash: 30c1164287
2021-01-05 13:01:32 +01:00
Dean Lee 9864456618 simplify ui_draw_vision_maxspeed (#19642)
if is_curise_set
old-commit-hash: f232f86a73
2021-01-04 15:55:04 +01:00
Dean Lee 9d0efaaccf UI: simplify ui_draw_vision_speed (#19594)
* simplify draw_vision_speed

* use std::nearbyint

* use std::to_string
old-commit-hash: ba4fb80e92
2021-01-04 14:18:38 +01:00
Dean Lee 23a52deb5b max_idx should be initialized as -1 (#19625)
old-commit-hash: 37a43124c0
2021-01-04 11:29:31 +01:00
Dean Lee 0ac1e659da UI:shorten variable name (#19633)
old-commit-hash: 0c4e2fadc8
2021-01-03 12:25:24 -08:00
Dean Lee e1723d7238 ui_draw_chevron: simplify calc size (#19616)
old-commit-hash: 39bd8c7ce6
2020-12-29 14:08:49 -08:00
Mayfield 93d23902da add start_time parameter to unlogger (#19573)
* add start_time parameter to unlogger

* fix ui crash

* fix ui build
old-commit-hash: 5864f566df
2020-12-21 23:34:24 -08:00
Adeeb Shihadeh 99b06dd837 offroad home styling and cleanup
old-commit-hash: a36632cc39
2020-12-18 16:40:23 -08:00
Dean Lee b81e9d63ae cleanup camera malfunction alert (#2751)
* cleanup alert

* move ui_draw_vision_alert out of ui_draw_vision
old-commit-hash: 1ee8287705
2020-12-15 13:06:22 -08:00
Willem Melching 69a8855010 paint.cc: lower y offset
old-commit-hash: 93cc7335fc
2020-12-15 14:47:53 +01:00
Willem Melching 79275c08e1 add optional margin to car_space_to_full_frame check
old-commit-hash: 11fb6efba2
2020-12-14 14:09:26 +01:00
Willem Melching 2edf720d53 paint.cc: fix y offset
old-commit-hash: bbc289b671
2020-12-14 13:38:00 +01:00
Dean Lee e89e1a185c small cleanup (#2715)
old-commit-hash: 232cb25683
2020-12-08 14:20:06 +01:00
grekiki 2e07e45bed UI style improvements with improved keyboard (#2710)
* fix spaces and make spacebar dynamically sized

* some spaces and a comment

* more spaces

* const

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3e466aa528
2020-12-08 12:00:51 +01:00
Willem Melching 95e839d6c8 set y offset to zero for now
old-commit-hash: fcb3ed727b
2020-12-04 18:07:51 +01:00
Willem Melching 995950c77b Add y offset to video (#2694)
* add y offset to video

* Also reduce zoom
old-commit-hash: 35baefa72e
2020-12-04 16:29:12 +01:00
George Hotz b3e7154ab1 remove ui sidebar hint (#2662)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 6159906e5f
2020-11-30 16:22:42 -08:00
Adeeb Shihadeh c6b35839d6 no gl inside nvg frame
old-commit-hash: b9c14c92a7
2020-11-27 14:25:52 -08:00
Harald Schafer 4a4fb376b9 sometimes never goes into the loop
old-commit-hash: d409dabedd
2020-11-17 10:19:12 -08:00
Dean Lee ed4c4cd8b3 remove std::clamp (#2530)
old-commit-hash: 91f79acac3
2020-11-12 11:30:04 -08:00