Skip to content

Commit

Permalink
PR #9254 from Avishag: Add support for Vertical binning control
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Jun 27, 2021
2 parents 7ee5e7e + 6e903d2 commit 79efea8
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions include/librealsense2/h/rs_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ extern "C" {
RS2_OPTION_AUTO_GAIN_LIMIT, /**< Set and get auto gain limits ranging from 16 to 248. Default is 0 which means full gain. If the requested gain limit is less than 16, it will be set to 16. If the requested gain limit is greater than 248, it will be set to 248. Setting will not take effect until next streaming session. */
RS2_OPTION_AUTO_RX_SENSITIVITY, /**< Enable receiver sensitivity according to ambient light, bounded by the Receiver Gain control. */
RS2_OPTION_TRANSMITTER_FREQUENCY, /**<changes the transmitter frequencies increasing effective range over sharpness. */
RS2_OPTION_VERTICAL_BINNING, /**< Enables vertical binning which increases the maximal sensed distance. */
RS2_OPTION_COUNT /**< Number of enumeration values. Not a valid input: intended to be used in for-loops. */
} rs2_option;

Expand Down
3 changes: 2 additions & 1 deletion src/l500/l535-amc-option.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ namespace l535 {
invalidation_bypass = 7,
alternate_ir = 8,
auto_rx_sensitivity = 9,
transmitter_frequency = 10
transmitter_frequency = 10,
vertical_binning = 11
};

enum amc_command
Expand Down
5 changes: 4 additions & 1 deletion src/l500/l535-device-options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ device_options::device_options( std::shared_ptr< librealsense::context > ctx,
{ RS2_OPTION_AUTO_RX_SENSITIVITY,
{ auto_rx_sensitivity, "Enable receiver sensitivity according to ambient light, bounded by the Receiver Gain control" } },
{ RS2_OPTION_TRANSMITTER_FREQUENCY,
{ transmitter_frequency, "Change transmitter frequency, increasing effective range over sharpness" } }
{ transmitter_frequency, "Change transmitter frequency, increasing effective range over sharpness" } },
{ RS2_OPTION_VERTICAL_BINNING,
{ vertical_binning, "Enables vertical binning which increases the maximal sensed distance" } }

};

for( auto i : options )
Expand Down
1 change: 1 addition & 0 deletions src/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ namespace librealsense
CASE(AUTO_GAIN_LIMIT)
CASE(AUTO_RX_SENSITIVITY)
CASE(TRANSMITTER_FREQUENCY)
CASE(VERTICAL_BINNING)
default: assert(!is_valid(value)); return UNKNOWN_VALUE;
}
#undef CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public enum Option {
AUTO_EXPOSURE_LIMIT(85),
AUTO_GAIN_LIMIT(86),
AUTO_RX_SENSITIVITY(87),
OPTION_TRANSMITTER_FREQUENCY(88);
OPTION_TRANSMITTER_FREQUENCY(88),
RS2_OPTION_VERTICAL_BINNING(89);

private final int mValue;

Expand Down
5 changes: 4 additions & 1 deletion wrappers/csharp/Intel.RealSense/Types/Enums/Option.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ public enum Option
auto_rx_sensitivity = 87,

/// <summary>Change transmitter frequency, increasing effective range over sharpness</summary>
transmitter_frequency = 88
transmitter_frequency = 88,

/// <summary>Enables vertical binning which increases the maximal sensed distance</summary>
vertical_binning = 89
}
}
3 changes: 2 additions & 1 deletion wrappers/matlab/option.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
auto_gain_limit (86)
auto_rx_sensitivity (87)
transmitter_frequency (88)
count (89)
vertical_binning (89)
count (90)
end
end
1 change: 1 addition & 0 deletions wrappers/nodejs/src/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4783,6 +4783,7 @@ void InitModule(v8::Local<v8::Object> exports) {
_FORCE_SET_ENUM(RS2_OPTION_AUTO_GAIN_LIMIT);
_FORCE_SET_ENUM(RS2_OPTION_AUTO_RX_SENSITIVITY);
_FORCE_SET_ENUM(RS2_OPTION_TRANSMITTER_FREQUENCY);
_FORCE_SET_ENUM(RS2_OPTION_VERTICAL_BINNING);
_FORCE_SET_ENUM(RS2_OPTION_COUNT);

// rs2_camera_info
Expand Down
1 change: 1 addition & 0 deletions wrappers/python/pybackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ PYBIND11_MODULE(NAME, m) {
.value("auto_gain_limit", RS2_OPTION_AUTO_GAIN_LIMIT)
.value("auto_rx_sensitivity", RS2_OPTION_AUTO_RX_SENSITIVITY)
.value("transmitter_frequency", RS2_OPTION_TRANSMITTER_FREQUENCY)
.value("vertical_binning", RS2_OPTION_VERTICAL_BINNING)
.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 @@ -143,6 +143,7 @@ enum class ERealSenseOptionType : uint8
AUTO_GAIN_LIMIT , /**< Set and get auto gain limits ranging from 16 to 248. Default is 0 which means full gain. If the requested gain limit is less than 16, it will be set to 16. If the requested gain limit is greater than 248, it will be set to 248. Setting will not take effect until next streaming session. */
AUTO_RX_SENSITIVITY , /**< Set and get auto receiver sensitivity.*/
TRANSMITTER_FREQUENCY , /**< Change transmitter frequency, increasing effective range over sharpness. */
VERTICAL_BINNING , /**< Enables vertical binning which increases the maximal sensed distance. */
};

UENUM(Blueprintable)
Expand Down

0 comments on commit 79efea8

Please sign in to comment.