from sensors.acusticSensor import AcusticSensor from sensors.calibration import CalibrationStateMashine from gui.mainWindow import MainWindow import queue import configparser import tkinter as tk import traceback import Log_handler conf = configparser.ConfigParser() conf.read('config.ini') def main(): log_handler = Log_handler.get_log_handler() ac_queue = queue.Queue() ac_calibration_state = CalibrationStateMashine(log_handler) ac_sensor = AcusticSensor(conf, ac_queue, ac_calibration_state) try: ac_sensor.start() root = tk.Tk() root.title("Tracking System") root.attributes('-fullscreen', True) view = MainWindow(root, ac_sensor, ac_queue, ac_calibration_state) view.pack(side="top", fill="both", expand=True) view.update() root.mainloop() except KeyboardInterrupt: print("stop") except Exception as e: print("Error: ",e) traceback.print_exc() finally: ac_sensor.stop() main()