subDesTagesMitExtraKaese 3 years ago
parent
commit
8e818be0f7

+ 2 - 2
arduino/src/main.cpp

@@ -16,7 +16,7 @@ void setup() {
   Serial.println(F("boot"));
   pinMode(LED_BUILTIN, OUTPUT);
   
-  //initialize acustic sensor
+  //initialize acoustic sensor
   us_init();
 
   //initialize I2C MPU
@@ -46,7 +46,7 @@ void loop() {
     mpu.update();
 
     snprintf(outputBuffer, sizeof(outputBuffer), "DATA:\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\r\n",
-      //acustic RTT 
+      //acoustic RTT 
       us_get_duration(0), us_get_duration(1),
       //magnetic field
       (long)(mpu.getMagX()*1000),

+ 1 - 1
raspberry-pi/gui/mainWindow.py

@@ -36,7 +36,7 @@ class MainWindow(tk.Frame):
     self.ac_dro_y = tk.StringVar()
     self.ac_dro_t1 = tk.StringVar()
     self.ac_dro_t2 = tk.StringVar()
-    self.ac_label = tk.Label(self.controls, text="Acustic Sensor", anchor="c", font=("Helvatica", 10, 'bold'))
+    self.ac_label = tk.Label(self.controls, text="Acoustic Sensor", anchor="c", font=("Helvatica", 10, 'bold'))
     self.ac_label.pack(side="top", fill="both", expand=False)
     tk.Label(self.controls, textvariable=self.ac_dro_x, anchor="nw").pack(side="top", fill="both", expand=False)
     tk.Label(self.controls, textvariable=self.ac_dro_y, anchor="nw").pack(side="top", fill="both", expand=False)

+ 2 - 2
raspberry-pi/main.py

@@ -1,4 +1,4 @@
-from sensors.acusticSensor import AcusticSensor
+from sensors.acousticSensor import AcousticSensor
 from sensors.calibration import CalibrationStateMashine
 from gui.mainWindow import MainWindow
 
@@ -15,7 +15,7 @@ def main():
   log_handler = logHandler.get_log_handler()
   ac_queue = queue.Queue()
   ac_calibration_state = CalibrationStateMashine(log_handler)
-  ac_sensor = AcusticSensor(conf, ac_queue, ac_calibration_state)
+  ac_sensor = AcousticSensor(conf, ac_queue, ac_calibration_state)
 
   try:
     ac_sensor.start()

+ 7 - 7
raspberry-pi/sensors/acusticSensor.py

@@ -11,7 +11,7 @@ import logHandler
 conn = globalArduinoSlave()
 
 
-class AcusticSensor:
+class AcousticSensor:
   def __init__(self, conf, ac_queue, calibration_state):
     self.conf = conf
     self.ac_queue               = ac_queue
@@ -30,7 +30,7 @@ class AcusticSensor:
     self.overhead_right         = float(conf["ac_sensor"]["overhead_right"])
 
     self.log_handler = logHandler.get_log_handler()
-    self.log_handler.log_and_print("start acustic sensor")
+    self.log_handler.log_and_print("start acoustic sensor")
 
     # temporary calibration variables
     self.time_vals = [[],[]]
@@ -55,12 +55,12 @@ class AcusticSensor:
     self.calibration_state.next_state()
 
   def stop(self):
-    self.log_handler.log_and_print("stop acustic sensor")
+    self.log_handler.log_and_print("stop acoustic sensor")
     self.dummyActive = False
     conn.close()
 
   def _readCb_dummy(self):
-    self.log_handler.log_and_print("acustic sensor: generating test values")
+    self.log_handler.log_and_print("acoustic sensor: generating test values")
     while self.dummyActive:
       if self.n % 4 < 1:
         dummyPosition = (0, self.n%1 * self.field_height)
@@ -87,12 +87,12 @@ class AcusticSensor:
       if position != None:
         self.pass_to_gui(position + dummyValue)
       time.sleep(0.012)
-    self.log_handler.log_and_print("acustic sensor: disabled test mode")
+    self.log_handler.log_and_print("acoustic sensor: disabled test mode")
 
   def _readCb(self, raw):
     if self.dummyActive == True:
       self.dummyActive = False
-    value = conn.getAcusticRTTs()
+    value = conn.getAcousticRTTs()
     # partially missing values will be ignored
     if value[0] >= 0 and value[1] >= 0:
       self.calibrate(value)
@@ -159,7 +159,7 @@ class AcusticSensor:
         self.calibration_state.next_state()
 
   def read(self):
-    value = conn.getAcusticRTTs()
+    value = conn.getAcousticRTTs()
     return value
 
   def calculate_position(self, values):

+ 2 - 2
raspberry-pi/sensors/connection.py

@@ -109,7 +109,7 @@ class ArduinoSlave(SerialConnection):
   def close(self):
     super().close()
 
-  def getAcusticRTTs(self): # in microseconds
+  def getAcousticRTTs(self): # in microseconds
     return (
       int(self.sensorData[0]) / 16,
       int(self.sensorData[1]) / 16
@@ -168,7 +168,7 @@ def globalArduinoSlave():
 if __name__ == "__main__":
   arduino = ArduinoSlave()
   def cb(x):
-    print(arduino.getAcusticRTTs(), arduino.getMagneticField(), arduino.getTemperature())
+    print(arduino.getAcousticRTTs(), arduino.getMagneticField(), arduino.getTemperature())
 
   arduino.addRecvCallback(cb)
   arduino.open()