diff --git a/selfdrive/common/params.cc b/selfdrive/common/params.cc index b516c4ab00..45eac661b5 100644 --- a/selfdrive/common/params.cc +++ b/selfdrive/common/params.cc @@ -174,6 +174,7 @@ std::unordered_map keys = { {"IsLdwEnabled", PERSISTENT}, {"IsMetric", PERSISTENT}, {"IsOffroad", CLEAR_ON_MANAGER_START}, + {"IsOnroad", PERSISTENT}, {"IsRHD", PERSISTENT}, {"IsTakingSnapshot", CLEAR_ON_MANAGER_START}, {"IsUpdateAvailable", CLEAR_ON_MANAGER_START}, diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 9a3931965f..950b34e8bc 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -171,6 +171,9 @@ def thermald_thread(): thermal_config = HARDWARE.get_thermal_config() + if params.get_bool("IsOnroad"): + cloudlog.event("onroad flag not cleared") + # CPR3 logging if EON: base_path = "/sys/kernel/debug/cpr3-regulator/" @@ -356,6 +359,7 @@ def thermald_thread(): # Handle offroad/onroad transition should_start = all(startup_conditions.values()) if should_start != should_start_prev or (count == 0): + params.put_bool("IsOnroad", should_start) params.put_bool("IsOffroad", not should_start) HARDWARE.set_power_save(not should_start) if TICI and not params.get_bool("EnableLteOnroad"):