Commit 8e7b7134 by PLN (Algolia)

fix(rig): saturated encoder flicks slam to the end stop

rel_delta caps one message at +-63 (7-bit offset-64); firmware acceleration
compresses a fast flick to 1-2 messages, so flick-to-max landed at ~125.
A saturated delta in the end-stop band (>=115 up / <=12 down) now snaps to
127/0 — slow turns never saturate, precise control untouched. Feel bands,
PLN vetoes at rehearsal.
parent 9a4918a4
...@@ -1704,6 +1704,24 @@ class Driver: ...@@ -1704,6 +1704,24 @@ class Driver:
value = self.tempo_step(self.values.get(v2, 0), d) value = self.tempo_step(self.values.get(v2, 0), d)
else: else:
value = max(0, min(127, self.values.get(v2, 0) + d)) value = max(0, min(127, self.values.get(v2, 0) + d))
# End-stop slam for flicks. Measured 2026-09-22: the
# wire carries a 7-bit delta (rel_delta = v - 64), so
# one message tops out at +-63, and the firmware's
# acceleration compresses a full-speed flick into 1-2
# messages — a flick to max lands at ~125 instead of
# 127. If the delta is SATURATED (the wire's maximum:
# >= 63 up, <= -63 down) and the post-integration
# value is already in the top band (>= 115) or bottom
# band (<= 12), treat intent as "reach the stop" and
# snap there. Slow precise turns (+-1/+-2) never have
# a saturated delta, so they are untouched. The bands
# are a FEEL decision — PLN can veto/retune them at
# rehearsal. Tempo keeps its detent path (tempo_step
# above); the slam only lives in this plain else.
if d >= 63 and value >= 115:
value = 127
elif d <= -63 and value <= 12:
value = 0
if self.lang: if self.lang:
if value == self.values.get(v2): if value == self.values.get(v2):
continue # pinned at an end stop continue # pinned at an end stop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment