mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-12 11:10:19 +08:00
fix: correct formatting of supported disparity range modes in error message
This commit is contained in:
@@ -415,10 +415,10 @@ void OBCameraNode::setDisparityRangeModeCallback(const std::shared_ptr<SetInt32:
|
||||
response->success = false;
|
||||
std::string supported_mode;
|
||||
for (int i = range.min; i <= range.max; ++i) {
|
||||
supported_mode += (i == 0) ? "64/"
|
||||
: (i == 1) ? "128/"
|
||||
: (i == 2) ? "256"
|
||||
: std::to_string(i);
|
||||
supported_mode += (i == 0) ? "64"
|
||||
: (i == 1) ? "/128"
|
||||
: (i == 2) ? "/256"
|
||||
: "/" + std::to_string(i);
|
||||
}
|
||||
response->message = "Invalid disparity range mode. Allowed values:" + supported_mode;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user