wu_xinjun
2022-06-20 6b37ae2b15eca92b3cacac0e113290eb28ccfa8b
src/engine/AcquisitionMain.py
@@ -80,6 +80,8 @@
        self.CAMERA_COUNT = CAMERA_COUNT
        # microwave
        self.MICROWAVEhost = MICROWAVEhost
        # self.MICROWAVEPort = MICROWAVEhost
        self.MICROWAVEport = 9911
        # dust cleaner
        self.com = "COM11"
@@ -207,10 +209,16 @@
                    routing_key="server"
                    )
        self.mc = microwaveController()
        self.mc = microwaveController(
                    MicrowaveHost=self.MICROWAVEhost,
                    MicrowavePort=self.MICROWAVEport,
                    init_packet_threshold=100,
                    init_timeusage_threshold=3,
                    device_id=self.device_id,
                    logs_queue=self.LogsSender_queue,
                    plys_queue=self.PlysSender_queue,
                    routing_key="server"
        )
        
    def run_rabbitmq(self):
@@ -236,15 +244,17 @@
            print(f"stop {t.name}")
    def start(self):
        try:
            self.run_all()
            print("[*] Client is runing ...")
            self.CommandsReceiver_Thread.join()
        except Exception as e:
            print(e)
            print("running error, stop all threads")
            self.stop_all()
        print("main thread end.")
        # try:
        #     self.run_all()
        #     print("[*] Client is runing ...")
        #     self.CommandsReceiver_Thread.join()
        # except Exception as e:
        #     print(e)
        #     print("running error, stop all threads")
        #     self.stop_all()
        # print("main thread end.")
        self.run_all()
        self.CommandsReceiver_Thread.join()
        return 0