You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I wonder did anyone encountered with after run self.run method for minutes, no data came out then. I have done some debugger work, and found that it's the line c = self.ser.read() in the method recv_packet of the BT class stuck.
Any ideas? Is the device disconnected after certain time?
def recv_packet(self):
n = self.ser.inWaiting() # Windows fix
while True:
c = self.ser.read()
if not c:
return None
ret = self.proc_byte(ord(c))
if ret:
if ret.typ == 0x80:
self.handle_event(ret)
# Windows fix
if n >= 5096:
print("Clearning",n)
self.ser.flushInput()
# End of Windows fix
return ret
The text was updated successfully, but these errors were encountered:
Hi guys, I wonder did anyone encountered with after run self.run method for minutes, no data came out then. I have done some debugger work, and found that it's the line
c = self.ser.read()
in the method recv_packet of the BT class stuck.Any ideas? Is the device disconnected after certain time?
The text was updated successfully, but these errors were encountered: