Qt offroad: pairing (#19675)

* kind of works now

* QR code is now on screen

* testing is needed

* works, waiting for server update

* reduce diff

* refactoring part1

* refactor part2

* refactor part3

* works on PC

* fix build, annoying bug though...

* git is annoying

* more classes, still crashes after a while

* better style

* clearer qr code

* less code and test new ssh key

* no more AA

* rename and collect garbage

* no pairing widget without the internet connection

* No network connection

* more logs

* refactor the network calls

* no more leaking

* works

* cleanup

* spaces

* works on device

* fix merge

* don't run if screen is off

* always initialized

* stats updating, not running without scrren

* formatting

* nicer QR code

* ensure the registration

* no qr code if no IMEI or no HWSerial

* all works

* refactor

* better networking

* all functionality seems to work

* small cleanup

* get serial once

* Small cleanup

* No internet text

* Don't crash if private key not found

* no network should say so

* new qr code every 30 minutes

* 20FPS sidebar

* more responsive networking and QR

* more logs

* no log spam

* fix merge

* no running onroad

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 10bd761cd6fb59f8113f88cc4dc764fbc4f5abf2
This commit is contained in:
grekiki
2021-01-18 12:07:55 +01:00
committed by GitHub
parent e59584fe7c
commit 0c141e45aa
14 changed files with 2079 additions and 176 deletions
+4 -3
View File
@@ -5,7 +5,6 @@ Import('env', 'qt_env', 'arch', 'common', 'messaging', 'gpucommon', 'visionipc',
src = ['ui.cc', 'paint.cc', 'sidebar.cc', '#phonelibs/nanovg/nanovg.c']
libs = [common, 'zmq', 'capnp', 'kj', 'm', 'OpenCL', cereal, messaging, gpucommon, visionipc]
if qt_env is None:
libs += ['EGL', 'GLESv3', 'gnustl_shared', 'log', 'utils', 'gui', 'hardware',
'ui', 'CB', 'gsl', 'adreno_utils', 'OpenSLES', 'cutils', 'uuid', 'OpenCL']
@@ -20,16 +19,18 @@ else:
widgets = qt_env.Library("qt_widgets",
["qt/qt_window.cc", "qt/qt_sound.cc", "qt/widgets/keyboard.cc", "qt/widgets/input_field.cc", "qt/widgets/drive_stats.cc",
"qt/offroad/wifi.cc", "qt/offroad/wifiManager.cc", "qt/widgets/toggle.cc", "qt/widgets/offroad_alerts.cc"],
"qt/offroad/wifi.cc", "qt/offroad/wifiManager.cc", "qt/widgets/toggle.cc", "qt/widgets/offroad_alerts.cc", "qt/widgets/setup.cc", "qt/widgets/QrCode.cc"],
LIBS=qt_libs)
qt_libs.append(widgets)
if arch == "Darwin":
# fix OpenCL
del qt_libs[qt_libs.index('OpenCL')]
qt_env['FRAMEWORKS'] += ['OpenCL']
qt_src = ["qt/ui.cc", "qt/window.cc", "qt/home.cc", "qt/offroad/settings.cc", "qt/offroad/onboarding.cc"] + src
qt_src = ["qt/ui.cc", "qt/window.cc", "qt/home.cc", "qt/api.cc", "qt/offroad/settings.cc", "qt/offroad/onboarding.cc"] + src
qt_env.Program("_ui", qt_src, LIBS=qt_libs)
# spinner and text window