Skip to content

Commit

Permalink
- projector temperature registration and test removed
Browse files Browse the repository at this point in the history
- temperatures test relaxed: tolerance increased from 0.1 to 1.0
  • Loading branch information
remibettan committed Apr 1, 2024
1 parent ca38a68 commit 632d173
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
6 changes: 0 additions & 6 deletions src/ds/d500/d500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,19 +533,13 @@ namespace librealsense
DS5_HKR_PVT_TEMPERATURE,
"PVT Temperature");

auto proj_temperature = std::make_shared< temperature_xu_option >(raw_depth_sensor,
depth_xu,
DS5_HKR_PROJECTOR_TEMPERATURE,
"Projector Temperature");

auto ohm_temperature = std::make_shared< temperature_xu_option >(raw_depth_sensor,
depth_xu,
DS5_HKR_OHM_TEMPERATURE,
"OHM Temperature");

// registering the temperature options
depth_sensor.register_option(RS2_OPTION_SOC_PVT_TEMPERATURE, pvt_temperature);
depth_sensor.register_option(RS2_OPTION_PROJECTOR_TEMPERATURE, proj_temperature);
depth_sensor.register_option(RS2_OPTION_OHM_TEMPERATURE, ohm_temperature);

auto error_control = std::make_shared< uvc_xu_option< uint8_t > >( raw_depth_sensor,
Expand Down
18 changes: 5 additions & 13 deletions unit-tests/live/d500/test-temperatures-xu-vs-hwmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@
def get_temperatures_from_xu():
pvt_temp = -10
ohm_temp = -10
proj_temp = -10

test.check(depth_sensor.supports(rs.option.soc_pvt_temperature))
test.check(depth_sensor.supports(rs.option.ohm_temperature))
test.check(depth_sensor.supports(rs.option.projector_temperature))

pvt_temp = depth_sensor.get_option(rs.option.soc_pvt_temperature)
ohm_temp = depth_sensor.get_option(rs.option.ohm_temperature)
proj_temp = depth_sensor.get_option(rs.option.projector_temperature)

return pvt_temp, ohm_temp, proj_temp
return pvt_temp, ohm_temp


def parse_temperature_from_hwm(hwm_answer):
Expand Down Expand Up @@ -78,25 +75,20 @@ def get_temperatures_from_hwm():
ohm_temp_index = 2
ohm_temp = all_temp_list[ohm_temp_index - 1]

# get projector temperature
proj_temp_index = 1
proj_temp = all_temp_list[proj_temp_index - 1]

return pvt_temp, ohm_temp, proj_temp
return pvt_temp, ohm_temp


#############################################################################################

test.start("Compare Temperature readings XU vs HWMC")

pvt_temp_xu, ohm_temp_xu, projector_temp_xu = get_temperatures_from_xu()
pvt_temp_xu, ohm_temp_xu = get_temperatures_from_xu()

pvt_temp_hwm, ohm_temp_hwm, projector_temp_hwm = get_temperatures_from_hwm()
pvt_temp_hwm, ohm_temp_hwm = get_temperatures_from_hwm()

tolerance = 0.1
tolerance = 1.0
test.check_approx_abs(pvt_temp_xu, pvt_temp_hwm, tolerance)
test.check_approx_abs(ohm_temp_xu, ohm_temp_hwm, tolerance)
test.check_approx_abs(projector_temp_xu, projector_temp_xu, tolerance)

test.finish()
#############################################################################################
Expand Down

0 comments on commit 632d173

Please sign in to comment.