From e2e3703ae4630cb2ae9e61c4c94aef9011fcc108 Mon Sep 17 00:00:00 2001 From: Andi Radulescu Date: Wed, 17 Jun 2026 18:14:07 +0300 Subject: [PATCH] ui: fix false "NO PANDA" flash on screen wake (#37404) * ui: fix false "NO PANDA" flash on screen wake * ui: use recv_time for panda timeout instead of frame counting * ui: use sm.alive for panda timeout --- selfdrive/ui/ui_state.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/ui/ui_state.py b/selfdrive/ui/ui_state.py index 6309642fd..643054e50 100644 --- a/selfdrive/ui/ui_state.py +++ b/selfdrive/ui/ui_state.py @@ -1,4 +1,3 @@ -import pyray as rl import numpy as np import time import threading @@ -141,7 +140,7 @@ class UIState: # Check ignition status across all pandas if self.panda_type != log.PandaState.PandaType.unknown: self.ignition = any(state.ignitionLine or state.ignitionCan for state in panda_states) - elif self.sm.frame - self.sm.recv_frame["pandaStates"] > 5 * rl.get_fps(): + elif not self.sm.alive["pandaStates"]: self.panda_type = log.PandaState.PandaType.unknown # Handle wide road camera state updates