mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 10:23:33 +08:00
parameter_update use uORB::Subscription consistently
This commit is contained in:
@@ -137,11 +137,13 @@ MulticopterAttitudeControl::parameters_updated()
|
||||
void
|
||||
MulticopterAttitudeControl::parameter_update_poll()
|
||||
{
|
||||
/* Check if parameters have changed */
|
||||
parameter_update_s param_update;
|
||||
// check for parameter updates
|
||||
if (_parameter_update_sub.updated()) {
|
||||
// clear update
|
||||
parameter_update_s pupdate;
|
||||
_parameter_update_sub.copy(&pupdate);
|
||||
|
||||
if (_params_sub.update(¶m_update)) {
|
||||
updateParams();
|
||||
// update parameters from storage
|
||||
parameters_updated();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user