mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 13:53:33 +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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user