mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-12 23:39:50 +08:00
remove auto exposure range check
This commit is contained in:
@@ -405,21 +405,6 @@ void OBCameraNode::setAutoExposureCallback(
|
|||||||
response->message = "NOT a video stream";
|
response->message = "NOT a video stream";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto range = device_->getIntPropertyRange(prop_id);
|
|
||||||
if (range.min > range.max) {
|
|
||||||
response->success = false;
|
|
||||||
response->message = "Property is not supported!";
|
|
||||||
RCLCPP_WARN_STREAM(logger_, "Property " << prop_id << " is not supported (min > max)");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
std::cout << range.min << " " << range.max << std::endl;
|
|
||||||
std::cout << request->data << std::endl;
|
|
||||||
if (request->data < range.min || request->data > range.max) {
|
|
||||||
response->success = false;
|
|
||||||
RCLCPP_INFO_STREAM(logger_, "set auto exposure value out of range");
|
|
||||||
response->message = "value out of range";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
device_->setIntProperty(prop_id, request->data);
|
device_->setIntProperty(prop_id, request->data);
|
||||||
response->success = true;
|
response->success = true;
|
||||||
} catch (const ob::Error& e) {
|
} catch (const ob::Error& e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user