From d87cd171f4461ee0525052d9e0f15cc3897ad7ae Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 29 Jun 2021 21:28:29 -0400 Subject: [PATCH] sensors/vehicle_imu: continue integrating gyro if there's a gap in data - minor improvement that helps to determine the sensor publication rate as soon as possible --- src/modules/sensors/vehicle_imu/VehicleIMU.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sensors/vehicle_imu/VehicleIMU.cpp b/src/modules/sensors/vehicle_imu/VehicleIMU.cpp index c859455297..fb31014f92 100644 --- a/src/modules/sensors/vehicle_imu/VehicleIMU.cpp +++ b/src/modules/sensors/vehicle_imu/VehicleIMU.cpp @@ -192,7 +192,7 @@ void VehicleIMU::Run() } // check for additional updates and that we're fully caught up before publishing - if (consume_all_gyro && _sensor_gyro_sub.updated()) { + if ((consume_all_gyro || _data_gap) && _sensor_gyro_sub.updated()) { continue; }