1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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.log_list()
- ac_queue = queue.Queue()
- ac_calibration_state = CalibrationStateMashine(log_handler)
- ac_sensor = AcusticSensor(conf, ac_queue, ac_calibration_state,log_handler)
- 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,log_handler)
- 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()
|