summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/motion_sense.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index 702c44771b..cd80833211 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -1061,6 +1061,10 @@ static int host_cmd_motion_sense(struct host_cmd_handler_args *args)
sensor, in->ec_rate.data * MSEC);
/* Bound the new sampling rate. */
motion_sense_set_motion_intervals();
+
+ /* Force a collection to purge old events. */
+ task_set_event(TASK_ID_MOTIONSENSE,
+ TASK_EVENT_MOTION_ODR_CHANGE, 0);
}
out->ec_rate.ret = motion_sense_ec_rate(sensor) / MSEC;