From e1224dcf28fba0aa9c8901531f5381dbb25dc0d8 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 8 Jul 2023 15:51:34 -0500 Subject: [PATCH] check more often after moving --- frigate/ptz/autotrack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index 3895689b4..f52193287 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -207,7 +207,10 @@ class PtzAutoTracker: self.onvif._move_relative(camera, pan, tilt, 1) # Wait until the camera finishes moving - self.camera_metrics[camera]["ptz_stopped"].wait() + while not self.camera_metrics[camera]["ptz_stopped"].is_set(): + # check if ptz is moving + self.onvif.get_camera_status(camera) + time.sleep(1 / (self.config.cameras[camera].detect.fps / 2)) except queue.Empty: time.sleep(0.1)