|
@@ -2248,10 +2248,7 @@ void Temperature::disable_all_heaters() {
|
2248
|
2248
|
|
2249
|
2249
|
#if HAS_MAX31865
|
2250
|
2250
|
Adafruit_MAX31865 &maxref = MAX6675_SEL(max31865_0, max31865_1);
|
2251
|
|
- max6675_temp = int(maxref.temperature(
|
2252
|
|
- MAX6675_SEL(MAX31865_SENSOR_OHMS_0, MAX31865_SENSOR_OHMS_1),
|
2253
|
|
- MAX6675_SEL(MAX31865_CALIBRATION_OHMS_0, MAX31865_CALIBRATION_OHMS_1)
|
2254
|
|
- ));
|
|
2251
|
+ const uint16_t max31865_ohms = (uint32_t(maxref.readRTD()) * MAX6675_SEL(MAX31865_CALIBRATION_OHMS_0, MAX31865_CALIBRATION_OHMS_1)) >> 16;
|
2255
|
2252
|
#endif
|
2256
|
2253
|
|
2257
|
2254
|
//
|
|
@@ -2325,6 +2322,9 @@ void Temperature::disable_all_heaters() {
|
2325
|
2322
|
if (max6675_temp & 0x00002000) max6675_temp |= 0xFFFFC000; // Support negative temperature
|
2326
|
2323
|
#endif
|
2327
|
2324
|
|
|
2325
|
+ // Return the RTD resistance for MAX31865 for display in SHOW_TEMP_ADC_VALUES
|
|
2326
|
+ TERN_(HAS_MAX31865, max6675_temp = max31865_ohms);
|
|
2327
|
+
|
2328
|
2328
|
MAX6675_TEMP(hindex) = max6675_temp;
|
2329
|
2329
|
|
2330
|
2330
|
return int(max6675_temp);
|