|
@@ -134,9 +134,9 @@ class ArduinoSlave(SerialConnection):
|
|
def _readSensors(self):
|
|
def _readSensors(self):
|
|
while True:
|
|
while True:
|
|
data = super().readline()
|
|
data = super().readline()
|
|
- if data:
|
|
|
|
- data = str(data, "ASCII")
|
|
|
|
- vals = data.split('\t')
|
|
|
|
|
|
+ if data and len(data) > 2:
|
|
|
|
+ data = str(data, encoding="ASCII", errors="ignore")
|
|
|
|
+ vals = data[:-2].split('\t')
|
|
if vals[0] == "DATA:" and len(vals) >= 13:
|
|
if vals[0] == "DATA:" and len(vals) >= 13:
|
|
self.sensorData = vals[1:]
|
|
self.sensorData = vals[1:]
|
|
for cb in self._recvCbs:
|
|
for cb in self._recvCbs:
|