mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 10:43:34 +08:00
parameter_update use uORB::Subscription consistently
This commit is contained in:
@@ -333,13 +333,13 @@ VtolAttitudeControl::Run()
|
||||
}
|
||||
|
||||
if (should_run) {
|
||||
/* only update parameters if they changed */
|
||||
if (_params_sub.updated()) {
|
||||
/* read from param to clear updated flag */
|
||||
parameter_update_s update;
|
||||
_params_sub.copy(&update);
|
||||
// check for parameter updates
|
||||
if (_parameter_update_sub.updated()) {
|
||||
// clear update
|
||||
parameter_update_s pupdate;
|
||||
_parameter_update_sub.copy(&pupdate);
|
||||
|
||||
/* update parameters from storage */
|
||||
// update parameters from storage
|
||||
parameters_update();
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ private:
|
||||
uORB::Subscription _local_pos_sub{ORB_ID(vehicle_local_position)}; // sensor subscription
|
||||
uORB::Subscription _manual_control_sp_sub{ORB_ID(manual_control_setpoint)}; //manual control setpoint subscription
|
||||
uORB::Subscription _mc_virtual_att_sp_sub{ORB_ID(mc_virtual_attitude_setpoint)};
|
||||
uORB::Subscription _params_sub{ORB_ID(parameter_update)}; //parameter updates subscription
|
||||
uORB::Subscription _parameter_update_sub{ORB_ID(parameter_update)};
|
||||
uORB::Subscription _pos_sp_triplet_sub{ORB_ID(position_setpoint_triplet)}; // local position setpoint subscription
|
||||
uORB::Subscription _tecs_status_sub{ORB_ID(tecs_status)};
|
||||
uORB::Subscription _v_att_sub{ORB_ID(vehicle_attitude)}; //vehicle attitude subscription
|
||||
|
||||
Reference in New Issue
Block a user