thermald: adjust offroad danger temp (#28524)

pull/27919/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent 77c9d65a71
commit 692bfa55c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      selfdrive/thermald/thermald.py

@ -48,7 +48,7 @@ THERMAL_BANDS = OrderedDict({
}) })
# Override to highest thermal band when offroad and above this temp # Override to highest thermal band when offroad and above this temp
OFFROAD_DANGER_TEMP = 79.5 OFFROAD_DANGER_TEMP = 77
prev_offroad_states: Dict[str, Tuple[bool, Optional[str]]] = {} prev_offroad_states: Dict[str, Tuple[bool, Optional[str]]] = {}
@ -261,8 +261,8 @@ def thermald_thread(end_event, hw_queue):
is_offroad_for_5_min = (started_ts is None) and ((not started_seen) or (off_ts is None) or (sec_since_boot() - off_ts > 60 * 5)) is_offroad_for_5_min = (started_ts is None) and ((not started_seen) or (off_ts is None) or (sec_since_boot() - off_ts > 60 * 5))
if is_offroad_for_5_min and offroad_comp_temp > OFFROAD_DANGER_TEMP: if is_offroad_for_5_min and offroad_comp_temp > OFFROAD_DANGER_TEMP:
# If device is offroad we want to cool down before going onroad # if device is offroad and already hot without the extra onroad load,
# since going onroad increases load and can make temps go over 107 # we want to cool down first before increasing load
thermal_status = ThermalStatus.danger thermal_status = ThermalStatus.danger
else: else:
current_band = THERMAL_BANDS[thermal_status] current_band = THERMAL_BANDS[thermal_status]

Loading…
Cancel
Save