diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index d5de826b47ec18f0ae22013f30012490d50d8000..4d081f39c1226f833a64a3db2e6e4455b88b4db2 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1800,13 +1800,13 @@ void Temperature::init() { #if HAS_HOTEND #define _TEMP_MIN_E(NR) do{ \ - const int16_t tmin = _MAX(HEATER_ ##NR## _MINTEMP, (int16_t)pgm_read_word(&HEATER_ ##NR## _TEMPTABLE[HEATER_ ##NR## _SENSOR_MINTEMP_IND].celsius)); \ + const int16_t tmin = _MAX(HEATER_ ##NR## _MINTEMP, TERN(HEATER_##NR##_USER_THERMISTOR, 0, (int16_t)pgm_read_word(&HEATER_ ##NR## _TEMPTABLE[HEATER_ ##NR## _SENSOR_MINTEMP_IND].celsius))); \ temp_range[NR].mintemp = tmin; \ while (analog_to_celsius_hotend(temp_range[NR].raw_min, NR) < tmin) \ temp_range[NR].raw_min += TEMPDIR(NR) * (OVERSAMPLENR); \ }while(0) #define _TEMP_MAX_E(NR) do{ \ - const int16_t tmax = _MIN(HEATER_ ##NR## _MAXTEMP, (int16_t)pgm_read_word(&HEATER_ ##NR## _TEMPTABLE[HEATER_ ##NR## _SENSOR_MAXTEMP_IND].celsius) - 1); \ + const int16_t tmax = _MIN(HEATER_ ##NR## _MAXTEMP, TERN(HEATER_##NR##_USER_THERMISTOR, 2000, (int16_t)pgm_read_word(&HEATER_ ##NR## _TEMPTABLE[HEATER_ ##NR## _SENSOR_MAXTEMP_IND].celsius) - 1)); \ temp_range[NR].maxtemp = tmax; \ while (analog_to_celsius_hotend(temp_range[NR].raw_max, NR) > tmax) \ temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \ diff --git a/Marlin/src/module/thermistor/thermistor_1010.h b/Marlin/src/module/thermistor/thermistor_1010.h index 71e830d952fdb77de0b598a4c6c6d098ee974b80..161e1385f9e6d447d126630335a244066d2c5309 100644 --- a/Marlin/src/module/thermistor/thermistor_1010.h +++ b/Marlin/src/module/thermistor/thermistor_1010.h @@ -21,6 +21,8 @@ */ #pragma once +#define REVERSE_TEMP_SENSOR_RANGE_1010 1 + // Pt1000 with 1k0 pullup const temp_entry_t temptable_1010[] PROGMEM = { PtLine( 0, 1000, 1000), diff --git a/Marlin/src/module/thermistor/thermistor_1047.h b/Marlin/src/module/thermistor/thermistor_1047.h index 6a82d04be8fe598fdb3d937b8d943a636e22f5f1..cc99771be677905fc3f5cf966685c36facddd357 100644 --- a/Marlin/src/module/thermistor/thermistor_1047.h +++ b/Marlin/src/module/thermistor/thermistor_1047.h @@ -21,6 +21,8 @@ */ #pragma once +#define REVERSE_TEMP_SENSOR_RANGE_1047 1 + // Pt1000 with 4k7 pullup const temp_entry_t temptable_1047[] PROGMEM = { // only a few values are needed as the curve is very flat diff --git a/Marlin/src/module/thermistor/thermistor_110.h b/Marlin/src/module/thermistor/thermistor_110.h index 32ee08580769f2f27333adf86d071cd583ee0deb..264b6f5bab3f7d7d2e8f8e73c011d080edee0b34 100644 --- a/Marlin/src/module/thermistor/thermistor_110.h +++ b/Marlin/src/module/thermistor/thermistor_110.h @@ -21,6 +21,8 @@ */ #pragma once +#define REVERSE_TEMP_SENSOR_RANGE_110 1 + // Pt100 with 1k0 pullup const temp_entry_t temptable_110[] PROGMEM = { // only a few values are needed as the curve is very flat diff --git a/Marlin/src/module/thermistor/thermistor_147.h b/Marlin/src/module/thermistor/thermistor_147.h index 61a82affa74bd010658bb8b6c22b3ddbd38d8a98..b1e782e111690c9d9e7de2662b20eb3f17e6f355 100644 --- a/Marlin/src/module/thermistor/thermistor_147.h +++ b/Marlin/src/module/thermistor/thermistor_147.h @@ -21,6 +21,8 @@ */ #pragma once +#define REVERSE_TEMP_SENSOR_RANGE_147 1 + // Pt100 with 4k7 pullup const temp_entry_t temptable_147[] PROGMEM = { // only a few values are needed as the curve is very flat