mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-10 02:03:57 +08:00
Big Tooth & Demos
This commit is contained in:
@@ -607,6 +607,27 @@ launch_python_ui() {
|
||||
UI_PIDS+=("$!")
|
||||
}
|
||||
|
||||
configure_bluetooth_demo() {
|
||||
case " ${UI_TARGETS[*]-} " in
|
||||
*" c3 "*|*" c4 "*)
|
||||
local fake_bluetooth="${SP_ONROAD_FAKE_BLUETOOTH:-}"
|
||||
if [[ -z "${fake_bluetooth}" ]]; then
|
||||
case " ${UI_TARGETS[*]-} " in
|
||||
" c3 ") fake_bluetooth="${SP_C3_FAKE_BLUETOOTH:-1}" ;;
|
||||
" c4 ") fake_bluetooth="${SP_C4_FAKE_BLUETOOTH:-1}" ;;
|
||||
*) fake_bluetooth=1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if env_var_truthy "${fake_bluetooth}"; then
|
||||
export SP_ALLOW_DESKTOP_FAKE_BLUETOOTH=1
|
||||
else
|
||||
export SP_ALLOW_DESKTOP_FAKE_BLUETOOTH=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
launch_control_bar() {
|
||||
local watch_pids="${UI_PIDS[*]}"
|
||||
(
|
||||
@@ -674,6 +695,8 @@ if [[ "${REPLAY_ONLY}" != "1" && ${#UI_TARGETS[@]} -eq 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
configure_bluetooth_demo
|
||||
|
||||
echo "Preparing replay and desktop UI runtime..."
|
||||
|
||||
build_replay
|
||||
|
||||
@@ -55,6 +55,11 @@ export SKIP_FW_QUERY=1
|
||||
export USE_WEBCAM=1
|
||||
export PRIME_TYPE="${PRIME_TYPE:-0}"
|
||||
export SP_C3_FAKE_DRIVE_STATS="${SP_C3_FAKE_DRIVE_STATS:-1}"
|
||||
if [[ "${SP_C3_FAKE_BLUETOOTH:-1}" =~ ^(1|true|yes|on)$ ]]; then
|
||||
export SP_ALLOW_DESKTOP_FAKE_BLUETOOTH=1
|
||||
else
|
||||
export SP_ALLOW_DESKTOP_FAKE_BLUETOOTH=0
|
||||
fi
|
||||
|
||||
backup_dir="$(mktemp -d /tmp/starpilot_c3_ui_backup.XXXXXX)"
|
||||
backup_manifest="${backup_dir}/.artifact_manifest"
|
||||
|
||||
Reference in New Issue
Block a user