From 19b2d7fe9a32f0f1ea5734fa234230bfee3776fe Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 8 May 2020 11:28:13 -0400 Subject: [PATCH] bmi088: fix accel schedule interval --- src/drivers/imu/bmi088/BMI088_accel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/imu/bmi088/BMI088_accel.cpp b/src/drivers/imu/bmi088/BMI088_accel.cpp index ccfaf5a82b..5ed50020ea 100644 --- a/src/drivers/imu/bmi088/BMI088_accel.cpp +++ b/src/drivers/imu/bmi088/BMI088_accel.cpp @@ -33,6 +33,8 @@ #include "BMI088_accel.hpp" +using namespace time_literals; + /* * Global variable of the accelerometer temperature reading, to read it in the bmi055_gyro driver. The variable is changed in bmi055_accel.cpp. * This is a HACK! The driver should be rewritten with the gyro as subdriver. @@ -328,7 +330,7 @@ BMI088_accel::start() reset(); /* start polling at the specified rate */ - ScheduleOnInterval(BMI088_ACCEL_DEFAULT_RATE - BMI088_TIMER_REDUCTION, 1000); + ScheduleOnInterval((1_s / BMI088_ACCEL_DEFAULT_RATE) - BMI088_TIMER_REDUCTION, 1000); }