Skip to content

Commit

Permalink
fix(test_node): fix uncrustify errors
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Panferov <[email protected]>
  • Loading branch information
lexavtanke committed Mar 20, 2024
1 parent 12cac57 commit c43d40a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/test_node/src/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TestNode::TestNode(const rclcpp::NodeOptions & options)
autoware_node::AutowareNode::self_name.c_str());
monitored_subscription_ =
autoware_node::AutowareNode::create_monitored_subscription<std_msgs::msg::String>(
"topic", 10, 10, std::bind(&TestNode::topic_callback, this, _1));
"topic", 10, 10, std::bind(&TestNode::topic_callback, this, _1));
}

void TestNode::topic_callback(const std_msgs::msg::String::SharedPtr msg)
Expand Down
7 changes: 4 additions & 3 deletions common/test_node/src/test_pub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ using std::chrono::operator""ms;
class MinimalPublisher : public rclcpp::Node
{
public:
MinimalPublisher() : Node("minimal_publisher"), count_(0)
MinimalPublisher()
: Node("minimal_publisher"), count_(0)
{
rclcpp::QoS qos_profile(10);
declare_parameter<int>("hz", 10);
int hz = get_parameter("hz").as_int();
std::chrono::milliseconds timer_period{static_cast<int>(1.0 / hz * 1000)};
std::chrono::milliseconds lease_duration{static_cast<int>(1.0 / hz * 1000 * 1.1)};
qos_profile.liveliness(RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC)
.liveliness_lease_duration(lease_duration)
.deadline(lease_duration);
.liveliness_lease_duration(lease_duration)
.deadline(lease_duration);
publisher_ = this->create_publisher<std_msgs::msg::String>("topic", qos_profile);
timer_ =
this->create_wall_timer(timer_period, std::bind(&MinimalPublisher::timer_callback, this));
Expand Down

0 comments on commit c43d40a

Please sign in to comment.