Skip to content

Commit

Permalink
CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Feb 5, 2020
1 parent fa1ab09 commit 0d1bab8
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/librealsense2/h/rs_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extern "C" {
RS2_OPTION_LED_POWER, /**< Power of the LED (light emitting diode), with 0 meaning LED off*/
RS2_OPTION_ZERO_ORDER_ENABLED, /**< Toggle Zero-Order mode */
RS2_OPTION_ENABLE_MAP_PRESERVATION, /**< Preserve previous map when starting */
RS2_OPTION_FREEFALL_ENABLED, /**< Enable/disable sensor shutdown when a free-fall is detected (off by default) */
RS2_OPTION_FREEFALL_DETECTION_ENABLED, /**< Enable/disable sensor shutdown when a free-fall is detected (on by default) */
RS2_OPTION_COUNT /**< Number of enumeration values. Not a valid input: intended to be used in for-loops. */
} rs2_option;

Expand Down
2 changes: 1 addition & 1 deletion src/l500/l500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace librealsense
if( _fw_version >= firmware_version( "1.3.5.0" ) )
{
depth_sensor.register_option(
RS2_OPTION_FREEFALL_ENABLED,
RS2_OPTION_FREEFALL_DETECTION_ENABLED,
std::make_shared< freefall_option >( *_hw_monitor )
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/l500/l500-private.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ namespace librealsense
{
bool_option::set( value );

command cmd{ FALL_DETECT_ENABLE, value != 0.f };
command cmd{ FALL_DETECT_ENABLE, is_true() };
auto res = _hwm.send( cmd );
_record_action( *this );
}
Expand Down
2 changes: 1 addition & 1 deletion src/l500/l500-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ namespace librealsense
rs2_timestamp_domain get_frame_timestamp_domain(const std::shared_ptr<frame_interface>& frame) const override;
};

/* For RS2_OPTION_FREEFALL_ENABLED */
/* For RS2_OPTION_FREEFALL_DETECTION_ENABLED */
class freefall_option : public bool_option
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ namespace librealsense
CASE(ERROR_POLLING_ENABLED)
CASE(PROJECTOR_TEMPERATURE)
CASE(OUTPUT_TRIGGER_ENABLED)
CASE(FREEFALL_ENABLED)
CASE(MOTION_MODULE_TEMPERATURE)
CASE(DEPTH_UNITS)
CASE(ENABLE_MOTION_CORRECTION)
Expand Down Expand Up @@ -295,6 +294,7 @@ namespace librealsense
CASE(LED_POWER)
CASE(ZERO_ORDER_ENABLED)
CASE(ENABLE_MAP_PRESERVATION)
CASE(FREEFALL_DETECTION_ENABLED)
default: assert(!is_valid(value)); return UNKNOWN_VALUE;
}
#undef CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public enum Option {
ENABLE_DYNAMIC_CALIBRATION(58),
DEPTH_OFFSET(59),
LED_POWER(60),
FREEFALL_ENABLED(63);
ZERO_ORDER_ENABLED(61),
ENABLE_MAP_PRESERVATION(62),
FREEFALL_DETECTION_ENABLED(63);

private final int mValue;

Expand Down
2 changes: 1 addition & 1 deletion wrappers/nodejs/src/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4689,7 +4689,7 @@ void InitModule(v8::Local<v8::Object> exports) {
_FORCE_SET_ENUM(RS2_OPTION_LED_POWER);
_FORCE_SET_ENUM(RS2_OPTION_ZERO_ORDER_ENABLED);
_FORCE_SET_ENUM(RS2_OPTION_ENABLE_MAP_PRESERVATION);
_FORCE_SET_ENUM(RS2_OPTION_FREEFALL_ENABLED);
_FORCE_SET_ENUM(RS2_OPTION_FREEFALL_DETECTION_ENABLED);
_FORCE_SET_ENUM(RS2_OPTION_COUNT);

// rs2_camera_info
Expand Down
2 changes: 1 addition & 1 deletion wrappers/python/pybackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ PYBIND11_MODULE(NAME, m) {
.value("enable_led_power", RS2_OPTION_LED_POWER)
.value("zero_order_enabled", RS2_OPTION_ZERO_ORDER_ENABLED)
.value("enable_map_preservation", RS2_OPTION_ENABLE_MAP_PRESERVATION)
.value("enable_freefall", RS2_OPTION_FREEFALL_ENABLED)
.value("enable_freefall_detection", RS2_OPTION_FREEFALL_DETECTION_ENABLED)
.value("count", RS2_OPTION_COUNT);

py::enum_<platform::power_state> power_state(m, "power_state");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ enum class ERealSenseOptionType : uint8
LED_POWER , /**< Power of the LED (light emitting diode), with 0 meaning LED off */
ZERO_ORDER_ENABLED , /**< Zero-order mode */
ENABLE_MAP_PRESERVATION , /**< Preserve map from the previous run */
FREEFALL_ENABLED , /**< Enable/disable sensor shutdown when a free-fall is detected (off by default) */
FREEFALL_DETECTION_ENABLED , /**< Enable/disable sensor shutdown when a free-fall is detected (on by default) */
};

UENUM(Blueprintable)
Expand Down

0 comments on commit 0d1bab8

Please sign in to comment.