mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:13:33 +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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user