feat(viz): m key = matrix mode, fix test pins
CI build oscope-of / build-check (push) Has been cancelled

m now stops the auto data-synth scene AND forces the openpos viz
(matrix unaffected — it is not a scene). Repairs the two test pins the
frozen pinch defaults broke (ext_min 1) and makes the skeleton path
safe for __new__-built renderers (hand gate getattr).
This commit is contained in:
L'électron rare
2026-07-02 16:49:16 +02:00
parent 1c07211dd8
commit 6d43120c0a
3 changed files with 20 additions and 3 deletions
+15 -1
View File
@@ -621,7 +621,21 @@ class AppDelegate(NSObject):
self._user_viz_lock_t = _t.monotonic()
LOG.info("[video] viz -> %s (%d) (lock 8s)", name, idx)
return None
# qsdfghjklm -> audio (scene SC)
# m = matrix performance mode: stop the auto data-synth scene AND
# force the openpos viz (the matrix is not a scene — it keeps
# playing). User request live 2026-07-02.
if k == "m":
self._scClient.send_message("/control/doScene", ["stop"])
names = list(self._state.viz_mode_names)
idx = names.index("openpos") if "openpos" in names else 0
with self._state.lock():
self._state.viz_mode = idx
self._state.active_scene = "stop"
import time as _t
self._user_viz_lock_t = _t.monotonic()
LOG.info("[key] m -> scene stop + viz openpos (matrix mode)")
return None
# qsdfghjkl -> audio (scene SC)
for kk, scene in KEYMAP_AUDIO:
if k == kk:
self._scClient.send_message("/control/doScene", [scene])
+4 -1
View File
@@ -407,7 +407,10 @@ class MetalRenderer(NSObject):
# Gate called once per frame on the full persons_hands list.
# Used for both the overlay loop and the side panels below.
_hand_draw_flags = self._hand_gate.step(s.persons_hands)
# getattr: unit tests build the renderer via __new__ (no Metal init).
_gate = getattr(self, "_hand_gate", None)
_hand_draw_flags = (_gate.step(s.persons_hands) if _gate is not None
else [True] * len(s.persons_hands))
if use_arkit:
parents = s.arkit_parents
@@ -141,7 +141,7 @@ def test_pinch_gate_env_defaults_are_strict(monkeypatch):
monkeypatch.delenv(k, raising=False)
pub = _pub_envs(monkeypatch, finger_piano="0", pinch_enable="1")
assert pub._pinch_det.ext_ratio == 1.35
assert pub._pinch_det.ext_min == 2
assert pub._pinch_det.ext_min == 1 # 1 since 2026-07-02 (inner-finger fix)
assert pub._pinch_det.debounce_frames == 3