feat(v1): relax fall sensitivity for low overhead cameras
Adds configurable event.require_rapid_drop (default off), require_lower_body (default off) and horizontal_angle_threshold_degrees (default 45). With the lenient defaults a sustained horizontal pose alone enters SUSPECT and confirms after the confirm window, which is now the main false-positive guard; missing knees/ankles no longer reject the pose. Thresholds flow into config_version. End-to-end smoke confirms a lying pose; 70 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -140,6 +140,20 @@ def test_public_example_config_has_no_embedded_credentials():
|
||||
assert "rtsp_url_env" in source
|
||||
|
||||
|
||||
def test_sensitivity_fields_default_to_lenient(tmp_path):
|
||||
config_file = tmp_path / "config.json"
|
||||
_write_config(
|
||||
config_file,
|
||||
{"id": "c", "host": "192.0.2.10", "username": "u", "password": "p"},
|
||||
)
|
||||
|
||||
config = load_config(config_file)
|
||||
|
||||
assert config.event.require_rapid_drop is False
|
||||
assert config.event.require_lower_body is False
|
||||
assert config.event.horizontal_angle_threshold_degrees == 45.0
|
||||
|
||||
|
||||
def test_build_ffmpeg_options_variants():
|
||||
assert build_ffmpeg_options() == "rtsp_transport;tcp|stimeout;5000000|fflags;nobuffer|flags;low_delay"
|
||||
assert build_ffmpeg_options("udp", 3, False) == "rtsp_transport;udp|stimeout;3000000"
|
||||
|
||||
Reference in New Issue
Block a user