mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 08:40:35 +08:00
parameter_update use uORB::Subscription consistently
This commit is contained in:
@@ -454,15 +454,16 @@ void FixedwingAttitudeControl::Run()
|
||||
|
||||
if (_att_sub.update(&_att)) {
|
||||
|
||||
/* only update parameters if they changed */
|
||||
bool params_updated = _params_sub.updated();
|
||||
// only update parameters if they changed
|
||||
bool params_updated = _parameter_update_sub.updated();
|
||||
|
||||
// check for parameter updates
|
||||
if (params_updated) {
|
||||
/* read from param to clear updated flag */
|
||||
parameter_update_s update;
|
||||
_params_sub.copy(&update);
|
||||
// clear update
|
||||
parameter_update_s pupdate;
|
||||
_parameter_update_sub.copy(&pupdate);
|
||||
|
||||
/* update parameters from storage */
|
||||
// update parameters from storage
|
||||
parameters_update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user