We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6449441 + fe1f729 commit 4cd9116Copy full SHA for 4cd9116
src/utility/THERMOCOUPLE/MAX31855.cpp
@@ -208,15 +208,15 @@ float MAX31855Class::readReferenceTemperature(int type)
208
209
// The cold junction reference temperature is stored in the first 11 word's bits
210
// sent by the Thermocouple-to-Digital Converter
211
- rawword = rawword & 0x7FF;
+ rawword = rawword & 0xFFF;
212
// check sign bit and convert to negative value.
213
if (rawword & 0x800) {
214
ref = (0xF800 | (rawword & 0x7FF))*0.0625;
215
} else {
216
// multiply for the LSB value
217
ref = rawword * 0.0625f;
218
}
219
- Serial.println(ref);
+
220
return ref;
221
222
0 commit comments