This commit is contained in:
Fabio Manganiello 2018-06-19 20:32:19 +02:00
parent 98c88ff8e5
commit e70eb8bb42

View file

@ -23,14 +23,14 @@ class SerialPlugin(Plugin):
self.baud_rate = baud_rate self.baud_rate = baud_rate
def _read_json(serial_port): def _read_json(self, serial_port):
n_brackets = 0 n_brackets = 0
is_escaped_ch = False is_escaped_ch = False
parse_start = False parse_start = False
output = bytearray() output = bytes()
while True: while True:
ch = bytes([serial_port.read()]) ch = serial_port.read()
if not ch: if not ch:
break break