filter: a few whitespace fixes and extra comments

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2022-09-02 14:18:26 +10:00
parent 70c57e9644
commit 9179acd638
3 changed files with 12 additions and 10 deletions

View file

@ -81,11 +81,12 @@ calculate_acceleration_factor(struct pointer_accelerator *accel,
trackers_feed(&accel->trackers, unaccelerated, time);
velocity = trackers_velocity(&accel->trackers, time);
/* This will call into our pointer_accel_profile_linear() profile func */
accel_factor = calculate_acceleration_simpsons(&accel->base,
accel->profile,
data,
velocity,
accel->last_velocity,
velocity, /* normalized coords */
accel->last_velocity, /* normalized coords */
time);
accel->last_velocity = velocity;

View file

@ -46,8 +46,8 @@ struct touchpad_accelerator_flat {
static struct normalized_coords
accelerator_filter_touchpad_flat(struct motion_filter *filter,
const struct device_float_coords *unaccelerated,
void *data, uint64_t time)
const struct device_float_coords *unaccelerated,
void *data, uint64_t time)
{
struct touchpad_accelerator_flat *accel =
(struct touchpad_accelerator_flat *)filter;
@ -66,8 +66,8 @@ accelerator_filter_touchpad_flat(struct motion_filter *filter,
static struct normalized_coords
accelerator_filter_noop_touchpad_flat(struct motion_filter *filter,
const struct device_float_coords *unaccelerated,
void *data, uint64_t time)
const struct device_float_coords *unaccelerated,
void *data, uint64_t time)
{
struct touchpad_accelerator_flat *accel =
(struct touchpad_accelerator_flat *) filter;
@ -82,7 +82,7 @@ accelerator_filter_noop_touchpad_flat(struct motion_filter *filter,
static bool
accelerator_set_speed_touchpad_flat(struct motion_filter *filter,
double speed_adjustment)
double speed_adjustment)
{
struct touchpad_accelerator_flat *accel_filter =
(struct touchpad_accelerator_flat *)filter;

View file

@ -189,8 +189,8 @@ trackers_velocity_after_timeout(struct pointer_tracker *tracker,
* movement in normal use-cases (pause, move, pause, move)
*/
return calculate_trackers_velocity(tracker,
tracker->time + MOTION_TIMEOUT,
smoothener);
tracker->time + MOTION_TIMEOUT,
smoothener);
}
/**
@ -269,7 +269,8 @@ trackers_velocity(struct pointer_trackers *trackers, uint64_t time)
*
* @param accel The acceleration filter
* @param data Caller-specific data
* @param velocity Velocity in device-units per µs
* @param velocity Velocity - depending on the caller this may be in
* device-units per µs or normalized per µs
* @param last_velocity Previous velocity in device-units per µs
* @param time Current time in µs
*