fix: preserve dependent property configuration order

This commit is contained in:
slz
2026-09-03 19:50:35 +08:00
parent a4a48e0509
commit c5be5d88c5
2 changed files with 64 additions and 42 deletions
+6 -5
View File
@@ -245,11 +245,12 @@ void OBLidarNode::setupDevices() {
RCLCPP_ERROR(logger_, "filter level value is out of range[%d,%d], please check the value",
range.min, range.max);
} else {
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_LIDAR_TAIL_FILTER_LEVEL_INT, filter_level_);
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_LIDAR_APPLY_CONFIGS_INT, 1);
TRY_EXECUTE_BLOCK(RCLCPP_INFO_STREAM(
logger_, "Current filter level: "
<< device_->getIntProperty(OB_PROP_LIDAR_TAIL_FILTER_LEVEL_INT)));
TRY_EXECUTE_BLOCK({
device_->setIntProperty(OB_PROP_LIDAR_TAIL_FILTER_LEVEL_INT, filter_level_);
device_->setIntProperty(OB_PROP_LIDAR_APPLY_CONFIGS_INT, 1);
RCLCPP_INFO_STREAM(logger_, "Current filter level: " << device_->getIntProperty(
OB_PROP_LIDAR_TAIL_FILTER_LEVEL_INT));
});
}
}