mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 06:53:33 +08:00
px4fmu: move to WQ with uORB callback scheduling (#12224)
This commit is contained in:
@@ -242,7 +242,7 @@ VehicleAngularVelocity::Run()
|
||||
rates -= _bias;
|
||||
|
||||
vehicle_angular_velocity_s angular_velocity;
|
||||
angular_velocity.timestamp_sample = sensor_data.timestamp;
|
||||
angular_velocity.timestamp_sample = sensor_data.timestamp_sample;
|
||||
rates.copyTo(angular_velocity.xyz);
|
||||
angular_velocity.timestamp = hrt_absolute_time();
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
void call() override
|
||||
{
|
||||
// schedule immediately if no interval, otherwise check time elapsed
|
||||
if ((_interval_us == 0) || (hrt_elapsed_time(&_last_update) >= _interval_us)) {
|
||||
if ((_interval_us == 0) || (hrt_elapsed_time_atomic(&_last_update) >= _interval_us)) {
|
||||
_work_item->ScheduleNow();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user