mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 11:45:24 +03:00
don't lowercase status strings
This commit is contained in:
parent
4c1e4806c1
commit
fe3cdebd17
@ -538,18 +538,16 @@ class OnvifController:
|
|||||||
pan_tilt_status = getattr(status, "MoveStatus", None)
|
pan_tilt_status = getattr(status, "MoveStatus", None)
|
||||||
|
|
||||||
# we're unsupported
|
# we're unsupported
|
||||||
if pan_tilt_status is None or pan_tilt_status.lower() not in [
|
if pan_tilt_status is None or pan_tilt_status not in [
|
||||||
"idle",
|
"IDLE",
|
||||||
"moving",
|
"MOVING",
|
||||||
]:
|
]:
|
||||||
logger.error(
|
logger.error(
|
||||||
f"Camera {camera_name} does not support the ONVIF GetStatus method. Autotracking will not function correctly and must be disabled in your config."
|
f"Camera {camera_name} does not support the ONVIF GetStatus method. Autotracking will not function correctly and must be disabled in your config."
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
if pan_tilt_status.lower() == "idle" and (
|
if pan_tilt_status == "IDLE" and (zoom_status is None or zoom_status == "IDLE"):
|
||||||
zoom_status is None or zoom_status.lower() == "idle"
|
|
||||||
):
|
|
||||||
self.cams[camera_name]["active"] = False
|
self.cams[camera_name]["active"] = False
|
||||||
if not self.ptz_metrics[camera_name]["ptz_motor_stopped"].is_set():
|
if not self.ptz_metrics[camera_name]["ptz_motor_stopped"].is_set():
|
||||||
self.ptz_metrics[camera_name]["ptz_motor_stopped"].set()
|
self.ptz_metrics[camera_name]["ptz_motor_stopped"].set()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user