diff --git a/README.md b/README.md index b5105d7..0d142a2 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,6 @@ SET: - [ ] User -> Manage User - [ ] Device -> HDD/SD Card - [x] Zoom -- [ ] Focus +- [x] Focus - [ ] Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate) - [ ] Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, LED light, 3D-NR) diff --git a/api/zoom.py b/api/zoom.py index 2ae766c..2bf0021 100644 --- a/api/zoom.py +++ b/api/zoom.py @@ -33,3 +33,24 @@ class ZoomAPIMixin: :return: response json """ return self._stop_zooming_or_focusing() + + def start_focusing_in(self, speed=32): + """ + The camera focuses in until self.stop_focusing() is called. + :return: response json + """ + return self._start_operation('FocusInc', speed=speed) + + def start_focusing_out(self, speed=32): + """ + The camera focuses out until self.stop_focusing() is called. + :return: response json + """ + return self._start_operation('FocusDec', speed=speed) + + def stop_focusing(self): + """ + Stop focusing. + :return: response json + """ + return self._stop_zooming_or_focusing()