Skip to content

Commit e3f61d2

Browse files
authored
Merge pull request #7 from knickita/patch-1
Internal temperature is represented as int16_t, not uint16_t
2 parents 7f43826 + 085d1f5 commit e3f61d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SigFox.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ float SIGFOXClass::internalTemperature()
461461
digitalWrite(chip_select_pin, HIGH);
462462
delay(1);
463463

464-
return (float((uint16_t)temperatureH << 8 | temperatureL) - 50.0f) / 10;
464+
return ((float)((int16_t)((uint16_t)temperatureH << 8 | temperatureL)) - 50.0f) / 10;
465465
}
466466

467467
char* SIGFOXClass::readConfig(int* len)

0 commit comments

Comments
 (0)