Revert "tablet: fix the pressure offset range being off by one"

Fixing the range is only required when the output range is not inclusive
of the min/max (such as when mapping an abs axis to a screen width).

Our pressure range is inclusive 0.0 and 1.0, so we want absinfo->maximum
to map to exactly 1.0

This reverts commit a5b6f4009b.
This commit is contained in:
Peter Hutterer 2024-01-16 14:29:56 +10:00
parent 8bb53150a9
commit f20eefbc59

View file

@ -364,7 +364,7 @@ normalize_pressure(const struct input_absinfo *absinfo,
* threshold is 0 pressure.
*/
int base = tool->pressure.threshold.lower;
double range = absinfo->maximum - base + 1;
double range = absinfo->maximum - base;
double value = (absinfo->value - base) / range;
return max(0.0, value);