filter: correct comments about the threshold's unit

See d6e5313497 for confirmation that the
threshold is intended to be in mm/s, the comment here is simply a leftover from
earlier times when the acceleration method was using device-units only.

Fixes #585

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2021-03-16 14:28:31 +10:00
parent cbff56e6a2
commit 1d0dbd2461
2 changed files with 6 additions and 6 deletions

View file

@ -38,8 +38,8 @@
* Default parameters for pointer acceleration profiles.
*/
#define DEFAULT_THRESHOLD v_ms2us(0.4) /* in units/us */
#define MINIMUM_THRESHOLD v_ms2us(0.2) /* in units/us */
#define DEFAULT_THRESHOLD v_ms2us(0.4) /* in 1000dpi units/us */
#define MINIMUM_THRESHOLD v_ms2us(0.2) /* in 1000dpi units/us */
#define DEFAULT_ACCELERATION 2.0 /* unitless factor */
#define DEFAULT_INCLINE 1.1 /* unitless factor */
@ -53,7 +53,7 @@ struct pointer_accelerator {
struct pointer_trackers trackers;
double threshold; /* units/us */
double threshold; /* 1000dpi units/us */
double accel; /* unitless factor */
double incline; /* incline of the function */
@ -231,7 +231,7 @@ pointer_accel_profile_linear(struct motion_filter *filter,
struct pointer_accelerator *accel_filter =
(struct pointer_accelerator *)filter;
const double max_accel = accel_filter->accel; /* unitless factor */
const double threshold = accel_filter->threshold; /* units/us */
const double threshold = accel_filter->threshold; /* 1000dpi units/us */
const double incline = accel_filter->incline;
double factor; /* unitless */

View file

@ -50,7 +50,7 @@ struct touchpad_accelerator {
struct pointer_trackers trackers;
double threshold; /* units/us */
double threshold; /* mm/s */
double accel; /* unitless factor */
int dpi;
@ -233,7 +233,7 @@ touchpad_accel_profile_linear(struct motion_filter *filter,
{
struct touchpad_accelerator *accel_filter =
(struct touchpad_accelerator *)filter;
const double threshold = accel_filter->threshold; /* units/us */
const double threshold = accel_filter->threshold; /* mm/s */
const double baseline = 0.9;
double factor; /* unitless */