Skip to content

Commit

Permalink
Shorten the callback definition for uncrustify. (#163)
Browse files Browse the repository at this point in the history
This should ensure that it works for both uncrustify 0.72
and 0.78.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Feb 26, 2024
1 parent 182d3f4 commit 6100a94
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions turtlesim/tutorials/teleop_turtle_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,12 @@ class TeleopTurtle final

void sendGoal(float theta)
{
auto goal = turtlesim::action::RotateAbsolute::Goal();
using Rotate = turtlesim::action::RotateAbsolute;
auto goal = Rotate::Goal();
goal.theta = theta;
auto send_goal_options =
rclcpp_action::Client<turtlesim::action::RotateAbsolute>::SendGoalOptions();
auto send_goal_options = rclcpp_action::Client<Rotate>::SendGoalOptions();
send_goal_options.goal_response_callback =
[this](rclcpp_action::ClientGoalHandle<turtlesim::action::RotateAbsolute>::SharedPtr
goal_handle)
[this](rclcpp_action::ClientGoalHandle<Rotate>::SharedPtr goal_handle)
{
RCLCPP_DEBUG(nh_->get_logger(), "Goal response received");
this->goal_handle_ = goal_handle;
Expand Down

0 comments on commit 6100a94

Please sign in to comment.