File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2248,10 +2248,7 @@ void Temperature::disable_all_heaters() {
22482248
22492249 #if HAS_MAX31865
22502250 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 ;
22552252 #endif
22562253
22572254 //
@@ -2325,6 +2322,9 @@ void Temperature::disable_all_heaters() {
23252322 if (max6675_temp & 0x00002000 ) max6675_temp |= 0xFFFFC000 ; // Support negative temperature
23262323 #endif
23272324
2325+ // Return the RTD resistance for MAX31865 for display in SHOW_TEMP_ADC_VALUES
2326+ TERN_ (HAS_MAX31865, max6675_temp = max31865_ohms);
2327+
23282328 MAX6675_TEMP (hindex) = max6675_temp;
23292329
23302330 return int (max6675_temp);
You can’t perform that action at this time.
0 commit comments