From e916c9c3eee5af49593a9c913d29155c7b8567b9 Mon Sep 17 00:00:00 2001 From: kolaha99 <42593376+kolaha99@users.noreply.github.com> Date: Tue, 18 Jun 2024 05:09:13 +0200 Subject: [PATCH 1/2] Update MAX31855.cpp oops, 0x800 was wrong too --- src/utility/THERMOCOUPLE/MAX31855.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/THERMOCOUPLE/MAX31855.cpp b/src/utility/THERMOCOUPLE/MAX31855.cpp index eb2e64a..c0eba19 100644 --- a/src/utility/THERMOCOUPLE/MAX31855.cpp +++ b/src/utility/THERMOCOUPLE/MAX31855.cpp @@ -208,7 +208,7 @@ float MAX31855Class::readReferenceTemperature(int type) // The cold junction reference temperature is stored in the first 11 word's bits // sent by the Thermocouple-to-Digital Converter - rawword = rawword & 0x7FF; + rawword = rawword & 0xFFF; // check sign bit and convert to negative value. if (rawword & 0x800) { ref = (0xF800 | (rawword & 0x7FF))*0.0625; From fe1f72950b6ce7eaf7d8eba3ccd6bf3728af0863 Mon Sep 17 00:00:00 2001 From: kolaha99 <42593376+kolaha99@users.noreply.github.com> Date: Wed, 19 Jun 2024 20:30:19 +0200 Subject: [PATCH 2/2] Update MAX31855.cpp no Serial.print --- src/utility/THERMOCOUPLE/MAX31855.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/THERMOCOUPLE/MAX31855.cpp b/src/utility/THERMOCOUPLE/MAX31855.cpp index c0eba19..03f5b23 100644 --- a/src/utility/THERMOCOUPLE/MAX31855.cpp +++ b/src/utility/THERMOCOUPLE/MAX31855.cpp @@ -216,7 +216,7 @@ float MAX31855Class::readReferenceTemperature(int type) // multiply for the LSB value ref = rawword * 0.0625f; } - Serial.println(ref); + return ref; }