Commit Graph

61 Commits

Author SHA1 Message Date
Dean Lee
8cacc14b31 Sound refactor (#1589)
* Soud refactor

* remove files from  files_common

* add timeout to set_volumn

* add param volume to init

* done

* test.cc

* fix typo

* add repeat param instead of loop

* revert submodule

* add member function currentSound

* remove function create_player from class member

* fix build error

fix repeat

* rename CHECK_RESULT to ReturnOnError

* set currentSound_ before posible err

* use std::map to initialize sound table

cleanup

cleanup

cleanup

fix bug in stop

change paramater name

* done

* remove function CreatePlayer, create player in init()

* resolve conflict

* remove sound test

* rebase

* remove whitespace

* Apply great review suggestion

* use player's SLVolumeItf interface to set volume

* use float

* leave the volume control the way it is
2020-06-15 15:26:38 -07:00
George Hotz
344a9a3699 Fixups for Mac, and a bunch for PC (#1654)
* fix mac nui

* fix cereal

* builds on mac without warnings

* ui swap shouldn't be instant on pc

* camerad builds on mac

* modeld, and now everything, builds on mac

* ui draws pictures on mac now

* fix camerad shutdown

* support ui looping on pc

* python3 on that

* SCNu64 should be cross platform

* bump cereal and new apk

* clean up

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-06-11 18:21:59 -07:00
ZwX1616
681ef81ed8 fix dtype (#1676) 2020-06-10 15:15:51 -07:00
Dean Lee
8ad1135e80 add set_brightness in framebuffer.h (#1659) 2020-06-10 10:28:18 -07:00
Dean Lee
5fdb60d43e remove function is_leon (#1660) 2020-06-08 17:24:55 -07:00
George Hotz
7770041f92 Getting PC openpilot working again (#1650)
* fixup keras_runner to work and be nicer

* truncate the lane lines based on the valid len
2020-06-05 17:40:56 -07:00
Dean Lee
d720f28ecb ui.cc: remove variables from UIScene, use event::Reader to get data (#1585)
* use struct to store lead status

* remove white space

* use RadarState::LeadData::Reader

* use reader to get thermal data

* use reader

* continue

* remove variables

reset submodules,fix some errors

reset submodules

revert

* remove s->scene.gps_planner_active

* modify

* cleanup

* done

* resolve conflict

* remove irrelevant comment

* remove white space
2020-06-05 15:33:45 -07:00
Adeeb
ab83e48ec4 Add pre-commit hooks (#1629) 2020-06-03 12:54:49 -07:00
Willem Melching
884b327374 ui.cc: read_db_value is not null terminated 2020-06-01 16:41:04 -07:00
Dean Lee
c9dbaf821c Template version of read_param (#1593) 2020-06-01 14:30:53 -07:00
Dean Lee
af36aa28ab driving.cc: Pass ModelDataRaw by reference (#1600)
* pass ModelDataRaw by reference

* pass NVGpaint by refer
2020-05-30 10:08:44 -07:00
Dean Lee
108a13ead8 UI: better read_model (#1586)
* update model struct inplace

* refer params

* pass path by refer
2020-05-28 15:10:49 -07:00
Willem Melching
4de2c57bd1 Fix #1566, athena status flicker in sidebar 2020-05-26 13:41:02 -07:00
Willem Melching
50f3f1d335 -Werror (#1567)
* werror

* -Wno-inconsistent-missing-override

* Silence ffmpeg deprecation warnings

* add some more pragmas to ignore warnings

Co-authored-by: Comma Device <device@comma.ai>
2020-05-26 13:27:01 -07:00
Dean Lee
b3ab7ae392 change light_sensor to atomic variable (#1560) 2020-05-26 09:59:49 -07:00
Willem Melching
ab5af232b2 Use C++ version of SubMaster and PubMaster (#1548)
* add PubMaster & SubMaster

remove 'delete msg'

remove headers

* use constructor to initial all submster

* modify drain sockets

* fix typo in ssconscript.remove lines

no checkValid in loggerd

last modify

handle_message:event->&event

fix type

remove heads

event to auto

* new interface

* api changed

* Revert "use constructor to initial all submster"

This reverts commit 73be7ea46250a325ce41d3a0445e34395a2ae692.

* change to new api

* revert loggerd

* dd

* use new PubSub api

* update to new interface

don't modify loggerd

reset panda

reset opendbc

remove empty lines

* switch to new pubMaster

* update to the new inteface

change

remove error code

. to ->

merge paramsd.cc

update panda

fix typo

simplify

fix typo

* Fix build

* always conflate

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-05-21 16:04:33 -07:00
Jason Young
d8d490ef6d Make timeout setting code reachable (#1509) 2020-05-14 13:03:47 -07:00
Willem Melching
2ae2c40b29 Fix steering wheel icon showing (#1497)
* this should fix steering wheel icon showing

* fix syntax
2020-05-12 18:17:04 -07:00
Willem Melching
f7c8707bf8 Don't show "no gps" when ubloxd is not running (#1479)
* dont show no gps when ubloxd is not running

* Just s

* Dropped that

* Connected is too long
2020-05-08 21:04:55 -07:00
robbederks
71bebc4fca Ambient light calibration parameters on persist partition (#1429)
* WIP: light sensor persistent params

* fix params writing

* Persistent params argument in C params lib. Fixed symlink flow

* Removed debug prints

* fix boardd

* fix ui

* remove debug print
2020-05-08 19:39:18 -07:00
Dean Lee
ee725534bb UI: move c-capnp to c++ (#1455)
* ui:move c-capnp to c++

* move Subsockets into vector

* rename reader to msg

include cereal/gen/cpp/log.capnp

* fix some errors

restore some changes

restore previous

* cleanup codes

cleanup codes

* remove unused variable alert_size

* handle capnproto's enum in a robust way

add break to default

* switch -> std:map

* use static std::map instead of switch

do cleanup

* fix wrong variable name

* use FlatArrayMessageReader instead of custom MessageReader

remove messagehelp.h

Revert "use FlatArrayMessageReader instead of custom MessageReader"

This reverts commit 57d8b6b1e2b4bad908246f35eb068535b1627167.

use FlatArrayMessageReader instead of custom MessageReader

add header file

remove capnp_c lib,add kj lib

include serialize.h

fix

remove duplicate includes
2020-05-06 08:38:26 -07:00
Dean Lee
846a58507f simplify drawing text and rect (#1446)
* add ui_draw_text

remove draw textbox

make draw_text static

add blank line

* add ui_draw_text

remove draw textbox

make draw_text static

add blank line

add ui_draw_rect

draw rounded rect

fx typo

* remove used variables

* reduce lines

fix typo

* resolve confilit
2020-05-02 11:27:03 -07:00
Dean Lee
4857f45d6a simplify drawing circle images (#1445)
* simplify drawing circle images

add static

set default color to 0 0 0 0

remove lines

* fix img_weel_y

* use color macro
2020-05-01 19:16:17 -07:00
Dean Lee
3fe3afeede better ui_draw() (#1432)
* better ui_draw()

* fix missed border

reduce code

remove white line
2020-04-30 12:11:35 -07:00
Dean Lee
b2be607974 replace duplicate codes with variable (#1431)
* eplace duplicate codes with variable

* remove space
2020-04-28 13:44:57 -07:00
ZwX1616
922055f464 orange distracted alert is now continuous (#1412) 2020-04-23 14:15:05 -07:00
Comma Device
d0e0746138 call it vehicle, not panda 2020-04-22 20:30:53 +00:00
Comma Device
4e44ab313e s/athena/connect on sidebar 2020-04-20 20:49:28 +00:00
Dean Lee
3e2e241a38 Remove redundant code (#1361)
* changing the coordinate system only once

* remove white space

* remove white space

* s->scene. to  scene->

* whitespace
2020-04-17 15:59:43 -07:00
Dean Lee
24495a2278 close sensors when it's done (#1367) 2020-04-17 15:52:40 -07:00
ZwX1616
133b1a20b4 RHD support for driver monitoring (#1299) 2020-04-15 16:48:44 -07:00
Dean Lee
ea055d169f assert after nvgCreateImage in ui_nvg_init() (#1360)
* assert after nvgCreateImage

* update apks
2020-04-14 12:27:55 -07:00
Dean Lee
1ecef2c6be add ui_draw_image to reduce code repetition 2020-04-13 15:38:45 -07:00
andyh2
76052865cd offroad/ui: Fix layout bugs (offroad drawing on top, settings open after drive) 2020-04-13 08:53:52 -07:00
Willem Melching
54d8f9c27b ui.cc: use thermald to decide when to go onroad (#1351)
* use thermald to decide when to go onroad

* Check for stopped

* set alert timeout to 0 when going offroad

* set controls seen to false

* Don't mark as seen when already stopped

* Don't process controlsState when stopped

* Needs free

* Small cleanup

* Remove that again

* Process controlsState when started

* Need that back
2020-04-10 16:12:39 -07:00
George Hotz
ef8aaa77b7 Remove bg_thread from ui (#1347)
* remove bg_thread

* debug print app

Co-authored-by: Comma Device <device@comma.ai>
2020-04-09 20:55:54 -07:00
Andy
35b34fb700 offroad/ui: Transparent layout mode and msgq-based layout control (#1337)
* offroadLayout

* replace broadcasts with offroadLayout socket

* apk

* set 'none' layoutstate for transparent offroad

* refactor, hide offroad when vision connected

* apk supporting transparency

* reset layout state when stopping

* apk

* cleanup includes

* permit offroad to mangae sidebar state only when vision disconnected

* apk

* use c-capnp

* always upd

* send that too

* sync layout state with offroad

* apk

* fix regression in onboarding (mock engage green border)

* apk

* bump apks

* simplify event processing

* bump cereal to master

* in case ui exited in a bad state

Co-authored-by: Comma Device <device@comma.ai>
2020-04-09 19:28:11 -07:00
Dean Lee
ee52046957 remove unnecessary nvgLineTo (#1333) 2020-04-08 15:10:42 -07:00
Andy
41bb3ac7ca Sidebar Connectivity Status (#1268)
* store athena connected-at time

* refactor

* deref

* dt import

* Athena status based on last ping time param

* upd test for pingtime

* lower error timeout
2020-04-05 11:06:49 -07:00
Comma Device
6abbda1467 fix background on computer ui 2020-04-01 23:01:17 +00:00
Willem Melching
202a4c2011 Add binary to display text (#1301)
* add binary to display text

* fake text needs status too

* Rename to TextWindow

Co-authored-by: Comma Device <device@comma.ai>
2020-03-31 20:14:26 -07:00
eFini
4311550293 only run system() command when vol has changed (#1148)
* only run system command when vol has changed

* fix indent
2020-03-30 14:41:17 -07:00
eFini
47f17622d9 paint.cc uses color defined in ui.hpp (#1261)
* pain.cc uses color defined in ui.hpp

* use macro
2020-03-27 11:00:42 -07:00
DeanLee
993b0e9427 repace nvgFontFace with nvgFontFaceId (#1279) 2020-03-27 11:00:07 -07:00
George Hotz
f0779d86e4 fix offroad processing events in bg (#1266)
* fix offroad processing events in bg

* first run of ui

* actually, we don't need that at all

Co-authored-by: Comma Device <device@comma.ai>
2020-03-23 14:16:51 -07:00
Comma Device
50d2dc24d2 fix multiline strings in ui_draw_sidebar_metric 2020-03-23 20:11:48 +00:00
Greg Hogan
16ad4bf58b remove storage metric from sidebar (#1254) 2020-03-20 10:35:58 -07:00
Willem Melching
e69e0486ff camerad zmq_poll, also recover from EAGAIN 2020-03-17 13:40:07 -07:00
Willem Melching
a4c94128c2 No logging on EINTR, and log all the errnos 2020-03-16 14:58:21 -07:00
Willem Melching
439b4625b6 Add logging to poll EINTR handling, add another catch in camerad/main.cc 2020-03-16 14:55:12 -07:00