Commit Graph

1106 Commits (master)

Author SHA1 Message Date
Dean Lee 6e25ae9798
DevicePanel: fix dangling reference to params (#23154) 2021-12-07 10:41:41 -08:00
Willem Melching 2e0c73fc0c
Remove Raw Upload toggle (#23143)
* Remove Raw Upload toggle

* fix tests
2021-12-07 11:25:40 +01:00
Comma Device 20dc4df024 fix UI build on comma two 2021-12-06 14:34:20 -08:00
Dean Lee 20f571db3c
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
2021-12-06 14:02:39 -08:00
Willem Melching 790a64af90
nav: open map on new route without valid OpenGL context (#23140) 2021-12-06 13:50:42 +01:00
Dean Lee 8545901c0c
UI: draw header gradient in OnroadHud (#23137) 2021-12-05 21:06:47 -08:00
Comma Device cc1699707f fix sound test 2021-12-05 13:33:12 -08:00
Dean Lee 5ab6bff670
OnroadHud: update engageability and DM icons at 2Hz (#23134) 2021-12-05 12:54:35 -08:00
Dean Lee ad09507e1b
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>
2021-12-04 23:02:10 -08:00
grekiki 6951b3271d
Python: Replace more lists with generators (#23116)
* Replace lists with generators v2

* Replace set with {}

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

* Replace more set() with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-03 22:57:19 -08:00
Adeeb Shihadeh 37e2de2244
soundd: fix test for repeating soundsgitt status (#23110)
Co-authored-by: Comma Device <device@comma.ai>
2021-12-02 19:55:19 -08:00
Dean Lee 35885745f1
soundd: use setLoopCount(0) to stop repeating sound (#23076)
* use setLoopCount(0) to stop sound

* print default backend name
2021-12-02 16:40:10 -08:00
Adeeb Shihadeh bc4ae3f587 soundd: max volume at 20m/s 2021-12-02 13:53:00 -08:00
Dean Lee 8c6242888c
CameraView: use unique_ptr for CameraView::program (#23096) 2021-12-02 13:37:49 -08:00
Cosmo Borsky faecf4e4c1
keyboard: replace backtick with apostrophe (#23104)
* Replace existing symbol with apostrophe

Without `'`, I cannot type my WiFi password... though it might be time
to rotate it.

* Replace extra bactic with apostrophe

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

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-02 01:23:59 -08:00
Adeeb Shihadeh 3b367e6872
Newer sounds (#23091)
* new prompt sound

* padding

* prompt distracted

* debug

* fix spelling

* lower min volume

* better volume at low speeds

* revert debug

* revert that

* fix tests

* update refs

Co-authored-by: Comma Device <device@comma.ai>
2021-12-02 00:28:25 -08:00
Adeeb Shihadeh e679d05d9e
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>
2021-11-30 19:47:33 -08:00
Dean Lee eb0724d7e3
soundd: fix test case (#23075)
* init sound_stats

* send deviceState msg
2021-11-30 11:31:46 -08:00
Dean Lee 348d2d2b0d
rename yuv streams (#23071)
* rename yuv streams

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-29 18:14:59 -08:00
Dean Lee b2bcacf590
ui: singleton networkAccessManager (#22994) 2021-11-29 14:49:53 +01:00
Dean Lee dbec761941
logreader: support reading from corrupt log (#23050)
* catch exception outside loop

* print decompress error

* add test case for corrupt log

* fix decompressbz2 stuck if log is corrupt

* recovered from corrupt data

* add output

* ass space

* std::endl

* override load(), load from buffer

* override FrameReader::load to load from the buffer

* replace NULL with nullptr

* fix test case for corrupt log

* Trigger Build

* check bzerror too

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-29 14:10:24 +01:00
Dean Lee 296c4076a2
framereader: refactor seeking (#22926)
* refactor seeking

* ckeck packets.empty()

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-29 12:09:14 +01:00
Dean Lee 00db14af64
cameraview: fix frameskip (#23022)
* fix frameskip

* sync upload->render

* cleanup

* comment

* rename to latest_texture_id
2021-11-29 11:35:34 +01:00
Dean Lee 3fd0264960
refactor httprequest: emit single signals (#23039)
* refactor httprequest

* Trigger Build
2021-11-29 11:19:08 +01:00
Dean Lee 5394fe1ae7
DevicePanel: split long constructor into multiple functions (#23043)
* begin refactor

* split long constructor to multiple functions

* one connection to signal

* merge master
2021-11-29 11:14:34 +01:00
Dean Lee f5e4867864
replay: refactor http download (#23052)
* refactor http download

* use chunk_size instead of parts

testcase:set chunksize to 5mb

* use template

space

* cleanup

* remove unused include

* check buffer overfllow

* simplify print download speed
2021-11-29 11:13:30 +01:00
Dean Lee a449b856ca
framereader: fix crash after fallback to cpu decoding (#23055) 2021-11-28 13:29:40 -08:00
Dean Lee e376a621ba
ui/device: change last_brightness from float to int (#23029) 2021-11-26 14:59:23 +01:00
Dean Lee 5ae5174509
framereader: replace swscale with libyuv, reduce cpu usage by half (#22992)
* use libyuv

* cleanup
2021-11-26 14:41:14 +01:00
Dean Lee ac179e2c36
qt/settings: reuse params (#23041) 2021-11-26 14:39:25 +01:00
Dean Lee 723c8d6a7c
qt/settings: use default parameter for params.get (#23042) 2021-11-26 14:39:04 +01:00
Willem Melching 5069852573
navd: render map into VisionIPC (#22800)
* navd: render simple map

* render route

* offscreen rendering

* cleanup

* more cleanup

* render into visionIPC

* rename class

* split position update from route update

* stop broadcast if not active

* gate vipc server behind flag

* add python library

* faster

* no vipc from python

* put behind extras

* only send when loaded

* add glFlush just to be sure

* cleanup settings into helper function

* function ordering

* broadcast thumbnails

* put behind param

* adjust zoom level

* add route to python bindings

* revert that freq change

* add logging if map rendering is enabled

* use rlogs if available

* bump cereal
2021-11-26 14:38:02 +01:00
eFini 21ff97b8c9
UI: minor changes to make it translation friendly (#23032) 2021-11-25 22:30:07 -08:00
Dean Lee 6964adec39
networking: remove unused #inculde<QMovie> (#23016) 2021-11-23 15:24:28 -08:00
Dean Lee c1f617db46
UI: fix cameraview crash after going offroad in settings window (#23009) 2021-11-22 21:46:46 -08:00
Dean Lee aa0cc260b9
wifiManager/get_response: pass response by const reference (#22997) 2021-11-20 20:19:43 -08:00
Dean Lee 1d2dfab81c
replay: add test to check dcam and ecam (#22993) 2021-11-20 18:56:27 -08:00
Dean Lee 9cb46cc4a1
logreader: fix memory leak in Event (#22987) 2021-11-20 11:12:52 +01:00
Dean Lee b399b48f0a
ui/settingswindow: set parent for nav_btns. (#22984) 2021-11-19 20:40:46 -08:00
Dean Lee 7ce9ff1b04
ui/device: fix uninitialized variable awake (#22983) 2021-11-19 20:40:29 -08:00
Dean Lee 63779c385d
ui: disable toggles while onroad (#22975)
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-18 21:45:40 -08:00
Cameron Clough 140c7f430c
api: send User-Agent on network requests (#22965)
* api: set User-Agent on network requests

The format of the User-Agent header matches the format in `common/api/__init__.py`.

Closes #22954.

* Update selfdrive/ui/qt/util.cc

* fix parentheses

* refactor into function

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-18 15:53:21 +01:00
eFini 52c4ab73a9
nav: flip instruction images for RHD (#22877)
* nav instruction icon for rhd

* we dont need rhd for active direction

* define suffix as constant

* ps version icon

* reflect icon instead

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-18 14:14:41 +01:00
Dean Lee ddea21e648
replay: fix swsscale crash on nv12->yuv conversion (#22961) 2021-11-17 20:04:45 -08:00
Adeeb Shihadeh f2a81309e1 Revert "Revert "Fix build failures in Ubuntu 21.10 (#22952)""
This reverts commit 5e2570dc75.
2021-11-17 13:46:38 -08:00
Adeeb Shihadeh 5e2570dc75 Revert "Fix build failures in Ubuntu 21.10 (#22952)"
This reverts commit 61f9b3e653.
2021-11-17 11:40:17 -08:00
Jason Shuler 61f9b3e653
Fix build failures in Ubuntu 21.10 (#22952)
* Fix compile on Ubuntu 21.10

* Add missing c++17 optional refs in ui
2021-11-17 18:59:36 +01:00
Willem Melching 372b0f10da Revert "cameraview: remove glflush, reduce C3 CPU usage (#22949)"
This reverts commit 33b1b94067.
2021-11-17 16:22:25 +01:00
Dean Lee 33b1b94067
cameraview: remove glflush, reduce C3 CPU usage (#22949)
* remove glflush

* revert cpu
2021-11-17 15:37:45 +01:00
sshane fa55dbe983
ui: draw all radard leads (#22901)
* draw leads detected from radar since it has a low speed override

* comment

* fill lead_verticies

* fix

* Revert changes

Revert "fix"

This reverts commit 7a478c435a0913e09512801309cf52654f3e17ac.

Revert "fill lead_verticies"

This reverts commit 5cdf265bb98480413a4a83c093b3e00489ba2f94.

Revert "comment"

This reverts commit 24a8a3fc2beef263909810d828d4e4fb5ea576e8.

Revert "draw leads detected from radar since it has a low speed override"

This reverts commit 4679fa5d16c7e961def9aaa52e92fb7d994a830d.

* Revert "Draw model leads (#21864)"

This commit reverts 276b00ccb8
2021-11-17 14:29:54 +01:00
Dean Lee ddc35826f7
sidebar: dont update states when hidden (#22948) 2021-11-17 14:12:57 +01:00
Dean Lee dc8e23c94b
framereader: remove memory copy overhead for AVIO (#22894)
* no memory copy

* merge master

better
2021-11-17 13:25:40 +01:00
Willem Melching 5648b22833 nav: render at 20fps instead of 10fps 2021-11-17 12:26:17 +01:00
Dean Lee c35ae99927
ui: replace nvg transfrom with QTransform (#21968) 2021-11-17 12:24:37 +01:00
Dean Lee ca88a8769b
watchdog_kick: non-allocating (#22892)
* non-allocating

* unpack

* call kick every second

* cleanup include
2021-11-17 12:02:31 +01:00
Dean Lee 0dcb089254
ui: async uploading texture with PBO (#22843)
* async uploading texture using pbo

* use QOpenglBuffer

space

set usage pattern

share context

continue

* space
2021-11-17 12:01:50 +01:00
Dean Lee 20d3cf1fcb
framereader: support hardware decoding (#22906)
* support hardware accelerated video decoding

* support cuda only

* print decode info

* add yuv flag back

* fix height

* default is cuda

* fallback to CPU decoding

fix memory leak&cleanup

add output
2021-11-17 11:17:59 +01:00
Adeeb Shihadeh 0e35db7c05 UI: fix wrong background on controls unresponsive alert 2021-11-16 13:17:32 -08:00
Dean Lee 9062085043
ui: update params on the show event (#22927) 2021-11-16 12:13:16 -08:00
Willem Melching 9f423a93cd
nav: fix receiving navRoute while map is loading (#22929) 2021-11-16 14:27:38 +01:00
HaraldSchafer c9218a55f3
tici: limit brightness with display uptime (#22918)
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-15 22:11:17 -08:00
Adeeb Shihadeh 2f90f04f8d
UI: fix alert flicker when controlsState not updated (#22921) 2021-11-15 16:27:19 -08:00
Dean Lee 96e6c343e2
ui: only check sensorEvents when offroad (#22893) 2021-11-13 12:06:05 -08:00
Dean Lee c0b9c1f3af
framereader: remove deprecated ffmpeg functions (#22895) 2021-11-13 11:55:04 -08:00
Adeeb Shihadeh ed8e6f857c
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>
2021-11-12 15:04:57 -08:00
Willem Melching 07ff724726
Move shutdown/reboot handling to manager (#22882)
* Move shutdown/reboot handling to manager

* more logging

* check enagaged

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-12 09:10:34 -08:00
Adeeb Shihadeh e528e2e3e2
allow update snoozing (#22876)
* allow update snoozing

* not immediately visible

* dismiss and close

* grey button
2021-11-11 15:32:25 -08:00
Willem Melching 03195b79e6
nav: resend route on ui freeze (#22869) 2021-11-11 17:05:12 +01:00
kernyan 983cc14174
ui: auto scaling on resolution below 1920 x 1080 (#22842)
* ui: resizable on PC by mouse drag

* Revert "ui: resizable on PC by mouse drag"

This reverts commit 56aa8254a2.

* ui: auto scaling on resolution below 1920 x 1080

special case when on PC and screen resolution is exactly 1920 x 1080,
we don't use fixed-sized window to account for taskbar/menubar area

* Update qt_window.cc

set maximum window size

* keep SCALE

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-11 13:25:12 +01:00
Willem Melching 306df7f94f
nav: check valid flag on PositionGeodetic measurement (#22858) 2021-11-11 10:24:10 +01:00
Willem Melching 6ace88a0f1
cache prime status in param (#22850) 2021-11-10 16:05:49 +01:00
eFini 1f106e3725
ui.cc: fix Hardware::TICI() check for screen brightness (#22847) 2021-11-10 10:10:35 +01:00
Adeeb Shihadeh 445a5aaca4
soundd: don't loop controls unresponsive sound infinitely (#22839)
* soundd: don't loop controls unresponsive sound infinitely

* update tests

* actually fix
2021-11-09 16:58:21 -08:00
Dean Lee 797bb1acb0
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 e6bb12abfa.

* return Alert

* cleanup

* remove #include <optional>

* cleanup .gitignore

* revert to std::optional

* Revert "revert to std::optional"

This reverts commit a66291c51f.

* cleanup

* remove volume check

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-09 14:18:29 -08:00
Dean Lee fb8ba34f31
replay: add qcam and YUV flags (#22788)
* common flags

* cleanup

* remove double semicolon

* camera

* apply reviews
2021-11-09 14:08:24 -08:00
Dean Lee 6e5fed63df
UI: do vipc recv in thread (#22354)
* move vipc to thread

* use invokeMethod

* cleanup

* latest_frame = nullptr

* space

* safe quit

* running_-> exit_

* recv timeout 1000

* cleanup

* run in loop

* requestInterruption

* block queue on vipcConnected for thread safety

* cleanup

* remove unused signal updateFrame

* make signals public

* dont emit signal in update

* apply reviews

* cleanup

* little more cleanup

* fix

* use glTexSubImage2D

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-09 13:27:12 -08:00
Dean Lee e29cc1c2ee
util.h: add unit conversion constants (#22813)
* Add unit conversion constants.

* move to common/util.h
2021-11-08 10:19:34 +01:00
Willem Melching 6d9b414c20
soundd: Set volume on receiving carState (#22795) 2021-11-04 21:30:46 -07:00
Dean Lee ff33ca3413
util: remove function to_hex (#22792) 2021-11-04 16:18:01 +01:00
Willem Melching 1289ebe9bd
make soundd exit cleanly (#22794) 2021-11-04 15:50:48 +01:00
Dean Lee dd1531af96
ui/MainWindow: remove emit keyword on slot (#22790) 2021-11-04 14:43:28 +01:00
Willem Melching bef686f275
Move navigation into separate daemon (#22767)
* Add navd folder

* prints route instructions to console

* broadcast NavInstuction without lanes

* show basic instructions and eta

* parse out lane info

* use swaglog

* clip distance on ui side

* draw lane directions

* show route

* add to process config

* add to release files

* small cleanup

* show route without gps

* pop open map on initial route

* fix error messages around no gps

* done

* make persistent process

* handle end of route

* clear route on offroad

* only one timer

* fix layout hacks

* explicit rendering at 20Hz
2021-11-04 14:32:32 +01:00
Adeeb Shihadeh b7394c6171 soundd: use offscreen platform to avoid initialzing gpu stuff 2021-11-03 22:24:12 -07:00
Mayfield 5246f0231e
enable wshadow (#22756)
* enable wshadow (#22714)

* fix replay

* more build fixes

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-02 17:08:53 +01:00
Dean Lee 79651b6c49
replay: fix qcam download error (#22777)
* fix qcam download error

* test loading qlog/qcamera
2021-11-02 11:24:59 +01:00
Dean Lee 09858f7f6f
replay: print colored text (#22771) 2021-11-02 11:24:45 +01:00
Dean Lee 0a5ca71603
replay: fix frame lag when replaying to the next segment (#22773) 2021-11-02 11:24:12 +01:00
Willem Melching f8d050298e framereader.cc: better avformat_open_input error printing 2021-11-02 09:56:49 +01:00
Dean Lee 6f78cc77fc
replay: fix hanging on exit if stream thread has not been started yet (#22770) 2021-11-01 16:06:39 -07:00
Dean Lee 2b4a477fbc
replay: improve segment download and merge (#22654)
* no-cache mode

* fix test cases build error

* space

* don't create cache dir in no-cache mode

* fix errors in test cases

* no_local_cache_

* set the number of connections by chunk_size

* use size_t instead of int64_t

* add test case for no-cache mode

* rename variables

* fix SIGSEGV

* cleanup

* faster decompressBZ2

* always decompress bz2

* add test cases

* prepare for python interface

* fix test cases build error

* continue

* camera_replay: cache remote file

* protected inheritance

* single option name

* TODO

* test_case for LogReader&FrameReader

* fix wrong require

* test case for FileReader

* cleanup test

* test:fix wrong filename

* check cached file's checksum

* fix mkdir permissions err

cleanup filereader

* remove initialize libav network libraries.

dd

* abort all loading if one failed

* cleanup tests

* use threadpool to limit concurrent downloads

* cache more segments

* merge 3 segments for replay

* one segment uses about 100M of memory

* use segments_need_merge.size()

* shutdown

* fix stuck if exit replay  before keyboard thread started

* load one segment at a time

* small cleanup

* cleanup filereader

* space

* tiny cleanup

* merge master

* cleanup test cases

* use util:create_directories

* cleanup framereader
2021-11-01 11:55:56 +01:00
Dean Lee 2773ff5ace
params: code cleanup (#22744)
* cleanup params

* apply review

* continue

* use c_str

* cleanup filelock

* don't check return code of close()

* remove call_once

* cleanup params_pyx

* cleanup comment
2021-11-01 11:22:34 +01:00
Dean Lee 41e5e76596
replay: fixed the alignment issue when replaying from C3 qcamera (#22734)
* fix qcamera replay

* fix alignment in replay

* upscale yuv if needed

* remove space
2021-11-01 11:06:00 +01:00
Willem Melching 25e4e94691
PyQt demo app (#21625)
* build python helpers lib

* call setMainWindow from python

* put in helper lib

* linter

* move to scripts
2021-10-29 12:37:17 +02:00
Dean Lee d70e49dca5
replay: build on devices (#22632)
* there is no QThread::create on device

* add files to files_common

* modify SConscript

* no memory_resouce on device

* #define HAS_MEMORY_RESOURCE

* fix hangs on shutdown

* build on device with the --extra flag

* delete later

* setup -> extras

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-29 12:21:57 +02:00
Dean Lee 921600b95c
framereader: use swscale to handle the YUV conversion (#22710) 2021-10-29 12:14:14 +02:00
Dean Lee 3b936aaca9
remove unused signal displayPowerChanged (#22719) 2021-10-29 12:09:03 +02:00
Adeeb Shihadeh e33cd47b5c UI: add opensans semibold 2021-10-28 13:07:39 -07:00
Willem Melching d4433cc2d8
nav: support multiple banners in route segment (#22722) 2021-10-28 19:11:29 +02:00
Willem Melching 0ba40954b9
maps: allow using MAPBOX_TOKEN env variable (#22721) 2021-10-28 16:13:44 +02:00
Dean Lee 3f4cc9a246
Qt/CommaApi: cache private key (#22715)
* cache private key

* space

* no need to check mtime

* call_once

* simplify
2021-10-27 21:12:00 -07:00
Adeeb Shihadeh 950acb476c
add inter fonts to assets (#22704) 2021-10-26 20:40:09 -07:00
Adeeb Shihadeh 23d6aeb4b7 installer: init submodules for all builds 2021-10-26 20:01:24 -07:00
Adeeb Shihadeh f4c2398db4
add sdcard support (#22703)
* generalize

* factory reset
2021-10-26 19:34:08 -07:00
Willem Melching cca07c0c73
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
2021-10-26 18:59:17 +02:00
Adeeb Shihadeh b5960b9dc8
move nose tests to unittest (#22665)
* move to unittest

* boardd loopback

* no more nose

* phone only

* fix panda decorator
2021-10-25 09:44:04 -07:00
Dean Lee af7dba9250
replay: use an enum for flags (#22635)
* enum flags

* continue

* remove yuv flag for now
2021-10-22 23:28:53 -07:00
Adeeb Shihadeh 7f3904ee8e UI: increase camera view update frequency 2021-10-22 21:11:57 -07:00
Adeeb Shihadeh 84d5adedd8 UI: fix fcc.html when using QRC 2021-10-22 21:04:00 -07:00
Adeeb Shihadeh 4749815419 little sound tester 2021-10-22 17:50:15 -07:00
Adeeb Shihadeh c4de1fef4f
UI: don't block UI on vipc recv (#22644)
* UI: don't block UI on vipc recv

* use a timer

* move that
2021-10-22 14:16:14 -07:00
Dean Lee 317deeae84
replay: improve seeking, queuing segments (#22625)
* improve seeking, queuing segments

* cleanup,init current_segment_ to 0

* use isSegmentLoaded

* remove to isSegmentMerged
2021-10-19 22:23:53 -07:00
Dean Lee 702fc5850c
replay: fix replay looping (#22618) 2021-10-19 12:59:06 -07:00
Dean Lee 107ed35d1e
replay: parse route string, replay from the specified segment (#22503)
* parse segment name

* return 0

* update regexp

* with |

* dd

* use struct

* move to class Route

* refactor loadFromLoacal

* simplify loadFromJson

* cleanup load from server

* const ref
2021-10-19 14:45:07 +02:00
Dean Lee 4678903a61
replay/camera: publish each camera in a separate thread (#22591)
* publish frames in a seperate thread for each camera

* cleanup

* cleanup

* prefetch next frame

* cleanup
2021-10-19 14:39:47 +02:00
Willem Melching e5e90aeae5 replay: improve download prints 2021-10-19 12:48:38 +02:00
Dean Lee 8d1d0c2cd7
replay: improve segment downloading (#22504)
* improve segment downloading

dd

* continue

* log retrying

* check aborting_ in loop

* std::endl

* log download information

* cleanup

* continue

* dd

* move download to seperate funciton

* simplify logging

* continue

* guard ts

* cleanup

* typo
2021-10-19 12:33:12 +02:00
Dean Lee 0189a19b8e
replay: refactor FrameReader (#22438)
* decode from the previous keyframe after seek

* less memory

* some stream seems to contian no keyframes

* test random seek

* merge master

* continue

update test_cases

use fr

* merge master
2021-10-18 14:19:23 -07:00
Dean Lee ccc07db1ee
replay: just load one segment to start replaying (#22598) 2021-10-18 12:03:34 -07:00
Dean Lee 94b3d4d267
replay: allocate events in contiguous memory pool (#22535)
* memory pool

* reserve events too

* remove dctor

* cleanup

* move pool into class LogReader

* cleanup include
2021-10-18 11:10:08 +02:00
Dean Lee f6de10b55a
replay: start streaming after segment loaded (#22575)
* start streaming  after segment loaded

dd

* loop from beginning if reaches the end

* isSegmentLoaded

* one loop

* move to ctor

* delete stream_thread_ on exit

* pause streaming while testing seek

* Revert "one loop"

This reverts commit f029cd118f7ac876dee1dbf2b91478403211ad47.

* test:dummy stream thread

* cleanup

* start thread after vipcserver
2021-10-18 11:05:03 +02:00
Dean Lee c73d9ddaa6
replay: fix hanging on shutdown while downloading (#22592) 2021-10-18 11:03:30 +02:00
Dean Lee 5735d69d47
CameraView: fix possible crash on 'fit in widget' mode (#22594) 2021-10-18 11:02:08 +02:00
Dean Lee 085c424cf9
framereader: remove swscale (#22578) 2021-10-16 13:56:04 -07:00
lipniak df9492d1e1
UI: add missing header to fix Ubuntu 21 build (#22577)
Co-authored-by: predicate@bonzo <noreply@example.com>
2021-10-16 13:30:14 -07:00
Comma Device d4b35dc130 installer: fetch all for internal installer 2021-10-16 13:17:51 -07:00
Dean Lee ae5eedb0b1
Replay/framereader: fix c3 qcamera padding problem (#22572) 2021-10-16 12:24:34 -07:00
Dean Lee 47ce0b4cd2
replay: added a missing #include <array> on Mac (#22573) 2021-10-16 09:02:19 -07:00
Dean Lee 20b0ae0e65
replay: fix possible segfault in CameraServer (#22556) 2021-10-15 15:34:54 -07:00
Dean Lee acc52ece20
replay: refactor Route and Segment (#22531)
* new functions

* fix wrong call to qUrl::isLocalFile

* cleanup

* keep extension in cached files

* cleanup

* simplify segment

* delete thread

* add output

* pre-decompress

* remove suffix

* revert remove suffix

* 1 connection for log file

* cleanup

* segment may not be continuous,use map

* don't emit finish if aborting_

* use QFuture and thread pool

* cleanup

* fix segfault in LoadFromLocal

* cleanup

* handle segment failed to load

* output info

* continue error handling

* Remove redundant testSeekTo

* cleanup

* always return true

* keep time is ok now

change to 1s

write 1 byte at the end of the sparse file

* log loading segment

* merge #22476

* Update selfdrive/ui/replay/logreader.cc

* correct connect

* pub message in function

* typo

* Update selfdrive/ui/replay/replay.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-15 14:35:17 -07:00
Dean Lee 3de2cd897b
watch3: fix layout warning (#22566) 2021-10-15 00:28:26 -07:00
ZwX1616 8574e79fec
wider FOV DM on comma three (#22286)
* c3 is straightforward

* c2 transform

* c3 preview

* alpha model

* Revert "alpha model": wrong quantization data

This reverts commit b50e573973.

* yuv looks good

* a55b

* const int

* block top deadzone

* new box alpha curve

* update k

* fix debug

* rhd use same offset

* box shift for rhd

* 7e3e

* set new thresh

* update ref

* explain

* remove e2e

* same metric thresh

* process isocc

* model

* cancel extra policy

* update numbers

* new model

* update cereal

* up cereal

Co-authored-by: Comma Device <device@comma.ai>
2021-10-13 17:00:46 -07:00
Mitchell Goff fd3fdea7b4
Use TICI intrinsics by default on PC (#22546) 2021-10-13 12:44:36 -07:00
Dean Lee 43a846843f
c++ replay: support local routes (#22288)
* support local route

* kind of works

* works

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-12 00:51:22 -07:00
Adeeb Shihadeh ff771d9fcf
add tool to watch all three beautiful cameras (#22528) 2021-10-12 00:23:31 -07:00
Adeeb Shihadeh f1fcf17c4c
replay: support old, pre-pandaStates routes (#22525)
* replay: support old, pre-pandaStates routes

* cleanup
2021-10-11 15:58:44 -07:00
Dean Lee c801c65b9d
replay: get EncoderIndex from capnp::AnyStruct (#22518)
* get EncoderIndex from capnp::AnyStruct

* const
2021-10-11 09:57:35 -07:00
Dean Lee afaf235acd
UI: fix stuck in visionIPC receive timeout (#22450) 2021-10-09 14:43:27 -07:00
Dean Lee 537dff3ae0
replay/camera: fix incorrect console output (#22491) 2021-10-08 19:51:23 -07:00
Comma Device 52cd06aa62 remove semicolon 2021-10-08 12:21:47 -07:00
Willem Melching e788f4f587 installer: leave some space after strings 2021-10-08 11:27:54 -07:00
Adeeb Shihadeh db81bf52ea installer: cleanup old cache paths 2021-10-08 10:42:41 -07:00
Robbe Derks 91987f38d4
Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
2021-10-08 17:54:34 +02:00
Willem Melching d898841e87
Change APN from settings (#22440)
* Change APN from settings

* subtext

* one function

* bring connection down and up

* fix adapter type

* trim input

* fix scrolling in scanning state

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-07 23:47:23 -07:00
Adeeb Shihadeh 5b641379ae
phonelibs -> third_party (#22477)
* git mv to third_party

* find and replace

* fix release tests

* update pre-commit

* update tici bins

* update eon bins

Co-authored-by: Comma Device <device@comma.ai>
2021-10-07 16:32:44 -07:00
Dean Lee 5527736df6
replay: simplify seek&merge (#22463)
* simplify seek&merge

* update test cases

update test cases

* cleanup test cases

* new function currentSeconds

* add TODO

* thread safe publishFrame

* cleanup

* fix 'at x S' not printed if seek back to old time

* exit replay if failed to load route

* move out setCurrentSegment from if statement

* cleanup

* use std::find

* const variables
2021-10-07 17:32:16 +02:00
Greg Hogan 188b634222
replay: print current time when paused (#22468) 2021-10-07 10:41:49 +02:00
Adeeb Shihadeh e424f7182c retry submodule checkout on internal installer 2021-10-06 19:45:22 -07:00
Dean Lee f7cf4be995
repaly: stop publish socket on multiple publishers error (#22449) 2021-10-06 14:04:51 +02:00
Dean Lee 261d51de41
test_replay: temporarily comment out some unit tests (#22447) 2021-10-06 12:27:52 +02:00
Dean Lee b5988d5601
replay: cleanup output (#22434) 2021-10-05 15:15:46 +02:00