diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/motion_sense.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c index 8c6a8516d9..6e6c2da1f4 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -240,7 +240,7 @@ int motion_sense_set_data_rate(struct motion_sensor_t *sensor) * In case the AP want to run the sensors faster than it can, * be sure we don't see the ratio to 0. */ - sensor->oversampling_ratio = MIN(1, + sensor->oversampling_ratio = MAX(1, sensor->drv->get_data_rate(sensor) / ap_odr_mhz); else sensor->oversampling_ratio = 0; |