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
+7 -2
View File
@@ -151,10 +151,15 @@ void LandDetector::Run()
void LandDetector::_check_params(const bool force)
{
parameter_update_s param_update;
// check for parameter updates
if (_parameter_update_sub.updated() || force) {
// clear update
parameter_update_s pupdate;
_parameter_update_sub.copy(&pupdate);
if (_param_update_sub.update(&param_update) || force) {
// update parameters from storage
_update_params();
_update_total_flight_time();
}
}