From 917161c479afa0379072e861b68696193d7de900 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Mon, 25 Mar 2024 11:16:31 -0400 Subject: [PATCH] fix tilt/pan rate_index bug I created --- axis-ptz-controller/axis_ptz_controller.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/axis-ptz-controller/axis_ptz_controller.py b/axis-ptz-controller/axis_ptz_controller.py index da0f15e..8c0ae68 100644 --- a/axis-ptz-controller/axis_ptz_controller.py +++ b/axis-ptz-controller/axis_ptz_controller.py @@ -1195,13 +1195,13 @@ def _compute_pan_rate_index(self, rho_dot: float): ------- """ if rho_dot < -self.pan_rate_max: - self.pan_rate = -100 + self.pan_rate_index = -100 elif self.pan_rate_max < rho_dot: - self.pan_rate = +100 + self.pan_rate_index = +100 else: - self.pan_rate = round((100 / self.pan_rate_max) * rho_dot) + self.pan_rate_index = round((100 / self.pan_rate_max) * rho_dot) def _compute_tilt_rate_index(self, tau_dot: float): @@ -1218,13 +1218,13 @@ def _compute_tilt_rate_index(self, tau_dot: float): ------- """ if tau_dot < -self.tilt_rate_max: - self.tilt_rate = -100 + self.tilt_rate_index = -100 elif self.tilt_rate_max < tau_dot: - self.tilt_rate = 100 + self.tilt_rate_index = 100 else: - self.tilt_rate = round((100 / self.tilt_rate_max) * tau_dot) + self.tilt_rate_index = round((100 / self.tilt_rate_max) * tau_dot) def _capture_image(self) -> None: """When enabled, capture an image in JPEG format, and publish