fix: improve error message for out-of-range color MJPEG quality value

This commit is contained in:
ob-yalian
2026-09-29 16:57:53 +08:00
parent dfb47e6ee4
commit f5019e7bea
+2 -2
View File
@@ -1493,8 +1493,8 @@ void OBCameraNode::setupDevices() {
auto range = device_->getIntPropertyRange(OB_PROP_MJPEG_QUALITY_INT);
if (color_mjpeg_quality_ < range.min || color_mjpeg_quality_ > range.max) {
RCLCPP_ERROR(logger_,
"color MJPEG quality value is out of range[%d,%d], please check the value",
range.min, range.max);
"color MJPEG quality value %d is out of range[%d,%d], please check the value",
color_mjpeg_quality_, range.min, range.max);
} else {
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_MJPEG_QUALITY_INT, color_mjpeg_quality_);
TRY_EXECUTE_BLOCK(RCLCPP_INFO_STREAM(