Skip to content

Commit

Permalink
Make handshake more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosmaster committed Feb 11, 2021
1 parent ade5090 commit ad8fe32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ def handshake(self):
self.write(0xA0)
if self.read(1) == to_bytes(0x5F):
self.dev.flushInput()
self.dev.flushOutput()
break
self.dev.flushInput()
self.dev.flushOutput()

#self.write(0xA0)
#self.check(self.read(1), to_bytes(0x5F))

Expand Down

0 comments on commit ad8fe32

Please sign in to comment.