From f14be2fce69d8cd329fcc4984f4da7a818930b6b Mon Sep 17 00:00:00 2001 From: "Mr.one" Date: Sun, 12 Jul 2026 14:19:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91card.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- selfdrive/car/card.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index 4ca7bf986..9702f88cd 100644 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -100,7 +100,7 @@ class Car: # card is driven by can recv, expected at 100Hz self.rk = Ratekeeper(100, print_delay_threshold=None) - self.last_can_time = time.monotonic() + # FrogPilot variables self.frogpilot_card = FrogPilotCard(self) @@ -134,12 +134,7 @@ class Car: can_rcv_valid = len(can_strs) > 0 # Check for CAN timeout - if can_rcv_valid: - self.last_can_time = time.monotonic() - - # Check for CAN timeout - only count if we've received CAN recently - # If no CAN for >10 seconds (e.g. engine off), treat as normal, avoid error - if not can_rcv_valid and (time.monotonic() - self.last_can_time) < 10.0: + if not can_rcv_valid: self.can_rcv_cum_timeout_counter += 1 if can_rcv_valid and REPLAY: