Skip to content

Commit 77a8f93

Browse files
authored
Merge pull request #17 from shunyas/encode-utif8
Change serial port string encoding to utf-8 as ascii works as 7 bits limited in Python
2 parents a425a43 + 2d9f329 commit 77a8f93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RFExplorer/RFExplorer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ def SendCommand(self, sCommand):
15091509
sCommand -- Unformatted command from http://www.rf-explorer.com/API
15101510
"""
15111511
sCompleteCommand = "#" + chr(len(sCommand) + 2) + sCommand
1512-
self.m_objSerialPort.write(sCompleteCommand.encode('ascii'))
1512+
self.m_objSerialPort.write(sCompleteCommand.encode('utf-8'))
15131513
if self.m_nVerboseLevel>5:
15141514
print("RFE Command: #(" + str(len(sCompleteCommand)) + ")" + sCommand + " [" + " ".join("{:02X}".format(ord(c)) for c in sCompleteCommand) + "]")
15151515

0 commit comments

Comments
 (0)