Skip to content

Commit

Permalink
Merge pull request #49 from stephengolub/display-mixin-fixes
Browse files Browse the repository at this point in the history
Display mixin fixes
  • Loading branch information
Benehiko authored Aug 30, 2021
2 parents ac5ee72 + 04d5d4a commit 5b782bf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions reolinkapi/mixins/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_mask(self) -> Dict:

def set_osd(self, bg_color: bool = 0, channel: float = 0, osd_channel_enabled: bool = 0,
osd_channel_name: str = "", osd_channel_pos: str = "Lower Right", osd_time_enabled: bool = 0,
osd_time_pos: str = "Lower Right") -> bool:
osd_time_pos: str = "Lower Right", osd_watermark_enabled: bool = 0) -> bool:
"""
Set OSD
:param bg_color: bool
Expand All @@ -47,10 +47,11 @@ def set_osd(self, bg_color: bool = 0, channel: float = 0, osd_channel_enabled: b
"enable": osd_channel_enabled, "name": osd_channel_name,
"pos": osd_channel_pos
},
"osdTime": {"enable": osd_time_enabled, "pos": osd_time_pos}
"osdTime": {"enable": osd_time_enabled, "pos": osd_time_pos},
"watermark": osd_watermark_enabled,
}}}]
r_data = self._execute_command('SetOsd', body)[0]
if r_data["value"]["rspCode"] == 200:
if 'value' in r_data and r_data["value"]["rspCode"] == 200:
return True
print("Could not set OSD. Camera responded with status:", r_data["value"])
print("Could not set OSD. Camera responded with status:", r_data["error"])
return False

0 comments on commit 5b782bf

Please sign in to comment.