From 5d221e9b9d527f3f0b351903d2502422d2ddb2b2 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 22 Sep 2023 10:55:36 -0500 Subject: [PATCH] recalc every 50 moves --- frigate/ptz/autotrack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index 1685d12aa..6dac0e527 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -307,7 +307,7 @@ class PtzAutoTracker: def _calculate_move_coefficients(self, camera, calibration=False): # calculate new coefficients when we have 50 more new values. Save up to 500 if calibration or ( - len(self.move_metrics[camera]) % 5 == 0 + len(self.move_metrics[camera]) % 50 == 0 and len(self.move_metrics[camera]) != 0 and len(self.move_metrics[camera]) <= 500 ):