mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
Mapbox widget (#20751)
* squash mapbox stuff * only hacks for pc * no hack there * only update when needed * get destination from param * no need for user agent * add athena method * change nav path color * layout cleanups * margin top * add build scripts * rename header file * set pitch * fix icon blinking * keep both options * draw on top to fix last blinking * only recomput with gps * fix include * put map in onroadwidget * update mapbox plugin to allow specifying directions url * cycle through views * dynamic resize * only when present * add map_helpers * whitespace * small fixes * let scons decide * update setup files * implicit dependency * fix alerts * Update selfdrive/ui/SConscript * move clearLayout to util.h * only build when map.cc present * move maps to own folder Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: 86aefbe7667f0693402c1883d286ce331e9d6215
This commit is contained in:
@@ -4,9 +4,17 @@ Import('qt_env', 'arch', 'common', 'messaging', 'gpucommon', 'visionipc',
|
||||
|
||||
base_libs = [gpucommon, common, messaging, cereal, visionipc, transformations, 'zmq',
|
||||
'capnp', 'kj', 'm', 'OpenCL', 'ssl', 'crypto', 'pthread'] + qt_env["LIBS"]
|
||||
|
||||
maps = arch in ['larch64', 'x86_64'] and \
|
||||
os.path.exists(File("qt/maps/map.cc").srcnode().abspath)
|
||||
|
||||
if arch == 'aarch64':
|
||||
base_libs += ['log', 'utils', 'gui', 'ui', 'CB', 'gsl', 'adreno_utils', 'cutils', 'uuid']
|
||||
|
||||
if maps and arch in ['x86_64']:
|
||||
rpath = [Dir(f"#phonelibs/mapbox-gl-native-qt/{arch}").srcnode().abspath]
|
||||
qt_env["RPATH"] += rpath
|
||||
|
||||
if arch == "Darwin":
|
||||
del base_libs[base_libs.index('OpenCL')]
|
||||
qt_env['FRAMEWORKS'] += ['OpenCL']
|
||||
@@ -16,9 +24,15 @@ widgets_src = ["qt/widgets/input.cc", "qt/widgets/drive_stats.cc",
|
||||
"qt/widgets/offroad_alerts.cc", "qt/widgets/setup.cc", "qt/widgets/keyboard.cc",
|
||||
"qt/widgets/scrollview.cc", "#phonelibs/qrcode/QrCode.cc", "qt/api.cc",
|
||||
"qt/request_repeater.cc"]
|
||||
|
||||
if arch != 'aarch64':
|
||||
widgets_src += ["qt/offroad/networking.cc", "qt/offroad/wifiManager.cc"]
|
||||
|
||||
if maps:
|
||||
base_libs += ['qmapboxgl']
|
||||
widgets_src += ["qt/maps/map_helpers.cc", "qt/maps/map.cc"]
|
||||
qt_env['CPPDEFINES'] = ["ENABLE_MAPS"]
|
||||
|
||||
widgets = qt_env.Library("qt_widgets", widgets_src, LIBS=base_libs)
|
||||
qt_libs = [widgets] + base_libs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user