px4fmu: move to WQ with uORB callback scheduling (#12224)

This commit is contained in:
Daniel Agar
2019-08-20 20:24:12 -04:00
committed by GitHub
parent b439e08e24
commit 7d248e0f45
10 changed files with 378 additions and 584 deletions
@@ -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();
+1 -1
View File
@@ -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();
}
}