Skip to content

Commit 2947fb6

Browse files
committed
Add param to docstring
1 parent 265ce3d commit 2947fb6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/components/analogIO/Wippersnapper_AnalogIO.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,16 @@ bool Wippersnapper_AnalogIO::encodePinEvent(
316316
@brief Calculates the hysteresis for the pin value.
317317
@param pin
318318
The desired analog pin to calculate hysteresis for.
319-
@param _pinValThreshHi
319+
@param pinValRaw
320+
The pin's raw value.
321+
@param pinValThreshHi
320322
The pin's high threshold value.
321-
@param _pinValThreshLow
323+
@param pinValThreshLow
322324
The pin's low threshold value.
323325
*/
324326
/**********************************************************/
325327
void calculateHysteresis(analogInputPin pin, uint16_t pinValRaw,
326-
uint16_t _pinValThreshHi, uint16_t _pinValThreshLow) {
328+
uint16_t pinValThreshHi, uint16_t pinValThreshLow) {
327329
// All boards ADC values scaled to 16bit, in future we may need to
328330
// adjust dynamically
329331
uint16_t maxDecimalValue = 65535;
@@ -342,8 +344,8 @@ void calculateHysteresis(analogInputPin pin, uint16_t pinValRaw,
342344
}
343345

344346
// get the threshold values for previous pin value
345-
_pinValThreshHi = pin.prvPinVal + CURRENT_HYSTERISIS;
346-
_pinValThreshLow = pin.prvPinVal - CURRENT_HYSTERISIS;
347+
pinValThreshHi = pin.prvPinVal + CURRENT_HYSTERISIS;
348+
pinValThreshLow = pin.prvPinVal - CURRENT_HYSTERISIS;
347349
}
348350

349351
/**********************************************************/

src/components/analogIO/Wippersnapper_AnalogIO.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class Wippersnapper_AnalogIO {
5757
int pin);
5858
void disableAnalogInPin(int pin);
5959

60+
void calculateHysteresis(analogInputPin pin, uint16_t pinValRaw,
61+
uint16_t &_pinValThreshHi, uint16_t &_pinValThreshLow);
6062
uint16_t getPinValue(int pin);
6163
float getPinValueVolts(int pin);
6264

0 commit comments

Comments
 (0)