Skip to content

Commit

Permalink
Fixing cpplint
Browse files Browse the repository at this point in the history
Signed-off-by: CursedRock17 <mtglucas1@gmail.com>
  • Loading branch information
CursedRock17 committed Feb 25, 2024
1 parent dac21ff commit 421a706
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions image_view/src/image_saver_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ ImageSaverNode::ImageSaverNode(const rclcpp::NodeOptions & options)
std::placeholders::_3));
}

if(fps_ != 0) {
if (fps_ != 0) {
using fps_timer = std::chrono::duration<int, std::ratio<1>>;
timer_ = this->create_wall_timer(fps_timer(fps_), std::bind(&ImageSaverNode::timerCallback, this));
timer_ = this->create_wall_timer(
fps_timer(fps_), std::bind(&ImageSaverNode::timerCallback, this));
}
}

Expand Down Expand Up @@ -255,8 +256,7 @@ void ImageSaverNode::callbackWithoutCameraInfo(
if (fps_ != 0) {
std::lock_guard lock = std::lock_guard<std::mutex>(image_save_mutex_);
latest_image_ = image_msg;
}
else {
} else {
// save the image
std::string filename;
if (!saveImage(image_msg, filename)) {
Expand Down Expand Up @@ -286,8 +286,7 @@ void ImageSaverNode::callbackWithCameraInfo(
if (fps_ != 0) {
std::lock_guard lock = std::lock_guard<std::mutex>(image_save_mutex_);
latest_image_ = image_msg;
}
else {
} else {
// save the image
std::string filename;
if (!saveImage(image_msg, filename)) {
Expand All @@ -301,7 +300,6 @@ void ImageSaverNode::callbackWithCameraInfo(

count_++;
}

}

} // namespace image_view
Expand Down

0 comments on commit 421a706

Please sign in to comment.