fix: correct formatting of supported disparity range modes in error message

This commit is contained in:
ob-yalian
2026-03-16 15:33:57 +08:00
parent 4a754f822c
commit 1675fa1915
+4 -4
View File
@@ -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;