Pārlūkot izejas kodu

摄像头信号检测周期从30秒改为5秒

lsfoo 3 mēneši atpakaļ
vecāks
revīzija
ad25ec282b
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      hookvision/main_window.py

+ 2 - 2
hookvision/main_window.py

@@ -1221,8 +1221,8 @@ class MainWindow(QMainWindow):
                 self._last_mqtt_connect_attempt = now
                 self._connect_current_ai()
 
-        # 每 30 秒检测一次摄像头信号
-        if now - self._last_signal_check > 30:
+        # 每 5 秒检测一次摄像头信号
+        if now - self._last_signal_check > 5:
             self._last_signal_check = now
             if not getattr(self, '_signal_check_thread', None) or not self._signal_check_thread.is_alive():
                 self._signal_check_thread = threading.Thread(target=self._check_all_cameras, daemon=True)