|
@@ -75,7 +75,7 @@ class SerialConnection:
|
|
|
class ArduinoSlave(SerialConnection):
|
|
|
def __init__(self):
|
|
|
super().__init__()
|
|
|
- self.sensorData = [0] * 12
|
|
|
+ self.sensorData = [0] * 13
|
|
|
self._recvCbs = []
|
|
|
self._t = None
|
|
|
|
|
@@ -130,7 +130,7 @@ class ArduinoSlave(SerialConnection):
|
|
|
if data:
|
|
|
data = str(data, "ASCII")
|
|
|
vals = data.split('\t')
|
|
|
- if vals[0] == "DATA:":
|
|
|
+ if vals[0] == "DATA:" and len(vals) >= 13:
|
|
|
self.sensorData = vals[1:]
|
|
|
for cb in self._recvCbs:
|
|
|
cb(self.sensorData)
|