1
0
Fork 0

encode the output string

This commit is contained in:
Kevin Matz 2019-07-30 10:38:22 -04:00
parent 7a4d28b6d1
commit e6b05cf3a2
1 changed files with 1 additions and 1 deletions

View File

@ -35,9 +35,9 @@ class Robot:
def move(self, coords=None):
if coords is not None:
self.target = coords
str = str.lower()
hexval = [hex(dec).lstrip("0x").rstrip("L") for dec in self.target]
str = '{'+','.join(hexval)+'}'
str = str.lower().encode()
try:
self.serial_port.write(str)
except serial.serialutil.SerialTimeoutException: