Commit b64828e7 authored by Peter Hutterer's avatar Peter Hutterer

filter: drop an unused function and an unused struct

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 6edf2ed5
......@@ -43,21 +43,6 @@ struct tablet_accelerator_flat {
yres_scale; /* 1000dpi : tablet res */
};
struct trackpoint_accelerator {
struct motion_filter base;
struct device_float_coords history[4];
size_t history_size;
double scale_factor;
double max_accel;
double max_delta;
double incline; /* incline of the function */
double offset; /* offset of the function */
};
static inline struct normalized_coords
tablet_accelerator_filter_flat_mouse(struct tablet_accelerator_flat *filter,
const struct device_float_coords *units)
......
......@@ -129,37 +129,6 @@ calculate_acceleration(struct pointer_accelerator_x230 *accel,
return factor; /* unitless factor */
}
/**
* Calculate the acceleration factor for the given delta with the timestamp.
*
* @param accel The acceleration filter
* @param unaccelerated The raw delta in the device's dpi
* @param data Caller-specific data
* @param time Current time in µs
*
* @return A unitless acceleration factor, to be applied to the delta
*/
static inline double
calculate_acceleration_factor(struct pointer_accelerator_x230 *accel,
const struct device_float_coords *unaccelerated,
void *data,
uint64_t time)
{
double velocity; /* units/us in device-native dpi*/
double accel_factor;
trackers_feed(&accel->trackers, unaccelerated, time);
velocity = trackers_velocity(&accel->trackers, time);
accel_factor = calculate_acceleration(accel,
data,
velocity,
accel->last_velocity,
time);
accel->last_velocity = velocity;
return accel_factor;
}
static struct normalized_coords
accelerator_filter_x230(struct motion_filter *filter,
const struct device_float_coords *raw,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment