Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add L515 humidity temperature option #7490

Merged
merged 1 commit into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/librealsense2/h/rs_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ extern "C" {
RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH,
RS2_OPTION_HOST_PERFORMANCE, /**< Set host performance mode to optimize device settings so host can keep up with workload, for example, USB transaction granularity, setting option to low performance host leads to larger USB transaction size and reduced number of transactions which improves performance and stability if host is relatively weak as compared to workload */
RS2_OPTION_HDR_ENABLED, /**< Enable / disable HDR */
RS2_OPTION_SEQUENCE_NAME, /**< HDR Sequence size */
RS2_OPTION_SEQUENCE_NAME, /**< HDR Sequence name */
ev-mp marked this conversation as resolved.
Show resolved Hide resolved
RS2_OPTION_SEQUENCE_SIZE, /**< HDR Sequence size */
RS2_OPTION_SEQUENCE_ID, /**< HDR Sequence ID - 0 is not HDR; sequence ID for HDR configuartion starts from 1 */
RS2_OPTION_HUMIDITY_TEMPERATURE, /**< Humidity temperature [Deg Celsius]*/
RS2_OPTION_COUNT /**< Number of enumeration values. Not a valid input: intended to be used in for-loops. */
} rs2_option;

Expand Down
3 changes: 3 additions & 0 deletions src/l500/l500-depth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ namespace librealsense
depth_sensor.register_option(RS2_OPTION_APD_TEMPERATURE,
std::make_shared <l500_temperature_options>(_hw_monitor.get(), RS2_OPTION_APD_TEMPERATURE));

depth_sensor.register_option(RS2_OPTION_HUMIDITY_TEMPERATURE,
std::make_shared <l500_temperature_options>(_hw_monitor.get(), RS2_OPTION_HUMIDITY_TEMPERATURE));

environment::get_instance().get_extrinsics_graph().register_same_extrinsics(*_depth_stream, *_ir_stream);
environment::get_instance().get_extrinsics_graph().register_same_extrinsics(*_depth_stream, *_confidence_stream);

Expand Down
2 changes: 2 additions & 0 deletions src/l500/l500-private.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ namespace librealsense
return float(temperature_data.MA_temperature);
case RS2_OPTION_APD_TEMPERATURE:
return float(temperature_data.APD_temperature);
case RS2_OPTION_HUMIDITY_TEMPERATURE:
return float(temperature_data.HUM_temperature);
default:
throw invalid_value_exception(to_string() << _option << " is not temperature option!");
}
Expand Down
1 change: 1 addition & 0 deletions src/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ namespace librealsense
CASE(SEQUENCE_NAME)
CASE(SEQUENCE_SIZE)
CASE(SEQUENCE_ID)
CASE(HUMIDITY_TEMPERATURE)
default: assert(!is_valid(value)); return UNKNOWN_VALUE;
}
#undef CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ public enum Option {
HDR_ENABLED(76),
SEQUENCE_NAME(77),
SEQUENCE_SIZE(78),
SEQUENCE_ID(79);
SEQUENCE_ID(79),
HUMIDITY_TEMPERATURE(80);
private final int mValue;

private Option(int value) { mValue = value; }
Expand Down
10 changes: 9 additions & 1 deletion wrappers/matlab/option.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
sensor_mode (70)
emitter_always_on (71)
thermal_compensation (72)
count (73)
trigger_camera_accuracy_health (73)
reset_camera_accuracy_health (74)
host_performance (75)
hdr_enabled (76)
sequence_name (77)
sequence_size (78)
sequence_id (79)
humidity_temperature (80)
count (81)
end
end
10 changes: 10 additions & 0 deletions wrappers/nodejs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4933,6 +4933,14 @@ const option = {
*/
OPTION_EMITTER_ALWAYS_ON: RS2.RS2_OPTION_EMITTER_ALWAYS_ON,
OPTION_THERMAL_COMPENSATION: RS2.RS2_OPTION_THERMAL_COMPENSATION,
OPTION_TRIGGER_CAMERA_ACCURACY_HEALTH: RS2.RS2_OPTION_TRIGGER_CAMERA_ACCURACY_HEALTH,
OPTION_RESET_CAMERA_ACCURACY_HEALTH: RS2.RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH,
OPTION_HOST_PERFORMANCE: RS2.RS2_OPTION_HOST_PERFORMANCE,
OPTION_HDR_ENABLED: RS2.RS2_OPTION_HDR_ENABLED,
OPTION_SEQUENCE_NAME: RS2.RS2_OPTION_SEQUENCE_NAME,
OPTION_SEQUENCE_SIZE: RS2.RS2_OPTION_SEQUENCE_SIZE,
OPTION_SEQUENCE_ID: RS2.RS2_OPTION_SEQUENCE_ID,
OPTION_HUMIDITY_TEMPERATURE: RS2.RS2_OPTION_HUMIDITY_TEMPERATURE,
/**
* Number of enumeration values. Not a valid input: intended to be used in for-loops.
* @type {Integer}
Expand Down Expand Up @@ -5081,6 +5089,8 @@ const option = {
return this.option_emitter_always_on;
case this.OPTION_THERMAL_COMPENSATION:
return this.option_thermal_compensation;
case this.OPTION_HUMIDITY_TEMPERATURE:
return this.option_humidity_temperature;
default:
throw new TypeError(
'option.optionToString(option) expects a valid value as the 1st argument');
Expand Down
6 changes: 6 additions & 0 deletions wrappers/nodejs/src/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4701,6 +4701,12 @@ void InitModule(v8::Local<v8::Object> exports) {
_FORCE_SET_ENUM(RS2_OPTION_THERMAL_COMPENSATION);
_FORCE_SET_ENUM(RS2_OPTION_TRIGGER_CAMERA_ACCURACY_HEALTH);
_FORCE_SET_ENUM(RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH);
_FORCE_SET_ENUM(RS2_OPTION_HOST_PERFORMANCE);
_FORCE_SET_ENUM(RS2_OPTION_HDR_ENABLED);
_FORCE_SET_ENUM(RS2_OPTION_SEQUENCE_NAME);
_FORCE_SET_ENUM(RS2_OPTION_SEQUENCE_SIZE);
_FORCE_SET_ENUM(RS2_OPTION_SEQUENCE_ID);
_FORCE_SET_ENUM(RS2_OPTION_HUMIDITY_TEMPERATURE);
_FORCE_SET_ENUM(RS2_OPTION_COUNT);

// rs2_camera_info
Expand Down
2 changes: 2 additions & 0 deletions wrappers/python/pybackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,12 @@ PYBIND11_MODULE(NAME, m) {
.value("thermal_compensation", RS2_OPTION_THERMAL_COMPENSATION)
.value("trigger_camera_accuracy_health", RS2_OPTION_TRIGGER_CAMERA_ACCURACY_HEALTH)
.value("reset_camera_accuracy_health", RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH)
.value("host_performance", RS2_OPTION_HOST_PERFORMANCE)
ev-mp marked this conversation as resolved.
Show resolved Hide resolved
.value("hdr_enabled", RS2_OPTION_HDR_ENABLED)
.value("sequence_name", RS2_OPTION_SEQUENCE_NAME)
.value("sequence_size", RS2_OPTION_SEQUENCE_SIZE)
.value("sequence_id", RS2_OPTION_SEQUENCE_ID)
.value("humidity_temperature", RS2_OPTION_HUMIDITY_TEMPERATURE)
.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 @@ -128,6 +128,12 @@ enum class ERealSenseOptionType : uint8
THERMAL_COMPENSATION , /**< Depth Thermal Compensation for selected D400 SKUs */
TRIGGER_CAMERA_ACCURACY_HEALTH ,
RESET_CAMERA_ACCURACY_HEALTH ,
HOST_PERFORMANCE , /**< Set host performance mode to optimize device settings so host can keep up with workload, for example, USB transaction granularity, setting option to low performance host leads to larger USB transaction size and reduced number of transactions which improves performance and stability if host is relatively weak as compared to workload */
HDR_ENABLED , /**< Enable / disable HDR */
SEQUENCE_NAME , /**< HDR Sequence name */
SEQUENCE_SIZE , /**< HDR Sequence size */
SEQUENCE_ID , /**< HDR Sequence ID - 0 is not HDR; sequence ID for HDR configuartion starts from 1 */
HUMIDITY_TEMPERATURE , /**< Humidity temperature*/
};

UENUM(Blueprintable)
Expand Down