Browse Source

refactor(capture): 移除调试打印并优化异常处理

- 移除了 low_iso 设置状态的调试打印语句
- 在 zmq.Again 异常处理后添加了换行符以改善代码格式
- 保持了预览功能的异常处理逻辑不变
rambo 1 tuần trước cách đây
mục cha
commit
9f98a4fe5a
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      python/mcu/capture/smart_shooter_class.py

+ 2 - 1
python/mcu/capture/smart_shooter_class.py

@@ -440,7 +440,7 @@ class SmartShooter(metaclass=SingletonType):
                     )
                 else:
                     print("low_iso 等于auto就不设置")
-            print("设置状态", set_state, set_msg)
+            # print("设置状态", set_state, set_msg)
             socket, context = self.__create_req()
             req = {}
             req["msg_type"] = "Request"
@@ -479,6 +479,7 @@ class SmartShooter(metaclass=SingletonType):
             return True, "预览启用成功" if enable_status else "预览关闭成功"
         except zmq.Again:
             print("启动预览超时,继续监听...")
+
         except:
             self.perview_state = False
             socket.close()