From af8af3209dc0756ccc25e41612b855d54b8d7af4 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 23 Aug 2023 14:42:27 -0700 Subject: [PATCH] thermald: type annotate main thread (#29414) * type * stash * Revert "stash" This reverts commit f5e5e0d08c967d1a5d9c239e6335f8a47890b1a1. * bug in mypy --- selfdrive/thermald/thermald.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index b80ce71aea..266b28db04 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -165,7 +165,7 @@ def hw_state_thread(end_event, hw_queue): time.sleep(DT_TRML) -def thermald_thread(end_event, hw_queue): +def thermald_thread(end_event, hw_queue) -> None: pm = messaging.PubMaster(['deviceState']) sm = messaging.SubMaster(["peripheralState", "gpsLocationExternal", "controlsState", "pandaStates"], poll=["pandaStates"]) @@ -177,10 +177,10 @@ def thermald_thread(end_event, hw_queue): startup_conditions: Dict[str, bool] = {} startup_conditions_prev: Dict[str, bool] = {} - off_ts = None - started_ts = None + off_ts: Optional[float] = None + started_ts: Optional[float] = None started_seen = False - startup_blocked_ts = None + startup_blocked_ts: Optional[float] = None thermal_status = ThermalStatus.yellow last_hw_state = HardwareState(