feat: reorder preset version logging for improved clarity

This commit is contained in:
ob-yalian
2026-06-26 09:54:27 +08:00
parent c9ed057859
commit 5e5083630e
+8 -8
View File
@@ -143,14 +143,6 @@ void printPresetInfo(const std::shared_ptr<ob::Device> &device) {
}
}
std::string key = "PresetVer";
if (device->isExtensionInfoExist(key)) {
std::string value = device->getExtensionInfo(key);
RCLCPP_INFO_STREAM(logger, "device_preset version: " << value);
} else {
RCLCPP_INFO_STREAM(logger, "device_preset version: not available");
}
if (device->isColorPresetSupported()) {
auto color_preset_list = device->getColorPresetList();
const uint32_t color_preset_count = color_preset_list ? color_preset_list->getCount() : 0;
@@ -162,6 +154,14 @@ void printPresetInfo(const std::shared_ptr<ob::Device> &device) {
}
}
}
std::string key = "PresetVer";
if (device->isExtensionInfoExist(key)) {
std::string value = device->getExtensionInfo(key);
RCLCPP_INFO_STREAM(logger, "preset version: " << value);
} else {
RCLCPP_INFO_STREAM(logger, "preset version: not available");
}
} catch (ob::Error &e) {
RCLCPP_WARN_STREAM(logger,
"Failed to get preset info: " << orbbec_camera::formatObErrorWithStatus(e));