Skip to content

Commit e916c9c

Browse files
authored
Update MAX31855.cpp
oops, 0x800 was wrong too
1 parent 6449441 commit e916c9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utility/THERMOCOUPLE/MAX31855.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ float MAX31855Class::readReferenceTemperature(int type)
208208

209209
// The cold junction reference temperature is stored in the first 11 word's bits
210210
// sent by the Thermocouple-to-Digital Converter
211-
rawword = rawword & 0x7FF;
211+
rawword = rawword & 0xFFF;
212212
// check sign bit and convert to negative value.
213213
if (rawword & 0x800) {
214214
ref = (0xF800 | (rawword & 0x7FF))*0.0625;

0 commit comments

Comments
 (0)