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

Added default ctor and initialized valid #7572

Merged
merged 1 commit into from
Oct 14, 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
9 changes: 9 additions & 0 deletions src/algo/thermal-loop/l500-thermal-loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ namespace l500 {

const int thermal_calibration_table::id = 0x317;

thermal_calibration_table::thermal_calibration_table() : _resolution(0)
{
_header.max_temp = 0;
_header.min_temp = 0;
_header.reference_temp = 0;
_header.valid = 0;
}

thermal_calibration_table::thermal_calibration_table( const std::vector< byte > & data,
int resolution )
Expand All @@ -20,6 +27,8 @@ thermal_calibration_table::thermal_calibration_table( const std::vector< byte >
auto expected_size = sizeof( thermal_table_header )
+ sizeof( thermal_bin ) * resolution;

_header.valid = 0;

if( data.size() != expected_size )
throw std::runtime_error( librealsense::to_string()
<< "data size (" << data.size()
Expand Down
2 changes: 1 addition & 1 deletion src/algo/thermal-loop/l500-thermal-loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class thermal_calibration_table : public thermal_calibration_table_interface
thermal_table_header _header;
std::vector< thermal_bin > bins;

thermal_calibration_table() = default;
thermal_calibration_table();
thermal_calibration_table( const std::vector< byte > & data, int resolution = 29 );

double get_thermal_scale( double hum_temp ) const override;
Expand Down