mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Don't fail ptz if camera does not support relative zoom (#7542)
* Remove relative zoom space as it is not used * Catch case where camera does not support relative zoom * Cleanup
This commit is contained in:
parent
bd0d16a75b
commit
2e4f5bc0e0
@ -104,9 +104,15 @@ class OnvifController:
|
|||||||
move_request.Translation.PanTilt.space = ptz_config["Spaces"][
|
move_request.Translation.PanTilt.space = ptz_config["Spaces"][
|
||||||
"RelativePanTiltTranslationSpace"
|
"RelativePanTiltTranslationSpace"
|
||||||
][fov_space_id]["URI"]
|
][fov_space_id]["URI"]
|
||||||
|
|
||||||
|
try:
|
||||||
move_request.Translation.Zoom.space = ptz_config["Spaces"][
|
move_request.Translation.Zoom.space = ptz_config["Spaces"][
|
||||||
"RelativeZoomTranslationSpace"
|
"RelativeZoomTranslationSpace"
|
||||||
][0]["URI"]
|
][0]["URI"]
|
||||||
|
except Exception:
|
||||||
|
# camera does not support relative zoom
|
||||||
|
pass
|
||||||
|
|
||||||
if move_request.Speed is None:
|
if move_request.Speed is None:
|
||||||
move_request.Speed = ptz.GetStatus({"ProfileToken": profile.token}).Position
|
move_request.Speed = ptz.GetStatus({"ProfileToken": profile.token}).Position
|
||||||
self.cams[camera_name]["relative_move_request"] = move_request
|
self.cams[camera_name]["relative_move_request"] = move_request
|
||||||
|
Loading…
Reference in New Issue
Block a user