Fixed some python3 bugs in the test scripts and PandaSerial

This commit is contained in:
Robbe
2019-09-27 15:22:13 -07:00
parent 9af0cb3534
commit c4aabae591
7 changed files with 39 additions and 48 deletions

View File

@@ -5,7 +5,7 @@ class PandaSerial(object):
self.port = port
self.panda.set_uart_parity(self.port, 0)
self.panda.set_uart_baud(self.port, baud)
self.buf = ""
self.buf = b""
def read(self, l=1):
tt = self.panda.serial_read(self.port)
@@ -19,7 +19,7 @@ class PandaSerial(object):
def write(self, dat):
#print "W: ", dat.encode("hex")
#print ' pigeon_send("' + ''.join(map(lambda x: "\\x%02X" % ord(x), dat)) + '");'
return self.panda.serial_write(self.port, dat)
return self.panda.serial_write(self.port, str.encode(dat))
def close(self):
pass