Disable Uploads

This commit is contained in:
James
2025-12-01 12:00:00 -07:00
parent b7db0c72ec
commit 999af5d1fb
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -260,7 +260,8 @@ def main(exit_event: threading.Event = None) -> None:
sm.update(0)
offroad = params.get_bool("IsOffroad")
network_type = sm['deviceState'].networkType if not force_wifi else NetworkType.wifi
if network_type == NetworkType.none:
at_home = offroad and network_type in (NetworkType.ethernet, NetworkType.wifi)
if network_type == NetworkType.none or not at_home and frogpilot_toggles.no_onroad_uploads:
if allow_sleep:
time.sleep(60 if offroad else 5)
continue
+4 -1
View File
@@ -67,6 +67,9 @@ def and_(*fns):
def allow_logging(started: bool, params: Params, CP: car.CarParams, frogpilot_toggles: SimpleNamespace) -> bool:
return not frogpilot_toggles.no_logging
def allow_uploads(started: bool, params: Params, CP: car.CarParams, frogpilot_toggles: SimpleNamespace) -> bool:
return not frogpilot_toggles.no_uploads or frogpilot_toggles.no_onroad_uploads
procs = [
DaemonProcess("manage_athenad", "system.athena.manage_athenad", "AthenadPid"),
@@ -109,7 +112,7 @@ procs = [
PythonProcess("hardwared", "system.hardware.hardwared", always_run),
PythonProcess("tombstoned", "system.tombstoned", always_run, enabled=not PC),
PythonProcess("updated", "system.updated.updated", always_run, enabled=not PC),
PythonProcess("uploader", "system.loggerd.uploader", always_run),
PythonProcess("uploader", "system.loggerd.uploader", allow_uploads),
PythonProcess("statsd", "system.statsd", always_run),
PythonProcess("feedbackd", "selfdrive.ui.feedback.feedbackd", only_onroad),