Skip to content

fix(latch): bump default jitter tolerance from 20 to 25#524

Merged
chmanie merged 1 commit into
mainfrom
fix/latch-jitter-tolerance
May 16, 2026
Merged

fix(latch): bump default jitter tolerance from 20 to 25#524
chmanie merged 1 commit into
mainfrom
fix/latch-jitter-tolerance

Conversation

@ArthurGibert
Copy link
Copy Markdown
Member

@ArthurGibert ArthurGibert commented May 15, 2026

Summary

  • Bumps AnalogLatch's default jitter tolerance from 20 → 25 LSB (~0.6% of full scale). The 20 was too tight against measured ADC noise on real hardware and produced occasional false latch updates when faders were held still.
  • Adds characterization tests for the default: held-fader noise simulation, boundary check at tolerance±1, and slow-creep accumulation, so any future change to the default is visible.

Copy link
Copy Markdown
Member

@chmanie chmanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice touch with the tests. Let's see how useful they'll be in the future!

Copy link
Copy Markdown
Member

@chmanie chmanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually let's get the configurator fixes out of this

ADC noise on the MAX11300 fader inputs can reach ~20 LSBs in practice;
a tolerance of 20 was too tight and caused false updates when the fader
was held still. 25 LSBs (~0.6% of full scale) provides a reliable noise
margin while still responding to deliberate movements of 26+ steps.

Adds characterization tests: held-fader noise simulation, boundary check
at tolerance±1, and slow-creep accumulation to document the emission rate.
@chmanie chmanie force-pushed the fix/latch-jitter-tolerance branch from b9232a6 to 9f6c4b6 Compare May 16, 2026 10:26
@chmanie chmanie self-requested a review May 16, 2026 10:28
Copy link
Copy Markdown
Member

@chmanie chmanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK now should be fine!

@chmanie chmanie merged commit 2ac5744 into main May 16, 2026
3 checks passed
@chmanie chmanie deleted the fix/latch-jitter-tolerance branch May 16, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants