mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
Fixed some python3 bugs in the test scripts and PandaSerial
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user