File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ uint32_t MAX31855Class::readSensor() {
62
62
63
63
_spi->beginTransaction (_spiSettings);
64
64
65
-
66
65
for (int i = 0 ; i < 4 ; i++) {
67
66
read <<= 8 ;
68
67
read |= _spi->transfer (0 );
@@ -198,7 +197,7 @@ float MAX31855Class::readTCTemperature() {
198
197
float MAX31855Class::readReferenceTemperature () {
199
198
// TODO. Actually use TC _current_probe_type and _coldOffset
200
199
uint32_t rawword;
201
- float ref ;
200
+ float referenceTemperature ;
202
201
203
202
rawword = readSensor ();
204
203
@@ -210,13 +209,13 @@ float MAX31855Class::readReferenceTemperature() {
210
209
rawword = rawword & 0x7FF ;
211
210
// check sign bit and convert to negative value.
212
211
if (rawword & 0x800 ) {
213
- ref = (0xF800 | (rawword & 0x7FF )) * 0.0625 ;
212
+ referenceTemperature = (0xF800 | (rawword & 0x7FF )) * 0.0625 ;
214
213
} else {
215
214
// multiply for the LSB value
216
- ref = rawword * 0 .0625f ;
215
+ referenceTemperature = rawword * 0 .0625f ;
217
216
}
218
217
219
- return ref ;
218
+ return referenceTemperature ;
220
219
}
221
220
222
221
void MAX31855Class::setColdOffset (float offset) {
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ class MAX31855Class {
37
37
void setTCType (uint8_t type);
38
38
39
39
private:
40
- uint32_t readSensor ();
41
40
float _coldOffset;
42
41
uint8_t _faultMask = TC_FAULT_ALL;
43
42
uint8_t _lastFault = 0 ;
@@ -112,10 +111,10 @@ class MAX31855Class {
112
111
{sizeof (InvT0_400) / sizeof (double ), 20 .872f , &InvT0_400[0 ]},
113
112
};
114
113
114
+ uint32_t readSensor ();
115
115
double mvtoTemp (double voltage);
116
116
double tempTomv (double temp);
117
117
double polynomial (double value, int tableEntries, coefftable const (*table));
118
-
119
118
};
120
119
121
120
#endif
You can’t perform that action at this time.
0 commit comments