Skip to content

Commit

Permalink
Put brackets around ROS_* macros.
Browse files Browse the repository at this point in the history
In some circumstances they may be defined to empty, so we need
to have brackets to ensure that they are syntactically valid.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Aug 7, 2018
1 parent e2ab008 commit a9e916e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions joy/src/joy_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ class Joystick
{
std::string joy_dev_path = get_dev_by_joy_name(joy_dev_name_);
if (joy_dev_path.empty())
{
ROS_ERROR("Couldn't find a joystick with name %s. Falling back to default device.", joy_dev_name_.c_str());
}
else
{
ROS_INFO("Using %s as joystick device.", joy_dev_path.c_str());
Expand All @@ -173,7 +175,9 @@ class Joystick
}

if (autorepeat_rate_ > 1 / coalesce_interval_)
{
ROS_WARN("joy_node: autorepeat_rate (%f Hz) > 1/coalesce_interval (%f Hz) does not make sense. Timing behavior is not well defined.", autorepeat_rate_, 1/coalesce_interval_);
}

if (deadzone_ >= 1)
{
Expand Down Expand Up @@ -443,7 +447,9 @@ class Joystick
close(joy_fd);
ros::spinOnce();
if (nh_.ok())
{
ROS_ERROR("Connection to joystick device lost unexpectedly. Will reopen.");
}
}

cleanup:
Expand Down

0 comments on commit a9e916e

Please sign in to comment.