Skip to content

Commit

Permalink
Merge pull request #128 from mehdilauters/positionABS
Browse files Browse the repository at this point in the history
PTZ: PositionABS command added
  • Loading branch information
flacjacket committed Jul 22, 2021
2 parents 21efe56 + d1e4822 commit 9888908
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/amcrest/ptz.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,27 @@ def move_down(
channel=channel,
)

def positionABS(
self, action=None, horizontal_angle=0, vertical_angle=0, channel=0
):
"""
Params:
action - start or stop
channel - channel number
horizontal_angle - range 0-360
vertical_angle - range 0-360
Go to an absolute coordinate
"""
ret = self.command(
"ptz.cgi?action={0}&channel={1}&code=PositionABS&arg1={2}"
"&arg2={3}&arg3=0".format(
action, channel, horizontal_angle, vertical_angle
)
)
return ret.content.decode("utf-8")


def focus_near(self, start: bool, *, channel: int = 0) -> str:
"""
Params:
Expand Down

0 comments on commit 9888908

Please sign in to comment.