The calibration data (par_) have different data types (signed or unsigned, 8 or 16 bit). This must be taken into account during type cast to 'double'. Unfortunately, the data sheet does not provide any information on this. Further more, the data type 'int' is not portable because it is 32 bit long on 32-bit controller (e.g. STM32) but 16 bit on 8-bit controller (e.g. AVR). Use instead: uint16_t par_h1;
uint16_t par_h2;
int8_t par_h3;
int8_t par_h4;
int8_t par_h5;
uint8_t par_h6;
int8_t par_h7;
int8_t par_gh1;
int16_t par_gh2;
int8_t par_gh3;
uint16_t par_t1;
int16_t par_t2;
int8_t par_t3;
uint16_t par_p1;
int16_t par_p2;
int8_t par_p3;
int16_t par_p4;
int16_t par_p5;
int8_t par_p6;
int8_t par_p7;
int16_t par_p8;
int16_t par_p9;
uint8_t par_p10;
... View more