Skip to content
Open
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
6 changes: 3 additions & 3 deletions ms5837.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ enum ms5837_status ms5837_read_temperature_and_pressure( float *temperature, flo
else
{
T2 = ( 2 * ( (int64_t)dT * (int64_t)dT ) ) >> 37;
OFF2 = ((int64_t)TEMP + 1500) * ((int64_t)TEMP + 1500) >> 4;
OFF2 = ((int64_t)TEMP - 2000) * ((int64_t)TEMP - 2000) >> 4;
SENS2 = 0 ;
}

Expand All @@ -405,7 +405,7 @@ enum ms5837_status ms5837_read_temperature_and_pressure( float *temperature, flo
P = ( ( (adc_pressure * SENS) >> 21 ) - OFF ) >> 13 ;

*temperature = ( (float)TEMP - T2 ) / 100;
*pressure = (float)P / 100;
*pressure = (float)P / 10;

return status;
}
Expand Down Expand Up @@ -452,4 +452,4 @@ bool ms5837_crc_check (uint16_t *n_prom, uint8_t crc)

#ifdef __cplusplus
}
#endif
#endif