Skip to content

Commit

Permalink
fixing index bug - Trey's PR
Browse files Browse the repository at this point in the history
  • Loading branch information
marinagmoreira committed Apr 3, 2023
1 parent aba909e commit 825a040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hardware/is_camera/src/camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ namespace is_camera {
if (!thread_running_ || ((pub_.getNumSubscribers() == 0) && (getNumBayerSubscribers() == 0))) return;

// Get last generated image from buffer (index incremented after image completed)
sensor_msgs::ImagePtr& grey_image = img_msg_buffer_[(img_msg_buffer_idx_ - 1) % kImageMsgBuffer];
sensor_msgs::ImagePtr& grey_image = img_msg_buffer_[(img_msg_buffer_idx_ + kImageMsgBuffer - 1) % kImageMsgBuffer];

cv::Mat input(kImageHeight, kImageWidth,
cv::DataType<uint8_t>::type,
Expand Down

0 comments on commit 825a040

Please sign in to comment.