From ddeaef2738ab3012fd47c976e5d2a70da82f0f16 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 15 Sep 2023 17:18:12 -0700 Subject: [PATCH] no inter --- selfdrive/thermald/thermald.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 51ddc5319b..97a0c08c03 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -34,8 +34,7 @@ NetworkStrength = log.DeviceState.NetworkStrength CURRENT_TAU = 15. # 15s time constant TEMP_TAU = 5. # 5s time constant DISCONNECT_TIMEOUT = 5. # wait 5 seconds before going offroad after disconnect so you get an alert -PANDA_STATES_FREQUENCY = service_list['pandaStates'].frequency -PANDA_STATES_TIMEOUT = round(1000 / PANDA_STATES_FREQUENCY * 1.5) # 1.5x the expected pandaState frequency +PANDA_STATES_TIMEOUT = round(1000 / service_list['pandaStates'].frequency * 1.5) # 1.5x the expected pandaState frequency ThermalBand = namedtuple("ThermalBand", ['min_temp', 'max_temp']) HardwareState = namedtuple("HardwareState", ['network_type', 'network_info', 'network_strength', 'network_stats', @@ -213,7 +212,7 @@ def thermald_thread(end_event, hw_queue) -> None: sm.update(PANDA_STATES_TIMEOUT) # Run at 2Hz - if sm.frame % round(PANDA_STATES_FREQUENCY * DT_TRML) != 0: + if sm.frame % round(service_list['pandaStates'].frequency * DT_TRML) != 0: continue pandaStates = sm['pandaStates']