diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 6cbb8ee89d..113ffaa04c 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -251,10 +251,11 @@ def thermald_thread(end_event, hw_queue): msg = read_thermal(thermal_config) if sm.updated['pandaStates'] and len(pandaStates) > 0: - pandaState = pandaStates[0] - if pandaState.pandaType != log.PandaState.PandaType.unknown: - onroad_conditions["ignition"] = pandaState.ignitionLine or pandaState.ignitionCan + # Set ignition based on any panda connected + onroad_conditions["ignition"] = any(ps.ignitionLine or ps.ignitionCan for ps in pandaStates if ps.pandaType != log.PandaState.PandaType.unknown) + + pandaState = pandaStates[0] in_car = pandaState.harnessStatus != log.PandaState.HarnessStatus.notConnected usb_power = peripheralState.usbPowerMode != log.PeripheralState.UsbPowerMode.client