Fixed sending of bytes over PandaSerial
parent
0894b28f1e
commit
736c2cbf7b
|
@ -19,7 +19,10 @@ 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, str.encode(dat))
|
||||
if(isinstance(dat, bytes)):
|
||||
return self.panda.serial_write(self.port, dat)
|
||||
else:
|
||||
return self.panda.serial_write(self.port, str.encode(dat))
|
||||
|
||||
def close(self):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue