From c88b1a662ab7bbae2dd56de9db86a95be5896c2c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 7 Aug 2024 17:35:51 -0700 Subject: [PATCH] can't come up with a better name :( --- selfdrive/car/card.py | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index e819d32bcc..b0f3491898 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -49,6 +49,7 @@ def get_one_can(logcan: messaging.SubSocket) -> list[CanData]: def can_comm_callbacks(logcan: messaging.SubSocket, sendcan: messaging.PubSocket) -> tuple[SimpleNamespace, CanSendCallable]: def can_drain(wait_for_one: bool = False) -> list[list[CanData]]: + # wait_for_one: wait the normal logcan socket timeout for a CAN packet, may return empty list if nothing comes ret = [] for can in messaging.drain_sock(logcan, wait_for_one=wait_for_one): ret.append([CanData(msg.address, msg.dat, msg.src) for msg in can.can])