Core - allow disable logging

This commit is contained in:
Rick Lan
2025-03-31 10:05:07 +08:00
parent d3bf09f186
commit 22bafb6d2f
4 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"CurrentBootlog", PERSISTENT},
{"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"DisableLogging", PERSISTENT},
{"DisablePowerDown", PERSISTENT},
{"DisableUpdates", PERSISTENT},
{"DisengageOnAccelerator", PERSISTENT},
+7
View File
@@ -68,6 +68,13 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
"../assets/icons/metric.png",
false,
},
{
"DisableLogging",
tr("Disable Logging"),
"",
"../assets/offroad/icon_empty.svg",
true,
},
};
+1
View File
@@ -39,6 +39,7 @@ def manager_init() -> None:
("LanguageSetting", "main_en"),
("OpenpilotEnabledToggle", "1"),
("LongitudinalPersonality", str(log.LongitudinalPersonality.standard)),
("DisableLogging", "0"),
]
if params.get_bool("RecordFrontLock"):
+1 -1
View File
@@ -19,7 +19,7 @@ def iscar(started: bool, params: Params, CP: car.CarParams) -> bool:
return started and not CP.notCar
def logging(started: bool, params: Params, CP: car.CarParams) -> bool:
run = (not CP.notCar) or not params.get_bool("DisableLogging")
run = not params.get_bool("DisableLogging")
return started and run
def ublox_available() -> bool: