parameter_update use uORB::Subscription consistently

This commit is contained in:
Daniel Agar
2019-09-29 10:49:03 -04:00
parent bbb96cbd0c
commit c8e59c4e39
47 changed files with 274 additions and 259 deletions
@@ -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();
}