Add focusing API calls

This commit is contained in:
Max Ziermann
2020-03-06 22:38:25 +01:00
parent 6506bf2cbc
commit eeb6189f7d
2 changed files with 22 additions and 1 deletions

View File

@@ -74,6 +74,6 @@ SET:
- [ ] User -> Manage User - [ ] User -> Manage User
- [ ] Device -> HDD/SD Card - [ ] Device -> HDD/SD Card
- [x] Zoom - [x] Zoom
- [ ] Focus - [x] Focus
- [ ] Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate) - [ ] Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate)
- [ ] Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, LED light, 3D-NR) - [ ] Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, LED light, 3D-NR)

View File

@@ -33,3 +33,24 @@ class ZoomAPIMixin:
:return: response json :return: response json
""" """
return self._stop_zooming_or_focusing() 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()