Warn about dummy thermistors

This commit is contained in:
Scott Lahteine
2021-10-18 01:49:35 -05:00
parent 5bfc5c1010
commit c3a4e6b3c8
5 changed files with 25 additions and 92 deletions

View File

@ -2207,22 +2207,22 @@ void Temperature::init() {
// Thermistor activation by MCU pin
#if PIN_EXISTS(TEMP_0_TR_ENABLE)
OUT_WRITE(TEMP_0_TR_ENABLE_PIN,
OUT_WRITE(TEMP_0_TR_ENABLE_PIN, (
#if TEMP_SENSOR_IS_ANY_MAX_TC(0)
1
HIGH
#else
0
LOW
#endif
);
));
#endif
#if PIN_EXISTS(TEMP_1_TR_ENABLE)
OUT_WRITE(TEMP_1_TR_ENABLE_PIN,
OUT_WRITE(TEMP_1_TR_ENABLE_PIN, (
#if TEMP_SENSOR_IS_ANY_MAX_TC(1)
1
HIGH
#else
0
LOW
#endif
);
));
#endif
#if HAS_HEATER_0

View File

@ -42,18 +42,6 @@
#define OV_SCALE(N) (N)
#define OV(N) int16_t(OV_SCALE(N) * (OVERSAMPLENR) * (THERMISTOR_TABLE_SCALE))
#define TEMP_SENSOR_IS(n,H) (n == TEMP_SENSOR_##H)
#define ANY_THERMISTOR_IS(n) ( TEMP_SENSOR_IS(n, 0) || TEMP_SENSOR_IS(n, 1) \
|| TEMP_SENSOR_IS(n, 2) || TEMP_SENSOR_IS(n, 3) \
|| TEMP_SENSOR_IS(n, 4) || TEMP_SENSOR_IS(n, 5) \
|| TEMP_SENSOR_IS(n, 6) || TEMP_SENSOR_IS(n, 7) \
|| TEMP_SENSOR_IS(n, BED) \
|| TEMP_SENSOR_IS(n, CHAMBER) \
|| TEMP_SENSOR_IS(n, COOLER) \
|| TEMP_SENSOR_IS(n, PROBE) \
|| TEMP_SENSOR_IS(n, BOARD) \
|| TEMP_SENSOR_IS(n, REDUNDANT) )
typedef struct { int16_t value; celsius_t celsius; } temp_entry_t;
// Pt1000 and Pt100 handling