Skip to content

Commit

Permalink
Update camera.py
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Oct 27, 2024
1 parent 0dc9dfc commit 83ad6ef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion axis-ptz-controller/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,14 @@ def move_to_azimuth_elevation(
logging.info(
f"Absolute Move - Target pan: {azimuth} tilt: {elevation} Corrected pan: {camera_pan}, and tilt: {camera_tilt}, with zoom: {self.zoom}"
)
if elevation > -0 and azimuth >= -180 and azimuth <= 180:
if camera_tilt >= 0 and camera_pan >= -180 and camera_pan <= 180:

self.slew_camera(camera_pan, camera_tilt)
else:
logging.error(
f"Invalid azimuth and elevation angles: {camera_pan}, {camera_tilt} "

)

def slew_camera(self, rho_target: float, tau_target: float) -> None:
"""Slew the camera to the specified pan and tilt angles. It
Expand Down

0 comments on commit 83ad6ef

Please sign in to comment.