Skip to content

Commit 4819578

Browse files
committed
Revert "Add inRange() functions to AnalogInput class"
Changing my mind on this. Going to tackle it in another way. This reverts commit 6c5ba50.
1 parent 6c5ba50 commit 4819578

2 files changed

Lines changed: 0 additions & 37 deletions

File tree

src/SimRacing.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -285,26 +285,6 @@ int AnalogInput::getPositionRaw() const {
285285
return this->position;
286286
}
287287

288-
bool AnalogInput::inRange() const {
289-
return inRange(this->getPositionRaw());
290-
}
291-
292-
bool AnalogInput::inRange(int p) const {
293-
bool output;
294-
295-
// In 'normal' orientation, we are within range if the position
296-
// is above the min and below the max.
297-
if (!isInverted()) {
298-
output = (p >= getMin() && p <= getMax());
299-
}
300-
// In 'inverted' orientation, we are within range if the position
301-
// is below the min and above the max.
302-
else {
303-
output = (p >= getMax() && p <= getMin());
304-
}
305-
return output;
306-
}
307-
308288
bool AnalogInput::isInverted() const {
309289
return (this->cal.min > this->cal.max); // inverted if min is greater than max
310290
}

src/SimRacing.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -175,23 +175,6 @@ namespace SimRacing {
175175
*/
176176
int getMax() const { return this->cal.max; }
177177

178-
/**
179-
* Checks whether the current position is within the calibrated
180-
* range of the axis.
181-
*
182-
* @return 'true' if position is within range, 'false' otherwise
183-
*/
184-
bool inRange() const;
185-
186-
/**
187-
* Checks whether a given input value is within the calibrated
188-
* range of the axis.
189-
*
190-
* @param p position value to test
191-
* @return 'true' if test value is within range, 'false' otherwise
192-
*/
193-
bool inRange(int p) const;
194-
195178
/**
196179
* Check whether the axis is inverted or not.
197180
*

0 commit comments

Comments
 (0)