diff --git a/axis-ptz-controller/axis_ptz_controller.py b/axis-ptz-controller/axis_ptz_controller.py index 79d8cd1..ff4a664 100644 --- a/axis-ptz-controller/axis_ptz_controller.py +++ b/axis-ptz-controller/axis_ptz_controller.py @@ -833,6 +833,7 @@ def _object_callback( ] ) <= set(data.keys()): logging.info(f"Required keys missing from object message data: {data}") + self.object = None return logging.info( f"\t🗒️\tProcessing object msg data: {data['object_id']} \t {data['latitude']} \t {data['longitude']} \t {data['altitude']}" diff --git a/axis-ptz-controller/camera.py b/axis-ptz-controller/camera.py index 334b70a..03b2686 100644 --- a/axis-ptz-controller/camera.py +++ b/axis-ptz-controller/camera.py @@ -413,7 +413,7 @@ def _compute_pan_rate_index(self, rho_dot: float) -> None: else: self.pan_rate_index = (100 / self.pan_rate_max) * rho_dot - + # Even though the VAPIX API says it only supports INT, it seems to handle floats just fine def _compute_tilt_rate_index(self, tau_dot: float) -> None: """Compute tilt rate index between -100 and 100 using rates in @@ -436,7 +436,7 @@ def _compute_tilt_rate_index(self, tau_dot: float) -> None: else: self.tilt_rate_index = (100 / self.tilt_rate_max) * tau_dot - + # Even though the VAPIX API says it only supports INT, it seems to handle floats just fine def get_yaw_pitch_roll(self) -> Tuple[float, float, float]: """