tchellomello / python-amcrest

A Python 2.7/3.x module for Amcrest and Dahua Cameras using the SDK HTTP API.
GNU General Public License v2.0
216 stars 76 forks source link

Use PTZ control command helper #175

Closed flacjacket closed 3 years ago

flacjacket commented 3 years ago

Change the various PTZ functions to use the ptz_control_command helper function rather than directly calling the commands. Shuffle around some of the arguments to ptz_control_command to make it a bit easier to use, in particular default all of the arg's to "0", so these only need to be specified when the value is changed from the default. This may break direct uses of ptz_control_command for callers using positional arguments, as the action and code parameters are moved to be required, non-default arguments.

flacjacket commented 3 years ago

Note, this builds off #174, the proposed change here can be seen in the latest commit.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+1.8%) to 44.456% when pulling 7d0f149af25a135b7cb4626cb09474ed038a8bfe on flacjacket:ptz into f04b256f49184bf4418053af9a51ca6fbea505ec on tchellomello:master.