Disable On-Road Upload

This commit is contained in:
Rick Lan
2024-06-19 16:57:10 +08:00
parent ac520a882d
commit 07d5c3ea9f
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -226,6 +226,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"dp_nav_traffic", PERSISTENT},
{"dp_toyota_auto_lock", PERSISTENT},
{"dp_toyota_auto_unlock", PERSISTENT},
{"dp_device_disable_onroad_uploads", PERSISTENT},
};
} // namespace
+1
View File
@@ -58,6 +58,7 @@ def manager_init() -> None:
("dp_nav_traffic", "0"),
("dp_toyota_auto_lock", "0"),
("dp_toyota_auto_unlock", "0"),
("dp_device_disable_onroad_uploads", "0"),
]
if not PC:
default_params.append(("LastUpdateTime", datetime.datetime.now(datetime.UTC).replace(tzinfo=None).isoformat().encode('utf8')))
+3
View File
@@ -7,6 +7,8 @@ from openpilot.system.manager.process import PythonProcess, NativeProcess, Daemo
WEBCAM = os.getenv("USE_WEBCAM") is not None
dp_device_disable_onroad_uploads = Params().get_bool("dp_device_disable_onroad_uploads")
def driverview(started: bool, params: Params, CP: car.CarParams) -> bool:
return started or params.get_bool("IsDriverViewEnabled")
@@ -80,6 +82,7 @@ procs = [
PythonProcess("tombstoned", "system.tombstoned", always_run, enabled=not PC),
PythonProcess("updated", "system.updated.updated", only_offroad, enabled=not PC),
PythonProcess("uploader", "system.loggerd.uploader", always_run),
PythonProcess("uploader", "system.loggerd.uploader", only_offroad if dp_device_disable_onroad_uploads else always_run),
PythonProcess("statsd", "system.statsd", always_run),
# debug procs