parameter_update use uORB::Subscription consistently

This commit is contained in:
Daniel Agar
2019-07-28 11:55:52 -04:00
parent bbb96cbd0c
commit c8e59c4e39
47 changed files with 274 additions and 259 deletions
@@ -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();
}