mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 02:01:36 +08:00
drivers/imu: ensure timestamp_sample adjustment isn't done as float (continued)
This commit is contained in:
@@ -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--;
|
||||
|
||||
Reference in New Issue
Block a user