mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
Fix movement weights type
This commit is contained in:
parent
676ab65cba
commit
5b15a75145
@ -189,7 +189,7 @@ class PtzAutotrackConfig(FrigateBaseModel):
|
|||||||
timeout: int = Field(
|
timeout: int = Field(
|
||||||
default=10, title="Seconds to delay before returning to preset."
|
default=10, title="Seconds to delay before returning to preset."
|
||||||
)
|
)
|
||||||
movement_weights: Optional[Union[str, List[str]]] = Field(
|
movement_weights: Optional[Union[str, List[float]]] = Field(
|
||||||
default=[],
|
default=[],
|
||||||
title="Internal value used for PTZ movements based on the speed of your camera's motor.",
|
title="Internal value used for PTZ movements based on the speed of your camera's motor.",
|
||||||
)
|
)
|
||||||
|
|||||||
@ -83,6 +83,7 @@ class TestConfig(unittest.TestCase):
|
|||||||
},
|
},
|
||||||
"openvino": {
|
"openvino": {
|
||||||
"type": "openvino",
|
"type": "openvino",
|
||||||
|
"model": {"path": "/openvino_model.xml"}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
# needs to be a file that will exist, doesnt matter what
|
# needs to be a file that will exist, doesnt matter what
|
||||||
@ -1534,11 +1535,11 @@ class TestConfig(unittest.TestCase):
|
|||||||
|
|
||||||
runtime_config = frigate_config.runtime_config()
|
runtime_config = frigate_config.runtime_config()
|
||||||
assert runtime_config.cameras["back"].onvif.autotracking.movement_weights == [
|
assert runtime_config.cameras["back"].onvif.autotracking.movement_weights == [
|
||||||
"0.0",
|
0.0,
|
||||||
"1.0",
|
1.0,
|
||||||
"1.23",
|
1.23,
|
||||||
"2.34",
|
2.34,
|
||||||
"0.5",
|
0.5,
|
||||||
]
|
]
|
||||||
|
|
||||||
def test_fails_invalid_movement_weights(self):
|
def test_fails_invalid_movement_weights(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user