Skip to content

Commit

Permalink
renamed set functions to include datatypes in name
Browse files Browse the repository at this point in the history
  • Loading branch information
bsutherland333 committed Jun 17, 2024
1 parent d42d840 commit cafa745
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions rosplane/include/param_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ class param_manager
* This function sets a previously declared parameter to a new value in both the parameter object
* and the ROS system.
*/
void set_parameter(std::string param_name, double value);
void set_parameter(std::string param_name, bool value);
void set_double(std::string param_name, double value);
void set_bool(std::string param_name, bool value);
void set_int(std::string param_name, int64_t value);
void set_parameter(std::string param_name, std::string value);
void set_string(std::string param_name, std::string value);

/**
* This function should be called in the parametersCallback function in a containing ROS node.
Expand Down
6 changes: 3 additions & 3 deletions rosplane/src/param_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void param_manager::declare_string(std::string param_name, std::string value)
container_node_->declare_parameter(param_name, value);
}

void param_manager::set_parameter(std::string param_name, double value)
void param_manager::set_double(std::string param_name, double value)
{
// Check that the parameter is in the parameter struct
if (params_.find(param_name) == params_.end())
Expand All @@ -52,7 +52,7 @@ void param_manager::set_parameter(std::string param_name, double value)
container_node_->set_parameter(rclcpp::Parameter(param_name, value));
}

void param_manager::set_parameter(std::string param_name, bool value)
void param_manager::set_bool(std::string param_name, bool value)
{
// Check that the parameter is in the parameter struct
if (params_.find(param_name) == params_.end())
Expand Down Expand Up @@ -82,7 +82,7 @@ void param_manager::set_int(std::string param_name, int64_t value)
container_node_->set_parameter(rclcpp::Parameter(param_name, value));
}

void param_manager::set_parameter(std::string param_name, std::string value)
void param_manager::set_string(std::string param_name, std::string value)
{
// Check that the parameter is in the parameter struct
if (params_.find(param_name) == params_.end())
Expand Down

0 comments on commit cafa745

Please sign in to comment.