check more often after moving

This commit is contained in:
Josh Hawkins 2023-07-08 15:51:34 -05:00
parent b0f6b2222a
commit e1224dcf28

View File

@ -207,7 +207,10 @@ class PtzAutoTracker:
self.onvif._move_relative(camera, pan, tilt, 1) self.onvif._move_relative(camera, pan, tilt, 1)
# Wait until the camera finishes moving # 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: except queue.Empty:
time.sleep(0.1) time.sleep(0.1)