Skip to content

Commit

Permalink
update write cycle statistics only if it is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Jan 16, 2025
1 parent b74a55b commit ba7275a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3456,12 +3456,17 @@ void ControllerManager::hardware_components_diagnostic_callback(
}
};

// For components : {actuator, sensor and system}
update_stats(
component_name, component_info.read_statistics, read_cycle_suffix, level, component_info,
params_);
update_stats(
component_name, component_info.write_statistics, write_cycle_suffix, level, component_info,
params_);
// For components : {actuator and system}
if (component_info.write_statistics)
{
update_stats(
component_name, component_info.write_statistics, write_cycle_suffix, level,
component_info, params_);
}
}
}

Expand Down

0 comments on commit ba7275a

Please sign in to comment.