Skip to content

Commit 4be4722

Browse files
committed
Fixed compile warnings.
1 parent 356f576 commit 4be4722

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/vision.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,24 @@ bool Vision::start()
269269
RCLCPP_ERROR(node_->get_logger(), "[%s]: Failed to start stream", camera_name_.c_str());
270270
return false;
271271

272+
case GST_STATE_CHANGE_NO_PREROLL:
273+
RCLCPP_INFO(node_->get_logger(), "[%s]: Stream started (no preroll)", camera_name_.c_str());
274+
break;
275+
272276
case GST_STATE_CHANGE_ASYNC:
273277
RCLCPP_ERROR(node_->get_logger(), "[%s]: Failed to start stream (timeout)", camera_name_.c_str());
274278
return false;
279+
280+
case GST_STATE_CHANGE_SUCCESS:
281+
RCLCPP_INFO(node_->get_logger(), "[%s]: Stream started (async)", camera_name_.c_str());
282+
break;
283+
284+
default:
285+
RCLCPP_ERROR(node_->get_logger(), "[%s]: Unknown state change result", camera_name_.c_str());
286+
return false;
275287
}
288+
289+
break;
276290
}
277291

278292
case GST_STATE_CHANGE_SUCCESS:
@@ -380,7 +394,7 @@ bool Vision::publish()
380394
// Update header information
381395
auto cur_cinfo = camera_info_manager_->getCameraInfo();
382396

383-
if (cur_cinfo.height != image_height_ || cur_cinfo.width != image_width_)
397+
if (static_cast<int>(cur_cinfo.height) != image_height_ || static_cast<int>(cur_cinfo.width) != image_width_)
384398
{
385399
RCLCPP_WARN_ONCE(node_->get_logger(),
386400
"[%s]: Calibration file sensor resolution (%dx%d pixels) doesn't match stream resolution (%dx%d "

0 commit comments

Comments
 (0)