handle nak error in replay many

old-commit-hash: fc10fe69bf093037261853fff6a06b1889cb46c5
This commit is contained in:
Willem Melching
2020-04-13 13:02:18 -07:00
parent f7e3d8349d
commit 2254998160
+6 -1
View File
@@ -4,6 +4,7 @@ import sys
import time
import signal
import traceback
import usb1
from panda import Panda
from multiprocessing import Pool
@@ -36,7 +37,11 @@ def send_thread(sender_serial):
tsc = messaging.recv_one(can_sock)
snd = can_capnp_to_can_list(tsc.can)
snd = list(filter(lambda x: x[-1] <= 2, snd))
sender.can_send_many(snd)
try:
sender.can_send_many(snd)
except usb1.USBErrorTimeout:
print("Can TX overflow", sender_serial)
# Drain panda message buffer
sender.can_recv()