Skip to content

Commit 2d9f329

Browse files
committed
Change string encoding to utf-8
to allow wider range of characters. https://pyserial.readthedocs.io/en/latest/pyserial_api.html#serial.Serial.write Encoding in ascii would fail SendCommand_SweepDataPoints(4096) for example.
1 parent a425a43 commit 2d9f329

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)