5 #include "../../l500/l500-private.h" 9 namespace thermal_loop {
32 if( data.size() != expected_size )
34 <<
"data size (" << data.size()
35 <<
") does not meet expected size " << expected_size );
41 throw std::runtime_error(
"thermal calibration table is not valid" );
44 bins.assign( data_ptr, data_ptr + resolution );
50 if( lhs.
bins.size() != rhs.
bins.size() )
58 for(
auto i = 0;
i < rhs.
bins.size();
i++ )
74 auto const interval = temp_range / (
_resolution + 1 );
79 ++index, temp += interval )
81 auto interval_max = temp + interval;
82 if( hum_temp <= interval_max )
91 throw std::runtime_error(
"invalid 0 scale in thermal table" );
98 std::vector< float >
data;
105 for(
auto i = 0;
i <
bins.size();
i++ )
108 data.push_back(
bins[
i].sheer );
109 data.push_back(
bins[
i].tx );
113 std::vector< byte >
res;
114 res.assign( (
byte *)( data.data() ), (
byte *)( data.data() + data.size() ) );
thermal_calibration_table()
GLenum GLenum GLenum GLenum GLenum scale
bool operator==(const thermal_calibration_table &lhs, const thermal_calibration_table &rhs)
std::vector< byte > build_raw_data() const override
thermal_table_header _header
std::vector< thermal_bin > bins
double get_thermal_scale(double hum_temp) const override