Skip to content

Commit eeb6189

Browse files
author
Max Ziermann
committed
Add focusing API calls
1 parent 6506bf2 commit eeb6189

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ SET:
7474
- [ ] User -> Manage User
7575
- [ ] Device -> HDD/SD Card
7676
- [x] Zoom
77-
- [ ] Focus
77+
- [x] Focus
7878
- [ ] Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate)
7979
- [ ] Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, LED light, 3D-NR)

api/zoom.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,24 @@ def stop_zooming(self):
3333
:return: response json
3434
"""
3535
return self._stop_zooming_or_focusing()
36+
37+
def start_focusing_in(self, speed=32):
38+
"""
39+
The camera focuses in until self.stop_focusing() is called.
40+
:return: response json
41+
"""
42+
return self._start_operation('FocusInc', speed=speed)
43+
44+
def start_focusing_out(self, speed=32):
45+
"""
46+
The camera focuses out until self.stop_focusing() is called.
47+
:return: response json
48+
"""
49+
return self._start_operation('FocusDec', speed=speed)
50+
51+
def stop_focusing(self):
52+
"""
53+
Stop focusing.
54+
:return: response json
55+
"""
56+
return self._stop_zooming_or_focusing()

0 commit comments

Comments
 (0)