From 0700441b697f07c64d23712742d99b22368bd12b Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 16 May 2024 01:52:28 -0700 Subject: [PATCH] no poll --- selfdrive/car/card.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index faa7d77186..9bee4d1366 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -27,11 +27,8 @@ class Car: CI: CarInterfaceBase def __init__(self, CI=None): - self.POLL = False - self.can_sock = messaging.sub_sock('can', timeout=20) - self.sm = messaging.SubMaster(['pandaStates', 'carControl', 'controlsState'], - poll='carControl' if self.POLL else None) + self.sm = messaging.SubMaster(['pandaStates', 'carControl', 'controlsState']) self.pm = messaging.PubMaster(['sendcan', 'carState', 'carParams', 'carOutput']) self.can_rcv_timeout_counter = 0 # consecutive timeout count @@ -99,8 +96,7 @@ class Car: cloudlog.timestamp('Received can') CS = self.CI.update(self.CC_prev, can_strs) - if not self.POLL: - self.sm.update(0) + self.sm.update(0) can_rcv_valid = len(can_strs) > 0 @@ -161,10 +157,6 @@ class Car: self.pm.send('carState', cs_send) cloudlog.timestamp('Sent carState') - if self.POLL: - # wait for latest carControl - self.sm.update(20) - def controls_update(self, CS: car.CarState, CC: car.CarControl): """control update loop, driven by carControl"""