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.
This commit is contained in:
marcojob
2023-12-13 02:56:59 +01:00
committed by GitHub
parent 91e3ec5884
commit cf62dad28d
@@ -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);