don't show unspported alert with no health packet

old-commit-hash: 30112f9addccf8c4ae7e32f608fd845bda0985fa
This commit is contained in:
Adeeb Shihadeh
2020-11-08 15:22:27 -08:00
parent 8fd79f63f1
commit 46519c7eb4
+3 -2
View File
@@ -365,8 +365,9 @@ def thermald_thread():
set_offroad_alert_if_changed("Offroad_TemperatureTooHigh", (not startup_conditions["device_temp_good"]))
should_start = all(startup_conditions.values())
startup_conditions["hardware_supported"] = health is not None and health.health.hwType not in [log.HealthData.HwType.whitePanda, log.HealthData.HwType.greyPanda]
set_offroad_alert_if_changed("Offroad_HardwareUnsupported", not startup_conditions["hardware_supported"])
startup_conditions["hardware_supported"] = health is not None and health.health.hwType not in [log.HealthData.HwType.whitePanda,
log.HealthData.HwType.greyPanda]
set_offroad_alert_if_changed("Offroad_HardwareUnsupported", health is not None and not startup_conditions["hardware_supported"])
if should_start:
if not should_start_prev: