From 3d9d3194b493cf0fd3cb38307870fc68d4715a91 Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Sun, 18 Sep 2022 15:14:35 +0300 Subject: [PATCH 1/2] restricting the D405 w/a for calibration resolution to D405 PID only --- common/model-views.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/common/model-views.cpp b/common/model-views.cpp index 6d6ce53196..8159f8ff18 100644 --- a/common/model-views.cpp +++ b/common/model-views.cpp @@ -2014,24 +2014,27 @@ namespace rs2 { // checking format bool is_cal_format = false; - for (auto it = stream_enabled.begin(); it != stream_enabled.end(); ++it) + if (dev.supports(RS2_CAMERA_INFO_PRODUCT_ID) && !strcmp(dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID), "0B5B")) { - if (it->second) + for (auto it = stream_enabled.begin(); it != stream_enabled.end(); ++it) { - int selected_format_index = -1; - if (ui.selected_format_id.count(it->first) > 0) - selected_format_index = ui.selected_format_id.at(it->first); - - if (format_values.count(it->first) > 0 && selected_format_index > -1) + if (it->second) { - auto formats = format_values.at(it->first); - if (formats.size() > selected_format_index) + int selected_format_index = -1; + if (ui.selected_format_id.count(it->first) > 0) + selected_format_index = ui.selected_format_id.at(it->first); + + if (format_values.count(it->first) > 0 && selected_format_index > -1) { - auto format = formats[selected_format_index]; - if (format == RS2_FORMAT_Y16) + auto formats = format_values.at(it->first); + if (formats.size() > selected_format_index) { - is_cal_format = true; - break; + auto format = formats[selected_format_index]; + if (format == RS2_FORMAT_Y16) + { + is_cal_format = true; + break; + } } } } From 4ebbd210f88e52eadf6bb78e5d279d0d50334123 Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Tue, 20 Sep 2022 15:34:51 +0300 Subject: [PATCH 2/2] comment added --- common/model-views.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/model-views.cpp b/common/model-views.cpp index 8159f8ff18..ef213904fb 100644 --- a/common/model-views.cpp +++ b/common/model-views.cpp @@ -2014,6 +2014,7 @@ namespace rs2 { // checking format bool is_cal_format = false; + // checking that the SKU is D405 - otherwise, this method should return false if (dev.supports(RS2_CAMERA_INFO_PRODUCT_ID) && !strcmp(dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID), "0B5B")) { for (auto it = stream_enabled.begin(); it != stream_enabled.end(); ++it)