Skip to content

Commit

Permalink
Minor linting
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Tudela <[email protected]>
  • Loading branch information
ajtudela committed Jul 26, 2024
1 parent dc73612 commit c2e15c3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 19 deletions.
6 changes: 2 additions & 4 deletions scitos2_core/include/scitos2_core/module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ class Module
* @param name Name of the module
*/
virtual void configure(
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent,
std::string name) = 0;
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name) = 0;

/**
* @brief Method to cleanup resources.
Expand Down Expand Up @@ -194,8 +193,7 @@ class Module
* @return std::string The value of the parameter
*/
std::string get_mira_param(
const std::weak_ptr<mira::Authority> & authority,
std::string param_name)
const std::weak_ptr<mira::Authority> & authority, std::string param_name)
{
// Convert weak_ptr to shared_ptr
auto sharedAuthority = authority.lock();
Expand Down
9 changes: 3 additions & 6 deletions scitos2_modules/include/scitos2_modules/charger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ class Charger : public scitos2_core::Module
* @param name Name of plugin
*/
void configure(
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent,
std::string name) override;
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name) override;

/**
* @brief Cleanup the module state machine.
Expand Down Expand Up @@ -116,8 +115,7 @@ class Charger : public scitos2_core::Module
* @return sensor_msgs::msg::BatteryState BatteryState for ROS
*/
sensor_msgs::msg::BatteryState miraToRosBatteryState(
const mira::robot::BatteryState & state,
const mira::Time & timestamp);
const mira::robot::BatteryState & state, const mira::Time & timestamp);

/**
* @brief Convert MIRA ChargerStatus to ROS ChargerStatus.
Expand All @@ -127,8 +125,7 @@ class Charger : public scitos2_core::Module
* @return scitos2_msgs::msg::ChargerStatus ChargerStatus for ROS
*/
scitos2_msgs::msg::ChargerStatus miraToRosChargerStatus(
const uint8 & status,
const mira::Time & timestamp);
const uint8 & status, const mira::Time & timestamp);

// MIRA Authority
std::shared_ptr<mira::Authority> authority_;
Expand Down
3 changes: 1 addition & 2 deletions scitos2_modules/include/scitos2_modules/display.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ class Display : public scitos2_core::Module
* @param name Name of plugin
*/
void configure(
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent,
std::string name) override;
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name) override;

/**
* @brief Cleanup the module state machine.
Expand Down
3 changes: 1 addition & 2 deletions scitos2_modules/include/scitos2_modules/drive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ class Drive : public scitos2_core::Module
* @param name Name of plugin
*/
void configure(
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent,
std::string name) override;
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name) override;

/**
* @brief Cleanup the module state machine.
Expand Down
3 changes: 1 addition & 2 deletions scitos2_modules/include/scitos2_modules/ebc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ class EBC : public scitos2_core::Module
* @param name Name of plugin
*/
void configure(
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent,
std::string name) override;
const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent, std::string name) override;

/**
* @brief Cleanup the module state machine.
Expand Down
3 changes: 0 additions & 3 deletions scitos2_modules/test/test_charger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ TEST(ScitosChargerTest, configure) {
// Cleaning up
module->deactivate();
module->cleanup();
node->deactivate();
node->cleanup();
node->shutdown();
rclcpp::shutdown();
}

Expand Down

0 comments on commit c2e15c3

Please sign in to comment.