JurajNyiri / pytapo

Python library for communication with Tapo Cameras
MIT License
292 stars 60 forks source link

Add motor calibration #11

Closed depau closed 3 years ago

depau commented 3 years ago

The command moves the camera all the way to the endstops, then recenters it.

It is required for accurate PTZ control if the camera has been manually rotated, since it uses "dumb" DC motors

depau commented 3 years ago

Whoops, totally forgot about this.

assert result["error_code"] == 0

Well, there's no need for that, since performRequest would throw an exception otherwise:

https://github.com/JurajNyiri/pytapo/blob/87dbd0cbf2285b51051a42099120af72bc0563c1/pytapo/__init__.py#L99-L118

https://github.com/JurajNyiri/pytapo/blob/87dbd0cbf2285b51051a42099120af72bc0563c1/pytapo/__init__.py#L81-L91