mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 18:53:55 +08:00
* 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: 10bd761cd6
54 lines
2.1 KiB
Python
54 lines
2.1 KiB
Python
import os
|
|
Import('env', 'qt_env', 'arch', 'common', 'messaging', 'gpucommon', 'visionipc', 'cereal')
|
|
|
|
|
|
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']
|
|
linkflags = ['-Wl,-rpath=/system/lib64,-rpath=/system/comma/usr/lib']
|
|
|
|
src += ["android/ui.cc", "android/sl_sound.cc"]
|
|
env.Program('_ui', src,
|
|
LINKFLAGS=linkflags,
|
|
LIBS=libs)
|
|
else:
|
|
qt_libs = qt_env["LIBS"] + libs + ["pthread", "ssl", "crypto"]
|
|
|
|
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/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/api.cc", "qt/offroad/settings.cc", "qt/offroad/onboarding.cc"] + src
|
|
|
|
qt_env.Program("_ui", qt_src, LIBS=qt_libs)
|
|
|
|
# spinner and text window
|
|
qt_env.Program("qt/text", ["qt/text.cc"], LIBS=qt_libs)
|
|
qt_env.Program("qt/spinner", ["qt/spinner.cc"], LIBS=qt_libs)
|
|
|
|
# build setup, factory resetter, and installer
|
|
if "BUILD_SETUP" in os.environ:
|
|
qt_env.Program("qt/setup/reset", ["qt/setup/reset.cc"], LIBS=qt_libs)
|
|
qt_env.Program("qt/setup/setup", ["qt/setup/setup.cc"], LIBS=qt_libs + ['curl', 'common'])
|
|
|
|
installers = [
|
|
("openpilot", "master"),
|
|
("openpilot_test", "master"),
|
|
#("dashcam", "dashcam"),
|
|
#("dashcam_test", "dashcam"),
|
|
]
|
|
for name, branch in installers:
|
|
flags = qt_env["CXXFLAGS"] + [f"-D{branch}"]
|
|
qt_env.Program(f"qt/setup/installer_{name}", ["qt/setup/installer.cc"], LIBS=qt_libs)
|