From 37575860051908dfd87c49423cc7127e6bd38b9e Mon Sep 17 00:00:00 2001 From: Jakub Hulas Date: Wed, 25 Oct 2023 16:20:26 +0300 Subject: [PATCH] style: fix cpplint and uncrustify --- .../include/diagnostic_aggregator/aggregator.hpp | 11 +++++++++-- diagnostic_aggregator/src/aggregator.cpp | 7 ++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/diagnostic_aggregator/include/diagnostic_aggregator/aggregator.hpp b/diagnostic_aggregator/include/diagnostic_aggregator/aggregator.hpp index 652b47b6c..b901acdc0 100644 --- a/diagnostic_aggregator/include/diagnostic_aggregator/aggregator.hpp +++ b/diagnostic_aggregator/include/diagnostic_aggregator/aggregator.hpp @@ -152,8 +152,15 @@ class Aggregator std::string base_path_; /**< \brief Prepended to all status names of aggregator. */ - bool critical_; /**< \brief If true, aggregator will publish an error immediately after receiving. */ - std::uint8_t last_top_level_state_; /**< \brief Store the last top level value to publish the critical error only once */ + /*! + *\brief If true, aggregator will publish an error immediately after receiving. + */ + bool critical_; + + /*! + *\brief Store the last top level value to publish the critical error only once. + */ + std::uint8_t last_top_level_state_; /// Records all ROS warnings. No warnings are repeated. std::set ros_warnings_; diff --git a/diagnostic_aggregator/src/aggregator.cpp b/diagnostic_aggregator/src/aggregator.cpp index 5ce473aa1..d9576c737 100644 --- a/diagnostic_aggregator/src/aggregator.cpp +++ b/diagnostic_aggregator/src/aggregator.cpp @@ -156,8 +156,9 @@ void Aggregator::diagCallback(const DiagnosticArray::SharedPtr diag_msg) for (auto j = 0u; j < diag_msg->status.size(); ++j) { analyzed = false; - const bool top_level_state_transition_to_error = (last_top_level_state_ != DiagnosticStatus::ERROR) - && (diag_msg->status[j].level == DiagnosticStatus::ERROR); + const bool top_level_state_transition_to_error = + (last_top_level_state_ != DiagnosticStatus::ERROR) && + (diag_msg->status[j].level == DiagnosticStatus::ERROR); if (critical_ && top_level_state_transition_to_error) { RCLCPP_DEBUG( @@ -171,7 +172,7 @@ void Aggregator::diagCallback(const DiagnosticArray::SharedPtr diag_msg) // store the last published state last_top_level_state_ = diag_toplevel_state.level; } - + auto item = std::make_shared(&diag_msg->status[j]); if (analyzer_group_->match(item->getName())) {