From 2f4f0a7c16f07922a1f1ceddae275e08db51d2be Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Thu, 18 Apr 2024 16:50:34 -0400 Subject: [PATCH] display message when forced offroad --- common/params.cc | 1 + selfdrive/thermald/thermald.py | 1 + 2 files changed, 2 insertions(+) diff --git a/common/params.cc b/common/params.cc index ccfb3a7ae2..b683609194 100644 --- a/common/params.cc +++ b/common/params.cc @@ -323,6 +323,7 @@ std::unordered_map keys = { {"VisionCurveLaneless", PERSISTENT | BACKUP}, {"VwAccType", PERSISTENT | BACKUP}, {"VwCCOnly", PERSISTENT | BACKUP}, + {"Offroad_ForceStatus", PERSISTENT}, {"Offroad_SupersededUpdate", PERSISTENT}, {"SunnylinkCache_Users", PERSISTENT}, diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 10ab1198a3..0a79b23da8 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -311,6 +311,7 @@ def thermald_thread(end_event, hw_queue) -> None: # user-forced status startup_conditions["not_force_offroad"] = not params.get_bool("ForceOffroad") + set_offroad_alert("Offroad_ForceStatus", True) # if the temperature enters the danger zone, go offroad to cool down onroad_conditions["device_temp_good"] = thermal_status < ThermalStatus.danger