Disable uploading while onroad
Added toggle to disable uploading to connect.comma.ai while driving and without a WiFi connection to prevent large amounts of data usage.
This commit is contained in:
2
selfdrive/manager/manager.py
Executable file → Normal file
2
selfdrive/manager/manager.py
Executable file → Normal file
@@ -334,7 +334,7 @@ def manager_cleanup() -> None:
|
||||
|
||||
|
||||
def update_frogpilot_params(params, params_memory):
|
||||
keys = []
|
||||
keys = ["DisableOnroadUploads"]
|
||||
for key in keys:
|
||||
params_memory.put_bool(key, params.get_bool(key))
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ def only_offroad(started, params, params_memory, CP: car.CarParams) -> bool:
|
||||
return not started
|
||||
|
||||
# FrogPilot functions
|
||||
def allow_uploads(started, params, params_memory, CP: car.CarParams) -> bool:
|
||||
at_home = not started or not params_memory.get_bool("DisableOnroadUploads")
|
||||
return at_home
|
||||
|
||||
procs = [
|
||||
DaemonProcess("manage_athenad", "selfdrive.athena.manage_athenad", "AthenadPid"),
|
||||
@@ -81,7 +84,7 @@ procs = [
|
||||
PythonProcess("thermald", "selfdrive.thermald.thermald", always_run),
|
||||
PythonProcess("tombstoned", "selfdrive.tombstoned", always_run, enabled=not PC),
|
||||
PythonProcess("updated", "selfdrive.updated", only_offroad, enabled=not PC),
|
||||
PythonProcess("uploader", "system.loggerd.uploader", always_run),
|
||||
PythonProcess("uploader", "system.loggerd.uploader", allow_uploads),
|
||||
PythonProcess("statsd", "selfdrive.statsd", always_run),
|
||||
|
||||
# debug procs
|
||||
|
||||
Reference in New Issue
Block a user