FastLED 3.9.15
Loading...
Searching...
No Matches

◆ calculateDefaultHysteresis()

u16 Potentiometer::calculateDefaultHysteresis ( ) const
private

Definition at line 121 of file potentiometer.cpp.hpp.

121 {
122 // Default: 1% of calibrated range or minimum of 10 counts (whichever is larger)
123 u16 range = (mMaxValue > mMinValue) ? (mMaxValue - mMinValue) : getAdcMaxValue();
124 u16 one_percent = range / 100;
125 return (one_percent > 10) ? one_percent : 10;
126}

References getAdcMaxValue(), mMaxValue, and mMinValue.

Referenced by Potentiometer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: