fix(viz): narrow uniform test except + lock write

This commit is contained in:
L'électron rare
2026-06-26 10:35:52 +02:00
parent ff2ef5dfb8
commit cf6eb9c47e
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -155,7 +155,8 @@ class ActionHeadPublisher(threading.Thread):
rkp = getattr(self.state, "right_hand_kp", None)
hands = [h for h in (lkp, rkp) if h is not None and len(h) > 0]
feats = self._hand_ext.step(hands)
self.state.hand_feats = feats
with self.state.lock():
self.state.hand_feats = feats
self.bridge.send_hands(feats, t_now)
def _read_sources(self) -> tuple[
@@ -19,7 +19,7 @@ def test_uniform_constants():
assert UNIFORM_FLOATS == 24, f"expected 24, got {UNIFORM_FLOATS}"
assert UNIFORM_SIZE == 96, f"expected 96, got {UNIFORM_SIZE}"
assert struct.calcsize(f"{UNIFORM_FLOATS}f") == 96
except Exception as exc: # pyobjc/Metal unavailable headless
except ImportError as exc: # pyobjc/Metal unavailable headless
# Fallback: at minimum the struct math is correct
import pytest
pytest.skip(f"renderer import skipped headless ({exc}); struct layout verified by test_uniform_layout_struct")