fix: update ae mode settings in setupDevices

This commit is contained in:
slz
2026-01-16 11:22:43 +08:00
committed by ob-yalian
parent e7c1f6acc4
commit b91100837a
+11 -15
View File
@@ -985,21 +985,17 @@ void OBCameraNode::setupDevices() {
RCLCPP_ERROR(logger_, "intra camera sync reference does not support this setting");
}
}
if (pid_ == GEMINI_305_PID) {
if (enable_sports_mode_) {
if (device_->isPropertySupported(OB_PROP_COLOR_FAST_AE_BOOL, OB_PERMISSION_WRITE)) {
device_->setIntProperty(OB_PROP_COLOR_FAST_AE_BOOL, (enable_sports_mode_ ? 0 : 1));
RCLCPP_INFO_STREAM(logger_,
"Setting Sports Mode to " << (enable_sports_mode_ ? "ON" : "OFF"));
}
}
if ((ae_mode_ == "depthbased" || ae_mode_ == "colorbased") &&
device_->isPropertySupported(OB_PROP_COLOR_AE_MODE_INT, OB_PERMISSION_WRITE)) {
if (device_->isPropertySupported(OB_PROP_COLOR_AE_MODE_INT, OB_PERMISSION_WRITE)) {
auto ae_mode = ae_mode_ == "depthbased" ? 0 : 1;
device_->setIntProperty(OB_PROP_COLOR_AE_MODE_INT, ae_mode);
RCLCPP_INFO_STREAM(logger_, "Setting AE Mode to " << ae_mode_);
}
if (device_->isPropertySupported(OB_PROP_COLOR_FAST_AE_BOOL, OB_PERMISSION_WRITE)) {
device_->setIntProperty(OB_PROP_COLOR_FAST_AE_BOOL, (enable_sports_mode_ ? 0 : 1));
RCLCPP_INFO_STREAM(logger_, "Setting Sports Mode to " << (enable_sports_mode_ ? "ON" : "OFF"));
}
if ((ae_mode_ == "depthbased" || ae_mode_ == "colorbased") &&
device_->isPropertySupported(OB_PROP_COLOR_AE_MODE_INT, OB_PERMISSION_WRITE)) {
if (device_->isPropertySupported(OB_PROP_COLOR_AE_MODE_INT, OB_PERMISSION_WRITE)) {
auto ae_mode = ae_mode_ == "depthbased" ? 0 : 1;
device_->setIntProperty(OB_PROP_COLOR_AE_MODE_INT, ae_mode);
RCLCPP_INFO_STREAM(logger_, "Setting AE Mode to " << ae_mode_);
}
}
}