Skip to content

Commit

Permalink
fix for proportional_speed
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Apr 6, 2024
1 parent 18c0969 commit b3926ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 1 addition & 2 deletions axis-ptz-controller/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ def update_pan_tilt_rates(self, pan_rate: float, tilt_rate: float) -> None:
logging.disable(logging.INFO)
self.camera_control.continuous_move(
self.pan_rate_index,
self.tilt_rate_index,
0.0,
self.tilt_rate_index
)
logging.disable(logging.NOTSET)

Expand Down
16 changes: 16 additions & 0 deletions axis-ptz-controller/camera_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ class CameraControl(vapix_control.CameraControl):
to be gettable and settable.
"""

def continuous_move(self, pan: int = None, tilt: int = None):
"""
Operation for continuous Pan/Tilt and Zoom movements.
Args:
pan: speed of movement of Pan.
tilt: speed of movement of Tilt.
zoom: speed of movement of Zoom.
Returns:
Returns the response from the device to the command sent.
"""
pan_tilt = str(pan) + "," + str(tilt)
return self._camera_command({'continuouspantiltmove': pan_tilt, 'proportionalspeed': "disabled"})

def absolute_move(
self,
pan: Union[float, None] = None,
Expand Down

0 comments on commit b3926ba

Please sign in to comment.