Skip to content

Commit

Permalink
hal_hw_interface: Don't hide GenericHWInterface init function
Browse files Browse the repository at this point in the history
This renames init to init_hal to better describe what it does. This
should be safe to do because init_hal is called explicitly (not via
virtual dispatch).
  • Loading branch information
Robert W. Ellenberg authored and zultron committed Sep 18, 2021
1 parent 2be7a5e commit 0f5b36c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class HalHWInterface : public ros_control_boilerplate::GenericHWInterface
*/
//* \todo Give this an int return value for reporting failure
//* \todo Make the `reset` pin an IO pin
void init(void (*funct)(void*, long));
void init_hal(void (*funct)(void*, long));

/**
* \brief Create float-type HAL pins for each joint
Expand Down
2 changes: 1 addition & 1 deletion hal_hw_interface/src/hal_control_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ HalRosControlLoop::HalRosControlLoop() : node_is_shutdown(0)
CNAME);

// Init HAL hardware interface
hardware_interface_->init(&funct);
hardware_interface_->init_hal(&funct);

HAL_ROS_LOG_INFO(CNAME, "%s: Done initializing HAL hardware interface",
CNAME);
Expand Down
2 changes: 1 addition & 1 deletion hal_hw_interface/src/hal_hw_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ HalHWInterface::HalHWInterface(ros::NodeHandle& nh, urdf::Model* urdf_model)
{
}

void HalHWInterface::init(void (*funct)(void*, long))
void HalHWInterface::init_hal(void (*funct)(void*, long))
{
HAL_ROS_LOG_INFO(CNAME, "%s: Initializing HAL hardware interface", CNAME);

Expand Down

0 comments on commit 0f5b36c

Please sign in to comment.