File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ double MAX31855Class::mvtoTemp(double voltage) {
134
134
return polynomial (voltage, tableEntries, table);
135
135
}
136
136
137
- float MAX31855Class::readTCTemperature () {
137
+ double MAX31855Class::readTCVoltage () {
138
138
uint32_t rawword;
139
139
int32_t measuredTempInt;
140
140
int32_t measuredColdInt;
@@ -189,6 +189,12 @@ float MAX31855Class::readTCTemperature() {
189
189
190
190
measuredVolt = tempTomv (measuredCold - _coldOffset) + (measuredTemp - measuredCold) * 0 .041276f ;
191
191
192
+ return measuredVolt;
193
+ }
194
+
195
+ double MAX31855Class::readTCTemperature () {
196
+ measuredVolt = readTCVoltage ();
197
+
192
198
// finally from the cold junction compensated voltage we calculate the temperature
193
199
// using NIST polynomial approximation for the thermocouple type we are using
194
200
return mvtoTemp (measuredVolt);
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ class MAX31855Class {
27
27
bool begin ();
28
28
void end ();
29
29
30
- float readTCTemperature ();
30
+ double readTCVoltage ();
31
+ double readTCTemperature ();
31
32
float readReferenceTemperature ();
32
33
void setColdOffset (float offset);
33
34
You can’t perform that action at this time.
0 commit comments