🔧 Thermistor (66) sanity-check (#24803)

This commit is contained in:
Keith Bennett
2022-10-01 09:19:51 -07:00
committed by GitHub
parent e1df912dc7
commit 11f8244573
9 changed files with 43 additions and 10 deletions

View File

@@ -2272,6 +2272,37 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "TEMP_SENSOR_REDUNDANT 1000 requires REDUNDANT_PULLUP_RESISTOR_OHMS, REDUNDANT_RESISTANCE_25C_OHMS and REDUNDANT_BETA in Configuration_adv.h."
#endif
/**
* Required thermistor 66 (Dyze Design / Trianglelab T-D500) settings
* https://docs.dyzedesign.com/hotends.html#_500-%C2%B0c-thermistor
*/
#if ANY_E_SENSOR_IS(66)
#define _BAD_MINTEMP(N) (TEMP_SENSOR(N) == 66 && HEATER_##N##_MINTEMP <= 20)
#if _BAD_MINTEMP(0)
#error "Thermistor 66 requires HEATER_0_MINTEMP > 20."
#elif _BAD_MINTEMP(1)
#error "Thermistor 66 requires HEATER_1_MINTEMP > 20."
#elif _BAD_MINTEMP(2)
#error "Thermistor 66 requires HEATER_2_MINTEMP > 20."
#elif _BAD_MINTEMP(3)
#error "Thermistor 66 requires HEATER_3_MINTEMP > 20."
#elif _BAD_MINTEMP(4)
#error "Thermistor 66 requires HEATER_4_MINTEMP > 20."
#elif _BAD_MINTEMP(5)
#error "Thermistor 66 requires HEATER_5_MINTEMP > 20."
#elif _BAD_MINTEMP(6)
#error "Thermistor 66 requires HEATER_6_MINTEMP > 20."
#elif _BAD_MINTEMP(7)
#error "Thermistor 66 requires HEATER_7_MINTEMP > 20."
#endif
#if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED < 5
#error "Thermistor 66 requires MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED ≥ 5."
#elif MILLISECONDS_PREHEAT_TIME < 30000
#error "Thermistor 66 requires MILLISECONDS_PREHEAT_TIME ≥ 30000."
#endif
#undef _BAD_MINTEMP
#endif
/**
* Required MAX31865 settings
*/