Ver código fonte

重拍问题

rambo 4 meses atrás
pai
commit
a9a4a5f45d
2 arquivos alterados com 7 adições e 2 exclusões
  1. 2 1
      python/mcu/DeviceControl.py
  2. 5 1
      python/sockets/message_handler.py

+ 2 - 1
python/mcu/DeviceControl.py

@@ -1489,7 +1489,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
             self.msg_type = "mcu"
             self.controlDevice("laser_position", 1)
 
-    async def run_mcu_config_single(self, config_info, goods_art_no,msg_type="run_mcu_single_finish",image_index=-1):
+    async def run_mcu_config_single(self, config_info, goods_art_no,msg_type="run_mcu_single_finish",image_index=-1,record_id=-1):
         '''独立拍照  仅作测试用'''
         if self.checkDevice() == False:
             return
@@ -1503,6 +1503,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
                     mcu=self,
                     goods_art_no=goods_art_no,
                     image_index=image_index,
+                    record_id=record_id,
                 )
             print("self.action_state===>", self.action_state)
             if self.action_state != 1:

+ 5 - 1
python/sockets/message_handler.py

@@ -180,7 +180,11 @@ async def handlerSend(
             device_ctrl = DeviceControl(websocket_manager=manager)
             loop.create_task(
                 device_ctrl.run_mcu_config_single(
-                    device_action.model_dump(), goods_art_no, msg_type=msg_type,image_index=image_index
+                    device_action.model_dump(),
+                    goods_art_no,
+                    msg_type=msg_type,
+                    image_index=image_index,
+                    record_id=record_id,
                 ),
                 name="run_mcu_config_single",
             )