From 85eb16d8ece1dc00f43dc9e2e89dec5461ebb945 Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Fri, 10 May 2024 11:20:15 -0700 Subject: [PATCH] Controls - Device Management - Increase Thermal Safety Limit Allow the device to run at a temperature above comma's recommended thermal limits. --- selfdrive/controls/controlsd.py | 3 ++- system/hardware/hardwared.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index b8daf818e..8b7486c37 100644 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -245,7 +245,8 @@ class Controls: # Create events for temperature, disk space, and memory if self.sm['deviceState'].thermalStatus >= ThermalStatus.red: - self.events.add(EventName.overheat) + if not self.frogpilot_toggles.increase_thermal_limits or self.sm['deviceState'].thermalStatus == ThermalStatus.danger: + self.events.add(EventName.overheat) if self.sm['deviceState'].freeSpacePercent < 7 and not SIMULATION: # under 7% of space free no enable allowed self.events.add(EventName.outOfSpace) diff --git a/system/hardware/hardwared.py b/system/hardware/hardwared.py index 17eaf74e6..bb5d24f98 100755 --- a/system/hardware/hardwared.py +++ b/system/hardware/hardwared.py @@ -309,7 +309,7 @@ def hardware_thread(end_event, hw_queue, frogpilot_toggles) -> None: startup_conditions["not_taking_snapshot"] = not params.get_bool("IsTakingSnapshot") # must be at an engageable thermal band to go onroad - startup_conditions["device_temp_engageable"] = thermal_status < ThermalStatus.red + startup_conditions["device_temp_engageable"] = thermal_status < (ThermalStatus.danger if frogpilot_toggles.increase_thermal_limits else ThermalStatus.red) # ensure device is fully booted startup_conditions["device_booted"] = startup_conditions.get("device_booted", False) or HARDWARE.booted()