From 9f0acb2c70ab6b50bb0ecc789901d19dcefff86a Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Sat, 28 Nov 2026 11:50:19 -0600 Subject: [PATCH] ui: one helper for received since started (#39382) --- openpilot/selfdrive/ui/ui_state.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpilot/selfdrive/ui/ui_state.py b/openpilot/selfdrive/ui/ui_state.py index 0c76c38c9f..4b0d93cc0c 100644 --- a/openpilot/selfdrive/ui/ui_state.py +++ b/openpilot/selfdrive/ui/ui_state.py @@ -224,6 +224,9 @@ class UIState: def is_offroad(self) -> bool: return not self.started + def received_since_started(self, service: str) -> bool: + return self.sm.recv_frame[service] >= self.started_frame + def update(self) -> None: if getattr(self, "replay_clock", None) is not None: before = self.replay_clock.sample()