| 100 | } |
| 101 | |
| 102 | void Potentiometer::setRange(u16 min, u16 max) { |
| 103 | // Ensure min < max |
| 104 | if (min >= max) { |
| 105 | return; // Invalid range, do nothing |
| 106 | } |
| 107 | mMinValue = min; |
| 108 | mMaxValue = max; |
| 109 | } |
| 110 | |
| 111 | u16 Potentiometer::getAdcMaxValue() const { |
| 112 | // Platform detection for ADC resolution |