Fix fan control when not plugged into panda

old-commit-hash: 3c6d8846ac
commatwo_master
Willem Melching 6 years ago
parent 4a716af03f
commit 1789bc5126
  1. 3
      selfdrive/thermald.py

@ -189,8 +189,7 @@ def thermald_thread():
max_comp_temp = max(max_cpu_temp, msg.thermal.mem / 10., msg.thermal.gpu / 10.)
bat_temp = msg.thermal.bat/1000.
if health is not None:
if health.health.hwType == log.HealthData.HwType.uno:
if health is not None and health.health.hwType == log.HealthData.HwType.uno:
fan_speed = handle_fan_uno(max_cpu_temp, bat_temp, fan_speed)
else:
fan_speed = handle_fan_eon(max_cpu_temp, bat_temp, fan_speed)

Loading…
Cancel
Save