forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR IntelRealSense#12715 from noacoohen: Gyro sensitivity feature
- Loading branch information
Showing
24 changed files
with
427 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2024 Intel Corporation. All Rights Reserved. | ||
|
||
#include <src/ds/features/gyro-sensitivity-feature.h> | ||
#include <src/ds/d400/d400-options.h> | ||
#include <src/ds/ds-private.h> | ||
#include <src/sensor.h> | ||
#include <librealsense2/hpp/rs_options.hpp> | ||
|
||
|
||
namespace librealsense { | ||
|
||
const feature_id gyro_sensitivity_feature::ID = "Gyro Sensitivity feature"; | ||
|
||
gyro_sensitivity_feature::gyro_sensitivity_feature( std::shared_ptr< hid_sensor > motion_sensor, | ||
ds_motion_sensor & motion ) | ||
{ | ||
option_range enable_range = { 0.f /*min*/, 4.f /*max*/, 1.f /*step*/, 1.f /*default*/ }; | ||
auto imu_sensitivity_control = std::make_shared< gyro_sensitivity_option >( motion_sensor, enable_range ); | ||
motion.register_option( RS2_OPTION_GYRO_SENSITIVITY, imu_sensitivity_control ); | ||
} | ||
|
||
|
||
feature_id gyro_sensitivity_feature::get_id() const | ||
{ | ||
return ID; | ||
} | ||
|
||
}//namespace librealsense |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2024 Intel Corporation. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
|
||
#include <src/feature-interface.h> | ||
#include <src/hid-sensor.h> | ||
#include <src/ds/ds-motion-common.h> | ||
|
||
#include <memory> | ||
|
||
namespace librealsense { | ||
|
||
|
||
class gyro_sensitivity_feature : public feature_interface | ||
{ | ||
|
||
public: | ||
static const feature_id ID; | ||
|
||
gyro_sensitivity_feature( std::shared_ptr< hid_sensor > motion_sensor, ds_motion_sensor & motion ); | ||
|
||
feature_id get_id() const override; | ||
|
||
|
||
}; | ||
|
||
} // namespace librealsense |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.