From 08d65280f1e904c28c8c5f8032ff90111b7b521e Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 8 May 2020 11:28:11 -0400 Subject: [PATCH] bmi055: fix accel schedule interval --- src/drivers/imu/bmi055/BMI055_accel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/imu/bmi055/BMI055_accel.cpp b/src/drivers/imu/bmi055/BMI055_accel.cpp index e03ab991e3..6a62e27361 100644 --- a/src/drivers/imu/bmi055/BMI055_accel.cpp +++ b/src/drivers/imu/bmi055/BMI055_accel.cpp @@ -33,6 +33,8 @@ #include "BMI055_accel.hpp" +using namespace time_literals; + /* list of registers that will be checked in check_registers(). Note that ADDR_WHO_AM_I must be first in the list. @@ -215,7 +217,7 @@ void BMI055_accel::start() { /* start polling at the specified rate */ - ScheduleOnInterval(BMI055_ACCEL_DEFAULT_RATE - BMI055_TIMER_REDUCTION, 1000); + ScheduleOnInterval((1_s / BMI055_ACCEL_DEFAULT_RATE) - BMI055_TIMER_REDUCTION, 1000); } void