From 91232e93ef5346d75352cfe43b334df0e7fe6a9c Mon Sep 17 00:00:00 2001 From: aangerma Date: Wed, 31 Jul 2019 12:59:19 +0300 Subject: [PATCH 1/3] Save serial_number on sensor info in lower case. --- src/mf/mf-hid.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mf/mf-hid.cpp b/src/mf/mf-hid.cpp index 1cc606c88c..e69fcb6fcb 100644 --- a/src/mf/mf-hid.cpp +++ b/src/mf/mf-hid.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #pragma comment(lib, "Sensorsapi.lib") #pragma comment(lib, "PortableDeviceGuids.lib") @@ -443,7 +444,9 @@ namespace librealsense } if (IsEqualPropertyKey(propertyKey, SENSOR_PROPERTY_SERIAL_NUMBER)) { - info.serial_number = std::string(propertyValue.pwszVal, propertyValue.pwszVal + wcslen(propertyValue.pwszVal)); + auto str = std::string(propertyValue.pwszVal, propertyValue.pwszVal + wcslen(propertyValue.pwszVal)); + std::transform(begin(str), end(str), begin(str), ::tolower); + info.serial_number = str; } } From 8ba722ca399a06f3ad31ce35ea9dc1b4b1c591ff Mon Sep 17 00:00:00 2001 From: aangerma Date: Thu, 1 Aug 2019 11:28:34 +0300 Subject: [PATCH 2/3] 1. Change the default values of ZO filter 2. Disable by default all the filters except zo. --- common/model-views.cpp | 23 ++++++++++++++++++++--- src/proc/zero-order.h | 4 ++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/common/model-views.cpp b/common/model-views.cpp index 59cb512ea7..b3c29b9796 100644 --- a/common/model-views.cpp +++ b/common/model-views.cpp @@ -926,6 +926,17 @@ namespace rs2 } catch (...) {} + auto filters = s->get_recommended_filters(); + + auto it = std::find_if(filters.begin(), filters.end(), [&](const filter &f) + { + if (f.is()) + return true; + return false; + }); + + auto is_zo = it != filters.end(); + for (auto&& f : s->get_recommended_filters()) { auto shared_filter = std::make_shared(f); @@ -936,12 +947,18 @@ namespace rs2 //if (shared_filter->is()) // model->visible = false; - if (shared_filter->is()) + if (is_zo) { - zero_order_artifact_fix = model; - viewer.zo_sensors++; + if (shared_filter->is()) + { + zero_order_artifact_fix = model; + viewer.zo_sensors++; + } + else + model->enabled = false; } + if (shared_filter->is()) model->enabled = false; diff --git a/src/proc/zero-order.h b/src/proc/zero-order.h index e3c8882d31..02d5ea0cc0 100644 --- a/src/proc/zero-order.h +++ b/src/proc/zero-order.h @@ -8,8 +8,8 @@ #include "option.h" #include "l500/l500-private.h" -#define IR_THRESHOLD 115 -#define RTD_THRESHOLD 200 +#define IR_THRESHOLD 120 +#define RTD_THRESHOLD 50 #define BASELINE -10 #define PATCH_SIZE 5 #define Z_MAX_VALUE 1200 From 8e23141d81c3aadbf51a0416db9fba3f6d65312e Mon Sep 17 00:00:00 2001 From: aangerma Date: Thu, 1 Aug 2019 15:09:44 +0300 Subject: [PATCH 3/3] Enfore imu only on l515 --- src/l500/l500-factory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/l500/l500-factory.cpp b/src/l500/l500-factory.cpp index 000b13032f..c92411b2fe 100644 --- a/src/l500/l500-factory.cpp +++ b/src/l500/l500-factory.cpp @@ -106,13 +106,14 @@ namespace librealsense if (!ivcam2::try_fetch_usb_device(group.usb_devices, depth, hwm)) LOG_WARNING("try_fetch_usb_device(...) failed."); - if (g.second.size() < 2) - { - LOG_WARNING("L500 partial enum: " << g.second.size() << " HID devices were recognized (2+ expected)"); + if(g.first[0].pid != L500_PID) + if (g.second.size() < 2) + { + LOG_WARNING("L500 partial enum: " << g.second.size() << " HID devices were recognized (2+ expected)"); #if !defined(ANDROID) && !defined(__APPLE__) // Not supported by android & macos - continue; + continue; #endif // Not supported by android & macos - } + } auto info = std::make_shared(ctx, g.first, hwm, g.second); chosen.push_back(depth);