fix: initialize intra_camera_sync_reference to an empty string and update launch argument default value

This commit is contained in:
ob-yalian
2025-12-29 09:54:10 +08:00
parent 4f5a2a78ab
commit d87f5e75f1
3 changed files with 3 additions and 3 deletions
@@ -843,6 +843,6 @@ class OBCameraNode {
std::unique_ptr<FpsDelayStatus> fps_delay_status_color_{nullptr};
std::unique_ptr<FpsDelayStatus> fps_delay_status_depth_{nullptr};
std::string intra_camera_sync_reference_;
std::string intra_camera_sync_reference_ = "";
};
} // namespace orbbec_camera
@@ -310,7 +310,7 @@ def generate_launch_description():
DeclareLaunchArgument("force_ip_subnet_mask", default_value="255.255.255.0"), # Subnet mask used for static IP
DeclareLaunchArgument("force_ip_gateway", default_value="192.168.1.1"), # Gateway address used for static IP
DeclareLaunchArgument('intra_camera_sync_reference', default_value='Middle'),#Start, Middle or End
DeclareLaunchArgument('intra_camera_sync_reference', default_value=""),#Start, Middle or End
]
+1 -1
View File
@@ -885,7 +885,7 @@ void OBCameraNode::setupDevices() {
TRY_TO_SET_PROPERTY(setBoolProperty, OB_PROP_SDK_GYRO_FRAME_TRANSFORMED_BOOL,
enable_gyro_data_correction_);
}
if (isGemini335PID(pid) &&
if (isGemini335PID(pid) && !intra_camera_sync_reference_.empty() &&
(sync_mode_ == OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING ||
sync_mode_ == OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING) &&
device_->isPropertySupported(OB_PROP_INTRA_CAMERA_SYNC_REFERENCE_INT, OB_PERMISSION_WRITE)) {