mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
Disable Logging
This commit is contained in:
@@ -64,19 +64,21 @@ def and_(*fns):
|
|||||||
return lambda *args: operator.and_(*(fn(*args) for fn in fns))
|
return lambda *args: operator.and_(*(fn(*args) for fn in fns))
|
||||||
|
|
||||||
# FrogPilot variables
|
# FrogPilot variables
|
||||||
|
def allow_logging(started: bool, params: Params, CP: car.CarParams, frogpilot_toggles: SimpleNamespace) -> bool:
|
||||||
|
return not frogpilot_toggles.no_logging
|
||||||
|
|
||||||
procs = [
|
procs = [
|
||||||
DaemonProcess("manage_athenad", "system.athena.manage_athenad", "AthenadPid"),
|
DaemonProcess("manage_athenad", "system.athena.manage_athenad", "AthenadPid"),
|
||||||
|
|
||||||
NativeProcess("loggerd", "system/loggerd", ["./loggerd"], logging),
|
NativeProcess("loggerd", "system/loggerd", ["./loggerd"], and_(allow_logging, logging)),
|
||||||
NativeProcess("encoderd", "system/loggerd", ["./encoderd"], only_onroad),
|
NativeProcess("encoderd", "system/loggerd", ["./encoderd"], and_(allow_logging, only_onroad)),
|
||||||
NativeProcess("stream_encoderd", "system/loggerd", ["./encoderd", "--stream"], notcar),
|
NativeProcess("stream_encoderd", "system/loggerd", ["./encoderd", "--stream"], notcar),
|
||||||
PythonProcess("logmessaged", "system.logmessaged", always_run),
|
PythonProcess("logmessaged", "system.logmessaged", always_run),
|
||||||
|
|
||||||
NativeProcess("camerad", "system/camerad", ["./camerad"], driverview, enabled=not WEBCAM),
|
NativeProcess("camerad", "system/camerad", ["./camerad"], driverview, enabled=not WEBCAM),
|
||||||
PythonProcess("webcamerad", "tools.webcam.camerad", driverview, enabled=WEBCAM),
|
PythonProcess("webcamerad", "tools.webcam.camerad", driverview, enabled=WEBCAM),
|
||||||
PythonProcess("proclogd", "system.proclogd", only_onroad, enabled=platform.system() != "Darwin"),
|
PythonProcess("proclogd", "system.proclogd", and_(allow_logging, only_onroad), enabled=platform.system() != "Darwin"),
|
||||||
PythonProcess("journald", "system.journald", only_onroad, platform.system() != "Darwin"),
|
PythonProcess("journald", "system.journald", and_(allow_logging, only_onroad), platform.system() != "Darwin"),
|
||||||
PythonProcess("micd", "system.micd", iscar),
|
PythonProcess("micd", "system.micd", iscar),
|
||||||
PythonProcess("timed", "system.timed", always_run, enabled=not PC),
|
PythonProcess("timed", "system.timed", always_run, enabled=not PC),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user