don't run ublox procs without ublox (#26965)
* pigeond: don't run if ublox missing * same for ubloxd Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: 6861c9999195a9791bdb31675a4ed07dbd562b9c
This commit is contained in:
@@ -17,6 +17,11 @@ def logging(started, params, CP: car.CarParams) -> bool:
|
||||
run = (not CP.notCar) or not params.get_bool("DisableLogging")
|
||||
return started and run
|
||||
|
||||
def ublox(started, params, CP: car.CarParams) -> bool:
|
||||
use_ublox = os.path.exists('/dev/ttyHS0') and not os.path.exists('/persist/comma/use-quectel-gps')
|
||||
params.put_bool("UbloxAvailable", use_ublox)
|
||||
return started and use_ublox
|
||||
|
||||
procs = [
|
||||
# due to qualcomm kernel bugs SIGKILLing camerad sometimes causes page table corruption
|
||||
NativeProcess("camerad", "system/camerad", ["./camerad"], unkillable=True, callback=driverview),
|
||||
@@ -35,7 +40,6 @@ procs = [
|
||||
NativeProcess("mapsd", "selfdrive/navd", ["./map_renderer"], enabled=False),
|
||||
NativeProcess("navmodeld", "selfdrive/modeld", ["./navmodeld"], enabled=False),
|
||||
NativeProcess("sensord", "selfdrive/sensord", ["./sensord"], enabled=not PC),
|
||||
NativeProcess("ubloxd", "selfdrive/locationd", ["./ubloxd"], enabled=(not PC or WEBCAM)),
|
||||
NativeProcess("ui", "selfdrive/ui", ["./ui"], offroad=True, watchdog_max_dt=(5 if not PC else None)),
|
||||
NativeProcess("soundd", "selfdrive/ui/soundd", ["./soundd"], offroad=True),
|
||||
NativeProcess("locationd", "selfdrive/locationd", ["./locationd"]),
|
||||
@@ -50,7 +54,8 @@ procs = [
|
||||
PythonProcess("navd", "selfdrive.navd.navd"),
|
||||
PythonProcess("pandad", "selfdrive.boardd.pandad", offroad=True),
|
||||
PythonProcess("paramsd", "selfdrive.locationd.paramsd"),
|
||||
PythonProcess("pigeond", "selfdrive.sensord.pigeond", enabled=TICI),
|
||||
NativeProcess("ubloxd", "selfdrive/locationd", ["./ubloxd"], enabled=TICI, onroad=False, callback=ublox),
|
||||
PythonProcess("pigeond", "selfdrive.sensord.pigeond", enabled=TICI, onroad=False, callback=ublox),
|
||||
PythonProcess("plannerd", "selfdrive.controls.plannerd"),
|
||||
PythonProcess("radard", "selfdrive.controls.radard"),
|
||||
PythonProcess("thermald", "selfdrive.thermald.thermald", offroad=True),
|
||||
|
||||
@@ -303,8 +303,7 @@ def main():
|
||||
|
||||
pigeon, pm = create_pigeon()
|
||||
init_baudrate(pigeon)
|
||||
r = initialize_pigeon(pigeon)
|
||||
Params().put_bool("UbloxAvailable", r)
|
||||
initialize_pigeon(pigeon)
|
||||
|
||||
# start receiving data
|
||||
run_receiving(pigeon, pm)
|
||||
|
||||
Reference in New Issue
Block a user