Skip to content

Commit

Permalink
Merge pull request Schm1tz1#7 from johanms/celsius-conversion-bugfix
Browse files Browse the repository at this point in the history
bugfix in calc_Celsius, change datatype to signed int
  • Loading branch information
Schm1tz1 authored May 10, 2017
2 parents dcbde03 + 8c0d4f9 commit d28cc50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TSIC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ uint8_t TSIC::getTemperature(uint16_t *temp_value16){
The calculation is speed-optimized at the cost of a sligtly worse temperature resolution (about -0,0366°C @25°C).
*/
float TSIC::calc_Celsius(uint16_t *temperature16){
uint16_t temp_value16 = 0;
int16_t temp_value16 = 0;
float celsius = 0;

// optimized version of (temp_value/2047*(HT-LT)+LT)
Expand Down

0 comments on commit d28cc50

Please sign in to comment.