From 89ec1362294585aa0e7b0e5adaac39f276a58e1e Mon Sep 17 00:00:00 2001 From: noacoohen Date: Sun, 17 Mar 2024 19:04:03 +0200 Subject: [PATCH] final PR fixes, changed the FW version to 5.16 --- src/ds/d400/d400-factory.cpp | 4 ++-- src/ds/d400/d400-motion.cpp | 3 ++- src/ds/ds-motion-common.cpp | 2 +- src/mf/mf-hid.cpp | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ds/d400/d400-factory.cpp b/src/ds/d400/d400-factory.cpp index b12eefc108..3f1d877510 100644 --- a/src/ds/d400/d400-factory.cpp +++ b/src/ds/d400/d400-factory.cpp @@ -672,7 +672,7 @@ namespace librealsense dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() ) { check_and_restore_rgb_stream_extrinsic(); - if( _fw_version >= firmware_version( 5, 15, 1, 224 ) ) + if( _fw_version >= firmware_version( 5, 16, 0, 0 ) ) register_feature( std::make_shared< gyro_sensitivity_feature >( get_raw_motion_sensor(), get_motion_sensor() ) ); } @@ -1009,7 +1009,7 @@ namespace librealsense dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() ) , d400_thermal_tracking( d400_device::_thermal_monitor ) { - if( _fw_version >= firmware_version( 5, 15, 1, 224 ) ) + if( _fw_version >= firmware_version( 5, 16, 0, 0 ) ) register_feature( std::make_shared< gyro_sensitivity_feature >( get_raw_motion_sensor(), get_motion_sensor() ) ); } diff --git a/src/ds/d400/d400-motion.cpp b/src/ds/d400/d400-motion.cpp index 0ff85cab75..760f6008f9 100644 --- a/src/ds/d400/d400-motion.cpp +++ b/src/ds/d400/d400-motion.cpp @@ -80,7 +80,8 @@ namespace librealsense } catch (...) {} - double gyro_scale_factor = _fw_version >= firmware_version( 5, 15, 1, 224 ) ? 0.0001 : 0.1 ; + // For FW >=5.16 the scale factor changed to 0.0001 to support higher resolution (diff between two adjacent samples) + double gyro_scale_factor = _fw_version >= firmware_version( 5, 16, 0, 0 ) ? 0.0001 : 0.1 ; motion_ep->register_processing_block( { {RS2_FORMAT_MOTION_XYZ32F} }, diff --git a/src/ds/ds-motion-common.cpp b/src/ds/ds-motion-common.cpp index 557dd1317a..053ce786da 100644 --- a/src/ds/ds-motion-common.cpp +++ b/src/ds/ds-motion-common.cpp @@ -515,7 +515,7 @@ namespace librealsense //TODO this FW version is relevant for d400 devices. Need to change for propre d500 devices support. bool high_sensitivity = _owner->is_gyro_high_sensitivity(); - double gyro_scale_factor = high_sensitivity ? 0.003814697265625 : ( _fw_version >= firmware_version( 5, 15, 1, 224 ) ? 0.0001: 0.1 ); + double gyro_scale_factor = high_sensitivity ? 0.003814697265625 : ( _fw_version >= firmware_version( 5, 16, 0, 0 ) ? 0.0001: 0.1 ); hid_ep->register_processing_block( { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO} }, { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO} }, diff --git a/src/mf/mf-hid.cpp b/src/mf/mf-hid.cpp index c6261e9a35..919cff1ee3 100644 --- a/src/mf/mf-hid.cpp +++ b/src/mf/mf-hid.cpp @@ -167,7 +167,6 @@ namespace librealsense CHECK_HR(report->GetSensorValue(SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Z_DEGREES_PER_SECOND, &var)); rawZ = var.dblVal; - //TODO: get scale factor from HID descriptor,then setting it from the feature will not be needed. rawX *= _gyro_scale_factor; rawY *= _gyro_scale_factor; rawZ *= _gyro_scale_factor;