Controls - Device Management - Increase Thermal Safety Limit

Allow the device to run at a temperature above comma's recommended thermal limits.
This commit is contained in:
FrogAi
2024-05-10 11:20:15 -07:00
parent 85faa3eeac
commit d9afcfac11
+3
View File
@@ -287,6 +287,9 @@ def hardware_thread(end_event, hw_queue) -> None:
if fan_controller is not None:
msg.deviceState.fanSpeedPercentDesired = fan_controller.update(all_comp_temp, onroad_conditions["ignition"])
if frogpilot_toggles.increase_thermal_limits:
all_comp_temp -= (THERMAL_BANDS[ThermalStatus.danger].min_temp - THERMAL_BANDS[ThermalStatus.red].min_temp)
is_offroad_for_5_min = (started_ts is None) and ((not started_seen) or (off_ts is None) or (time.monotonic() - off_ts > 60 * 5))
if is_offroad_for_5_min and offroad_comp_temp > OFFROAD_DANGER_TEMP:
# if device is offroad and already hot without the extra onroad load,