Skip to content

Commit 3c95e3d

Browse files
authored
Merge pull request #167 from nagimov/patch-1
fix comments for 12bit temp conversion formula
2 parents 7ec95d5 + 2e2316f commit 3c95e3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DallasTemperature.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,9 @@ int16_t DallasTemperature::calculateTemperature(const uint8_t* deviceAddress,
618618
extended resolution temperature can then be calculated using the
619619
following equation:
620620
621-
COUNT_PER_C - COUNT_REMAIN
621+
COUNT_PER_C - COUNT_REMAIN
622622
TEMPERATURE = TEMP_READ - 0.25 + --------------------------
623-
COUNT_PER_C
623+
COUNT_PER_C
624624
625625
Hagai Shatz simplified this to integer arithmetic for a 12 bits
626626
value for a DS18S20, and James Cameron added legacy DS1820 support.

0 commit comments

Comments
 (0)