Skip to content

Commit b59bcce

Browse files
committed
Uncrustify
1 parent 15653d5 commit b59bcce

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

tutorials/zed_ipc/src/components/include/pointcloud_component.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class PointCloudComponent : public rclcpp::Node
6767
std::vector<std::unique_ptr<WinAvg>> _stats;
6868
std::vector<std::chrono::high_resolution_clock::time_point> _times;
6969
std::vector<int> _counters;
70-
std::vector<bool> _firsts;
70+
std::vector<bool> _firsts;
7171
// <---- Statistics
7272
};
7373

tutorials/zed_ipc/src/components/src/pointcloud_component.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace stereolabs
2323

2424
PointCloudComponent::PointCloudComponent(const rclcpp::NodeOptions & options)
2525
: Node("pointcloud_node", options)
26-
, _qos(1)
26+
, _qos(1)
2727
{
2828
RCLCPP_INFO(get_logger(), "********************************");
2929
RCLCPP_INFO(get_logger(), " Point Cloud Sub Component ");
@@ -44,12 +44,12 @@ PointCloudComponent::PointCloudComponent(const rclcpp::NodeOptions & options)
4444
readParameters();
4545

4646
_stats.resize(_camCount);
47-
for(int i = 0; i < _camCount; i++) {
47+
for (int i = 0; i < _camCount; i++) {
4848
_stats[i] = std::make_unique<WinAvg>(500);
4949
}
5050
_times.resize(_camCount);
51-
_firsts.resize(_camCount,false);
52-
_counters.resize(_camCount,0);
51+
_firsts.resize(_camCount, false);
52+
_counters.resize(_camCount, 0);
5353

5454
createSubscribers();
5555
}
@@ -90,7 +90,7 @@ void PointCloudComponent::createSubscribers()
9090
RCLCPP_INFO_STREAM(get_logger(), " * Subscribing to topic: " << topic_name);
9191

9292
std::function<void(const sensor_msgs::msg::PointCloud2::SharedPtr msg)> bound_callback_func =
93-
std::bind(&PointCloudComponent::callback_pointcloud, this, _1, topic_name);
93+
std::bind(&PointCloudComponent::callback_pointcloud, this, _1, topic_name);
9494

9595
_qos.reliability(RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT);
9696

@@ -122,7 +122,7 @@ void PointCloudComponent::callback_pointcloud(
122122
if (_firsts[idx]) {
123123
_times[idx] =
124124
std::chrono::high_resolution_clock::now(); // Set the start time point
125-
_firsts[idx] = false;
125+
_firsts[idx] = false;
126126
return;
127127
}
128128

@@ -135,8 +135,9 @@ void PointCloudComponent::callback_pointcloud(
135135
double freq = 1e6 / elapsed_usec;
136136
double avg_freq = _stats[idx]->addValue(freq);
137137

138-
if(freq>60.0)
138+
if (freq > 60.0) {
139139
return;
140+
}
140141

141142
static double bw_scale = 8. / (1024. * 1024.);
142143

@@ -146,9 +147,9 @@ void PointCloudComponent::callback_pointcloud(
146147

147148
std::stringstream ss;
148149
ss << std::fixed << std::setprecision(2) << " #"
149-
<< ++_counters[idx] << " - Freq: " << freq << " Hz (Avg: " << avg_freq
150-
<< " Hz) - BW: " << bw << " Mbps (Avg: " << bw_avg
151-
<< " Mbps) - Msg size: " << data_size / (1024. * 1024.) << " MB";
150+
<< ++_counters[idx] << " - Freq: " << freq << " Hz (Avg: " << avg_freq
151+
<< " Hz) - BW: " << bw << " Mbps (Avg: " << bw_avg
152+
<< " Mbps) - Msg size: " << data_size / (1024. * 1024.) << " MB";
152153

153154
RCLCPP_INFO_STREAM(get_logger(), ss.str());
154155
// <---- Calculate statistics

0 commit comments

Comments
 (0)