From f0dde453032b3bf40e7c7f90e766054f385d5258 Mon Sep 17 00:00:00 2001 From: JacobCrabill Date: Tue, 24 Mar 2020 13:59:36 -0700 Subject: [PATCH] BMI055: Bug fix scheduling interval. --- src/drivers/imu/bmi055/BMI055_gyro.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/imu/bmi055/BMI055_gyro.cpp b/src/drivers/imu/bmi055/BMI055_gyro.cpp index e7e4f288e7..69581fc42a 100644 --- a/src/drivers/imu/bmi055/BMI055_gyro.cpp +++ b/src/drivers/imu/bmi055/BMI055_gyro.cpp @@ -33,6 +33,8 @@ #include "BMI055_gyro.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. @@ -252,7 +254,7 @@ void BMI055_gyro::start() { /* start polling at the specified rate */ - ScheduleOnInterval(BMI055_GYRO_DEFAULT_RATE - BMI055_TIMER_REDUCTION, 1000); + ScheduleOnInterval((1_s / BMI055_GYRO_DEFAULT_RATE) - BMI055_TIMER_REDUCTION, 1000); } void