Skip to content

Commit

Permalink
while condition
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasloetkolben committed Oct 9, 2024
1 parent 7de4096 commit d4b23db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,12 +832,9 @@ def can_reset_communications(self):
def can_send_many(self, arr, timeout=CAN_SEND_TIMEOUT_MS):
snds = pack_can_buffer(arr)
for tx in snds:
while True:
while len(tx) > 0:
bs = self._handle.bulkWrite(3, tx, timeout=timeout)
tx = tx[bs:]
if len(tx) == 0:
break
logger.error("CAN: PARTIAL SEND MANY, RETRYING")

def can_send(self, addr, dat, bus, timeout=CAN_SEND_TIMEOUT_MS):
self.can_send_many([[addr, dat, bus]], timeout=timeout)
Expand Down

0 comments on commit d4b23db

Please sign in to comment.