mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-13 03:30:18 +08:00
Fix the issue that disparity_offset_config cannot be turned off
This commit is contained in:
@@ -1902,13 +1902,12 @@ void OBCameraNode::setDisparitySearchOffset() {
|
||||
return;
|
||||
}
|
||||
if (device_->isPropertySupported(OB_PROP_DISP_SEARCH_OFFSET_INT, OB_PERMISSION_WRITE)) {
|
||||
if (disparity_search_offset_ >= 0 && disparity_search_offset_ <= 127 &&
|
||||
disparity_offset_config_ == false) {
|
||||
if (disparity_search_offset_ >= 0 && disparity_search_offset_ <= 127) {
|
||||
device_->setIntProperty(OB_PROP_DISP_SEARCH_OFFSET_INT, disparity_search_offset_);
|
||||
RCLCPP_INFO_STREAM(logger_, "disparity_search_offset: " << disparity_search_offset_);
|
||||
}
|
||||
if (disparity_offset_config_ == true && offset_index0_ >= 0 && offset_index0_ <= 127 &&
|
||||
offset_index1_ >= 0 && offset_index1_ <= 127) {
|
||||
if (offset_index0_ >= 0 && offset_index0_ <= 127 && offset_index1_ >= 0 &&
|
||||
offset_index1_ <= 127) {
|
||||
auto config = OBDispOffsetConfig();
|
||||
config.enable = disparity_offset_config_;
|
||||
config.offset0 = offset_index0_;
|
||||
|
||||
Reference in New Issue
Block a user