From cf62dad28d32052032db4bdfc186b78289aa1416 Mon Sep 17 00:00:00 2001 From: marcojob <44396071+marcojob@users.noreply.github.com> Date: Wed, 13 Dec 2023 02:56:59 +0100 Subject: [PATCH] sensors/VehicleAngularVelocity: fix force SensorSelectionUpdate - This fixes the force call on SensorSelectionUpdate - In contrary to the rest of the codebase, this method also takes a timestamp: When you call SensorSelectionUpdate(true), time_now_us is actually set to 1 and force stays false, as this is the default value for in the method. --- .../vehicle_angular_velocity/VehicleAngularVelocity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/sensors/vehicle_angular_velocity/VehicleAngularVelocity.cpp b/src/modules/sensors/vehicle_angular_velocity/VehicleAngularVelocity.cpp index 0264c930de..f2b0d3540b 100644 --- a/src/modules/sensors/vehicle_angular_velocity/VehicleAngularVelocity.cpp +++ b/src/modules/sensors/vehicle_angular_velocity/VehicleAngularVelocity.cpp @@ -79,7 +79,7 @@ bool VehicleAngularVelocity::Start() return false; } - if (!SensorSelectionUpdate(true)) { + if (!SensorSelectionUpdate(hrt_absolute_time(), true)) { ScheduleNow(); } @@ -906,7 +906,7 @@ void VehicleAngularVelocity::Run() // force reselection on timeout if (time_now_us > _last_publish + 500_ms) { - SensorSelectionUpdate(true); + SensorSelectionUpdate(time_now_us, true); } perf_end(_cycle_perf);