opentx/opentx — pull request #600 by projectkk2glider (2014-01-25 17:14:22+00:00)
Title: Added hysteresis to speaker volume change

When setting speaker volume with custom function you can have a situation where certain position of input results in constant change of volume, one level up and down. This is because of ADC noise on input which translates into two different volume levels.

My patch introduces a small hysteresis for input signal. Input signal must change more than hysteresis to be considered for new volume level calculation.