mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
GPS over phone bluetooth
This commit is contained in:
@@ -129,6 +129,12 @@ def bluetooth_enabled(started: bool, params: Params, CP: car.CarParams, starpilo
|
||||
return params.get_bool("BluetoothEnabled")
|
||||
|
||||
|
||||
def phone_gps_enabled(started: bool, params: Params, CP: car.CarParams, starpilot_toggles: SimpleNamespace) -> bool:
|
||||
# Onroad only: the fallback only matters while driving, and offroad it would be opening links to the
|
||||
# phone while bluetooth_managerd is scanning or pairing.
|
||||
return started and params.get_bool("BluetoothEnabled")
|
||||
|
||||
|
||||
def soundd_run(started: bool, params: Params, CP: car.CarParams, starpilot_toggles: SimpleNamespace) -> bool:
|
||||
return driverview(started, params, CP, starpilot_toggles) or params.get_bool("BluetoothAudioTestActive")
|
||||
|
||||
@@ -212,6 +218,7 @@ procs = [
|
||||
# StarPilot variables
|
||||
procs += [
|
||||
PythonProcess("bluetooth_managerd", "starpilot.system.bluetooth.daemon", bluetooth_enabled, enabled=TICI),
|
||||
PythonProcess("phone_gpsd", "starpilot.system.bluetooth.phone_gps", phone_gps_enabled, enabled=TICI, nice=10),
|
||||
PythonProcess("wheel_controlsd", "starpilot.system.wheel_controls.wheel_controlsd", wheel_controls_enabled, enabled=TICI, nice=19),
|
||||
PythonProcess("the_galaxy", "starpilot.system.the_galaxy.the_galaxy", always_run, nice=10),
|
||||
PythonProcess("galaxy", "starpilot.system.galaxy.galaxy", always_run, nice=10),
|
||||
|
||||
Reference in New Issue
Block a user