Skip to content

Commit

Permalink
Rename return type
Browse files Browse the repository at this point in the history
This should better reflect what this is meant for.
  • Loading branch information
fmauch committed May 15, 2023
1 parent 23dd762 commit 2dffe5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum class return_type : std::uint8_t
{
OK = 0,
ERROR = 1,
INACTIVE = 2,
READ_ONLY = 2,
};

} // namespace hardware_interface
Expand Down
4 changes: 2 additions & 2 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ HardwareReadWriteStatus ResourceManager::read(
read_write_status.failed_hardware_names.push_back(component.get_name());
resource_storage_->remove_all_hardware_interfaces_from_available_list(component.get_name());
}
else if (ret_val == return_type::INACTIVE)
else if (ret_val == return_type::READ_ONLY)
{
using lifecycle_msgs::msg::State;
rclcpp_lifecycle::State state(State::PRIMARY_STATE_INACTIVE, lifecycle_state_names::INACTIVE);
Expand Down Expand Up @@ -1121,7 +1121,7 @@ HardwareReadWriteStatus ResourceManager::write(
read_write_status.failed_hardware_names.push_back(component.get_name());
resource_storage_->remove_all_hardware_interfaces_from_available_list(component.get_name());
}
else if (ret_val == return_type::INACTIVE)
else if (ret_val == return_type::READ_ONLY)
{
using lifecycle_msgs::msg::State;
rclcpp_lifecycle::State state(State::PRIMARY_STATE_INACTIVE, lifecycle_state_names::INACTIVE);
Expand Down

0 comments on commit 2dffe5d

Please sign in to comment.