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;
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;
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;
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;
* movement in normal use-cases (pause, move, pause, move)
*/
return calculate_trackers_velocity(tracker,
- tracker->time + MOTION_TIMEOUT,
- smoothener);
+ tracker->time + MOTION_TIMEOUT,
+ smoothener);
}
/**
*
* @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
*