mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 07:01:35 +08:00
ina226/voxlpm: make sure parameter sub is reset
The subscription to parameter updates has to get copied otherwise the change detection will not get reset for next time.
This commit is contained in:
@@ -210,9 +210,11 @@ INA226::collect()
|
||||
{
|
||||
perf_begin(_sample_perf);
|
||||
|
||||
parameter_update_s param_update;
|
||||
if (_parameter_update_sub.updated()) {
|
||||
// Read from topic to clear updated flag
|
||||
parameter_update_s parameter_update;
|
||||
_parameter_update_sub.copy(¶meter_update);
|
||||
|
||||
if (_parameters_sub.copy(¶m_update)) {
|
||||
updateParams();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user