mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-17 05:30:35 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user