|
@@ -1,5 +1,6 @@
|
|
import queue
|
|
import queue
|
|
import time
|
|
import time
|
|
|
|
+import threading
|
|
|
|
|
|
from sensors.calibration import CalibrationStateMashine
|
|
from sensors.calibration import CalibrationStateMashine
|
|
from sensors.connection import globalArduinoSlave
|
|
from sensors.connection import globalArduinoSlave
|
|
@@ -23,13 +24,19 @@ class MagneticSensor:
|
|
#pass
|
|
#pass
|
|
|
|
|
|
def start(self):
|
|
def start(self):
|
|
|
|
+ self.log_handler.log_and_print("start acoustic sensor")
|
|
if not conn.isConnected():
|
|
if not conn.isConnected():
|
|
conn.open()
|
|
conn.open()
|
|
conn.addRecvCallback(self._readCb)
|
|
conn.addRecvCallback(self._readCb)
|
|
|
|
+ self.dummyActive = True
|
|
|
|
+ dummyThread = threading.Thread(target=self._readCb_dummy)
|
|
|
|
|
|
def _readCb(self, raw):
|
|
def _readCb(self, raw):
|
|
print("mag: ", conn.getMagneticField())
|
|
print("mag: ", conn.getMagneticField())
|
|
|
|
|
|
|
|
+ def _readCb_dummy(self):
|
|
|
|
+ pass
|
|
|
|
+
|
|
def calibrate(self, x, y):
|
|
def calibrate(self, x, y):
|
|
pass
|
|
pass
|
|
|
|
|