Disable logging

This commit is contained in:
Rick Lan
2024-06-24 13:27:09 +08:00
parent 642fbe4a34
commit 78dae96c4b
3 changed files with 11 additions and 7 deletions
+1
View File
@@ -229,6 +229,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"dp_lat_lane_change_assist_speed", PERSISTENT},
{"dp_lat_lane_change_assist_auto_timer", PERSISTENT},
{"dp_lat_road_edge_detection", PERSISTENT},
{"dp_device_disable_logging", PERSISTENT},
};
} // namespace
+1
View File
@@ -68,6 +68,7 @@ def manager_init() -> None:
("dp_lat_lane_change_assist_speed", "32"),
("dp_lat_lane_change_assist_auto_timer", "1.5"),
("dp_lat_road_edge_detection", "0"),
("dp_device_disable_logging", "0"),
]
if not PC:
default_params.append(("LastUpdateTime", datetime.datetime.now(datetime.UTC).replace(tzinfo=None).isoformat().encode('utf8')))
+9 -7
View File
@@ -43,20 +43,23 @@ def only_onroad(started: bool, params, CP: car.CarParams) -> bool:
def only_offroad(started, params, CP: car.CarParams) -> bool:
return not started
def dp_logging(started, params, CP: car.CarParams) -> bool:
return not params.get_bool("dp_device_disable_logging") and logging(started, params, CP)
procs = [
DaemonProcess("manage_athenad", "system.athena.manage_athenad", "AthenadPid"),
NativeProcess("camerad", "system/camerad", ["./camerad"], driverview),
NativeProcess("logcatd", "system/logcatd", ["./logcatd"], only_onroad),
NativeProcess("proclogd", "system/proclogd", ["./proclogd"], only_onroad),
PythonProcess("logmessaged", "system.logmessaged", always_run),
NativeProcess("logcatd", "system/logcatd", ["./logcatd"], dp_logging),
NativeProcess("proclogd", "system/proclogd", ["./proclogd"], dp_logging),
PythonProcess("logmessaged", "system.logmessaged", dp_logging),
PythonProcess("micd", "system.micd", iscar),
PythonProcess("timed", "system.timed", always_run, enabled=not PC),
PythonProcess("dmonitoringmodeld", "selfdrive.modeld.dmonitoringmodeld", driverview, enabled=(not PC or WEBCAM)),
NativeProcess("encoderd", "system/loggerd", ["./encoderd"], only_onroad),
NativeProcess("encoderd", "system/loggerd", ["./encoderd"], dp_logging),
NativeProcess("stream_encoderd", "system/loggerd", ["./encoderd", "--stream"], notcar),
NativeProcess("loggerd", "system/loggerd", ["./loggerd"], logging),
NativeProcess("loggerd", "system/loggerd", ["./loggerd"], dp_logging),
NativeProcess("modeld", "selfdrive/modeld", ["./modeld"], only_onroad),
NativeProcess("sensord", "system/sensord", ["./sensord"], only_onroad, enabled=not PC),
NativeProcess("ui", "selfdrive/ui", ["./ui"], always_run, watchdog_max_dt=(5 if not PC else None)),
@@ -79,8 +82,7 @@ procs = [
PythonProcess("radard", "selfdrive.controls.radard", only_onroad),
PythonProcess("hardwared", "system.hardware.hardwared", always_run),
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("updated", "system.updated.updated", only_offroad, enabled=not PC),
PythonProcess("uploader", "system.loggerd.uploader", only_offroad if dp_device_disable_onroad_uploads else always_run),
PythonProcess("statsd", "system.statsd", always_run),