drivers/imu: ensure timestamp_sample adjustment isn't done as float (continued)

This commit is contained in:
Daniel Agar
2021-10-06 10:19:01 -04:00
parent e31dd34388
commit b5d401b20c
6 changed files with 6 additions and 6 deletions
@@ -206,7 +206,7 @@ void BMI055_Accelerometer::RunImpl()
if (samples == _fifo_samples + 1) {
// sample timestamp set from data ready already corresponds to _fifo_samples
if (timestamp_sample == 0) {
timestamp_sample = now - FIFO_SAMPLE_DT;
timestamp_sample = now - static_cast<int>(FIFO_SAMPLE_DT);
}
samples--;
@@ -206,7 +206,7 @@ void BMI055_Gyroscope::RunImpl()
if (samples == _fifo_samples + 1) {
// sample timestamp set from data ready already corresponds to _fifo_samples
if (timestamp_sample == 0) {
timestamp_sample = now - FIFO_SAMPLE_DT;
timestamp_sample = now - static_cast<int>(FIFO_SAMPLE_DT);
}
samples--;
@@ -207,7 +207,7 @@ void BMI088_Gyroscope::RunImpl()
if (samples == _fifo_samples + 1) {
// sample timestamp set from data ready already corresponds to _fifo_samples
if (timestamp_sample == 0) {
timestamp_sample = now - FIFO_SAMPLE_DT;
timestamp_sample = now - static_cast<int>(FIFO_SAMPLE_DT);
}
samples--;