Skip to content

Commit

Permalink
fix: get profile first and also set in in setter
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Jan 20, 2025
1 parent e83d9b9 commit 1539366
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rosys/vision/rtsp_camera/rtsp_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,15 @@ async def get_fps(self) -> int | None:
@deprecated_function(remove_in_version='0.27.0', stacklevel=3)
def get_jovision_profile(self) -> int | None:
assert self.device is not None
self.parameters['substream'].value = profile

return self.get_substream()
profile = self.get_substream()
if profile is not None:
self.parameters['substream'].value = profile
return profile

@deprecated_function(remove_in_version='0.27.0', stacklevel=3)
def set_jovision_profile(self, profile: int) -> None:
assert self.device is not None
self.parameters['substream'].value = profile

self.device.set_substream(profile)

Expand Down

0 comments on commit 1539366

Please sign in to comment.