diff --git a/src/presa_mano/api/pose_3d_routes.py b/src/presa_mano/api/pose_3d_routes.py index 2745bb5..1e2f4e7 100644 --- a/src/presa_mano/api/pose_3d_routes.py +++ b/src/presa_mano/api/pose_3d_routes.py @@ -105,6 +105,7 @@ def get_state() -> dict[str, Any]: "right_wrist_camera": cfg.get("right_wrist_camera") or {}, "clouds": cfg.get("clouds") or {}, "cloud_params": cfg.get("cloud_params") or {}, + "cross_camera": cfg.get("cross_camera") or {}, "timings_ms": sw.as_dict(), } diff --git a/tests/test_pose_3d_routes.py b/tests/test_pose_3d_routes.py index bf219a1..de8393b 100644 --- a/tests/test_pose_3d_routes.py +++ b/tests/test_pose_3d_routes.py @@ -208,3 +208,13 @@ def test_unlock_proxies_to_bridge(): r = client.post("/api/pose_3d/unlock") assert r.status_code == 200 assert r.json()["ok"] is True + + +def test_state_includes_cross_camera_block(): + with patch("presa_mano.api.pose_3d_routes._deps.g1") as g1_factory: + g1 = MagicMock() + g1.wrist.return_value = _fake_wrist_pair() + g1_factory.return_value = g1 + r = client.get("/api/pose_3d/state") + assert r.status_code == 200 + assert "cross_camera" in r.json() # {} se mai calibrato