mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
use zoom space id in onvif relativemove setup
This commit is contained in:
parent
bad80a64ef
commit
d68bdcf72c
@ -151,7 +151,10 @@ class OnvifController:
|
|||||||
|
|
||||||
# autoracking relative panning/tilting needs a relative zoom value set to 0
|
# autoracking relative panning/tilting needs a relative zoom value set to 0
|
||||||
# if camera supports relative movement
|
# if camera supports relative movement
|
||||||
if self.config.cameras[camera_name].onvif.autotracking.zooming:
|
if (
|
||||||
|
self.config.cameras[camera_name].onvif.autotracking.zooming
|
||||||
|
!= ZoomingModeEnum.disabled
|
||||||
|
):
|
||||||
zoom_space_id = next(
|
zoom_space_id = next(
|
||||||
(
|
(
|
||||||
i
|
i
|
||||||
@ -182,12 +185,12 @@ class OnvifController:
|
|||||||
try:
|
try:
|
||||||
if (
|
if (
|
||||||
self.config.cameras[camera_name].onvif.autotracking.zooming
|
self.config.cameras[camera_name].onvif.autotracking.zooming
|
||||||
== ZoomingModeEnum.relative
|
!= ZoomingModeEnum.disabled
|
||||||
):
|
):
|
||||||
if zoom_space_id is not None:
|
if zoom_space_id is not None:
|
||||||
move_request.Translation.Zoom.space = ptz_config["Spaces"][
|
move_request.Translation.Zoom.space = ptz_config["Spaces"][
|
||||||
"RelativeZoomTranslationSpace"
|
"RelativeZoomTranslationSpace"
|
||||||
][0]["URI"]
|
][zoom_space_id]["URI"]
|
||||||
except Exception:
|
except Exception:
|
||||||
if (
|
if (
|
||||||
self.config.cameras[camera_name].onvif.autotracking.zooming
|
self.config.cameras[camera_name].onvif.autotracking.zooming
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user