Skip to content

Commit

Permalink
PR #12397 from Tamir91: Rename D500 temperatures options + add projec…
Browse files Browse the repository at this point in the history
…tor temp
  • Loading branch information
Nir-Az authored Nov 14, 2023
2 parents 2d6c44e + 257b54a commit a312ffd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion include/librealsense2/h/rs_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ extern "C" {
RS2_OPTION_AUTO_GAIN_LIMIT_TOGGLE, /**< Enable / disable color image auto-gain*/
RS2_OPTION_EMITTER_FREQUENCY, /**< Select emitter (laser projector) frequency, see rs2_emitter_frequency for values */
RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE, /**< Select depth sensor auto exposure mode see rs2_depth_auto_exposure_mode for values */
RS2_OPTION_LEFT_IR_TEMPERATURE, /**< Temperature of the Left IR Sensor */
RS2_OPTION_OHM_TEMPERATURE, /**< Temperature of the Optical Head Sensor */
RS2_OPTION_SOC_PVT_TEMPERATURE, /**< Temperature of PVT SOC */
RS2_OPTION_COUNT /**< Number of enumeration values. Not a valid input: intended to be used in for-loops. */
} rs2_option;

Expand Down
10 changes: 7 additions & 3 deletions src/ds/d500/d500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,14 +627,18 @@ namespace librealsense
rsutils::lazy< float >( [default_depth_units]() { return default_depth_units; } ) ) );
}

depth_sensor.register_option(RS2_OPTION_ASIC_TEMPERATURE,
depth_sensor.register_option(RS2_OPTION_SOC_PVT_TEMPERATURE,
std::make_shared<temperature_option>(_hw_monitor, &raw_depth_sensor,
temperature_option::temperature_component::MAIN_ASIC, "Temperature reading for Main ASIC"));
temperature_option::temperature_component::HKR_PVT, "Temperature reading for SOC PVT"));

depth_sensor.register_option(RS2_OPTION_LEFT_IR_TEMPERATURE,
depth_sensor.register_option(RS2_OPTION_OHM_TEMPERATURE,
std::make_shared<temperature_option>(_hw_monitor, &raw_depth_sensor,
temperature_option::temperature_component::LEFT_IR, "Temperature reading for Left Infrared Sensor"));

depth_sensor.register_option(RS2_OPTION_PROJECTOR_TEMPERATURE,
std::make_shared<temperature_option>(_hw_monitor, &raw_depth_sensor,
temperature_option::temperature_component::LEFT_PROJ, "Temperature reading for Left Projector"));

// Metadata registration
depth_sensor.register_metadata(RS2_FRAME_METADATA_FRAME_TIMESTAMP, make_uvc_header_parser(&uvc_header::timestamp));
}); //group_multiple_fw_calls
Expand Down
2 changes: 1 addition & 1 deletion src/ds/d500/d500-options.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace librealsense
RGB,
RIGHT_IR,
RIGHT_PROJ,
MAIN_ASIC,
HKR_PVT,
SHT4XX,
SMCU,
COUNT
Expand Down
3 changes: 2 additions & 1 deletion src/to-string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ std::string const & get_string_( rs2_option value )
CASE( AUTO_GAIN_LIMIT_TOGGLE )
CASE( EMITTER_FREQUENCY )
arr[RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE] = "Auto Exposure Mode";
CASE( LEFT_IR_TEMPERATURE )
CASE( OHM_TEMPERATURE )
CASE( SOC_PVT_TEMPERATURE )
#undef CASE
return arr;
}();
Expand Down

0 comments on commit a312ffd

Please sign in to comment.