Skip to content

Commit

Permalink
supports stopping tracking when it recieves an empty Selected Object …
Browse files Browse the repository at this point in the history
…message
  • Loading branch information
robotastic committed May 24, 2024
1 parent f506eff commit 20313c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions axis-ptz-controller/axis_ptz_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']}"
Expand Down
4 changes: 2 additions & 2 deletions axis-ptz-controller/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]:
"""
Expand Down

0 comments on commit 20313c1

Please sign in to comment.