Fix thermistors exist-for-reading tests (#18533)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
ellensp 2020-07-05 13:04:31 +12:00 committed by GitHub
parent 6eb19cef11
commit 6df927d3b2
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1804,77 +1804,56 @@ void Temperature::init() {
temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \ temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \
}while(0) }while(0)
#if THERMISTOR_HEATER_0 #define _MINMAX_TEST(N,M) (HOTENDS > N && THERMISTOR_HEATER_##N && THERMISTOR_HEATER_##N != 998 && THERMISTOR_HEATER_##N != 999 && defined(HEATER_##N##_##M##TEMP))
#ifdef HEATER_0_MINTEMP
#if _MINMAX_TEST(0, MIN)
_TEMP_MIN_E(0); _TEMP_MIN_E(0);
#endif #endif
#ifdef HEATER_0_MAXTEMP #if _MINMAX_TEST(0, MAX)
_TEMP_MAX_E(0); _TEMP_MAX_E(0);
#endif #endif
#endif #if _MINMAX_TEST(1, MIN)
#if HAS_MULTI_HOTEND && THERMISTOR_HEATER_1
#ifdef HEATER_1_MINTEMP
_TEMP_MIN_E(1); _TEMP_MIN_E(1);
#endif #endif
#ifdef HEATER_1_MAXTEMP #if _MINMAX_TEST(1, MAX)
_TEMP_MAX_E(1); _TEMP_MAX_E(1);
#endif #endif
#endif #if _MINMAX_TEST(2, MIN)
#if HOTENDS > 2 && THERMISTOR_HEATER_2
#ifdef HEATER_2_MINTEMP
_TEMP_MIN_E(2); _TEMP_MIN_E(2);
#endif #endif
#ifdef HEATER_2_MAXTEMP #if _MINMAX_TEST(2, MAX)
_TEMP_MAX_E(2); _TEMP_MAX_E(2);
#endif #endif
#endif #if _MINMAX_TEST(3, MIN)
#if HOTENDS > 3 && THERMISTOR_HEATER_3
#ifdef HEATER_3_MINTEMP
_TEMP_MIN_E(3); _TEMP_MIN_E(3);
#endif #endif
#ifdef HEATER_3_MAXTEMP #if _MINMAX_TEST(3, MAX)
_TEMP_MAX_E(3); _TEMP_MAX_E(3);
#endif #endif
#endif #if _MINMAX_TEST(4, MIN)
#if HOTENDS > 4 && THERMISTOR_HEATER_4
#ifdef HEATER_4_MINTEMP
_TEMP_MIN_E(4); _TEMP_MIN_E(4);
#endif #endif
#ifdef HEATER_4_MAXTEMP #if _MINMAX_TEST(4, MAX)
_TEMP_MAX_E(4); _TEMP_MAX_E(4);
#endif #endif
#endif #if _MINMAX_TEST(5, MIN)
#if HOTENDS > 5 && THERMISTOR_HEATER_5
#ifdef HEATER_5_MINTEMP
_TEMP_MIN_E(5); _TEMP_MIN_E(5);
#endif #endif
#ifdef HEATER_5_MAXTEMP #if _MINMAX_TEST(5, MAX)
_TEMP_MAX_E(5); _TEMP_MAX_E(5);
#endif #endif
#endif #if _MINMAX_TEST(6, MIN)
#if HOTENDS > 6 && THERMISTOR_HEATER_6
#ifdef HEATER_6_MINTEMP
_TEMP_MIN_E(6); _TEMP_MIN_E(6);
#endif #endif
#ifdef HEATER_6_MAXTEMP #if _MINMAX_TEST(6, MAX)
_TEMP_MAX_E(6); _TEMP_MAX_E(6);
#endif #endif
#endif #if _MINMAX_TEST(7, MIN)
#if HOTENDS > 7 && THERMISTOR_HEATER_7
#ifdef HEATER_7_MINTEMP
_TEMP_MIN_E(7); _TEMP_MIN_E(7);
#endif #endif
#ifdef HEATER_7_MAXTEMP #if _MINMAX_TEST(7, MAX)
_TEMP_MAX_E(7); _TEMP_MAX_E(7);
#endif #endif
#endif
#endif // HAS_HOTEND #endif // HAS_HOTEND