mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 06:53:34 +08:00
parameter_update use uORB::Subscription consistently
This commit is contained in:
@@ -292,9 +292,13 @@ float Heater::temperature_setpoint(char *argv[])
|
||||
|
||||
void Heater::update_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 (_params_sub.update(¶m_update) || force) {
|
||||
// update parameters from storage
|
||||
ModuleParams::updateParams();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ private:
|
||||
|
||||
float _integrator_value = 0.0f;
|
||||
|
||||
uORB::Subscription _params_sub{ORB_ID(parameter_update)};
|
||||
uORB::Subscription _parameter_update_sub{ORB_ID(parameter_update)};
|
||||
|
||||
float _proportional_value = 0.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user