We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1938e96 commit c879c70Copy full SHA for c879c70
1 file changed
obd/elm327.py
@@ -308,9 +308,9 @@ def __write(self, cmd):
308
309
if self.__port:
310
cmd += "\r\n" # terminate
311
- self.__port.flush()
312
- self.__port.flushInput()
313
- self.__port.write(cmd.encode()) # turn the string into bytes
+ self.__port.flushInput() # dump everything in the input buffer
+ self.__port.write(cmd.encode()) # turn the string into bytes and write
+ self.__port.flush() # wait for the output buffer to finish transmitting
314
debug("write: " + repr(cmd))
315
else:
316
debug("cannot perform __write() when unconnected", True)
0 commit comments