Skip to content

Commit 5021c28

Browse files
authored
Merge pull request milesburton#134 from LustigePerson/master
Correct first fix
2 parents ee49261 + 8061fa8 commit 5021c28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DallasTemperature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ int16_t DallasTemperature::calculateTemperature(const uint8_t* deviceAddress,
528528
*/
529529

530530
if (deviceAddress[0] == DS18S20MODEL) {
531-
fpTemperature = ((fpTemperature & 0xfff0) << 3)
531+
fpTemperature = ((fpTemperature & 0xfff0) << 3) - 32
532532
+ (((scratchPad[COUNT_PER_C] - scratchPad[COUNT_REMAIN]) << 7)
533533
/ scratchPad[COUNT_PER_C]);
534534
}

0 commit comments

Comments
 (0)