🐛 Finish and organize temp sensors (#23519)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
zerkix
2022-01-17 07:05:31 +01:00
committed by Scott Lahteine
parent af93dbfb4f
commit 9285b6b9ed
11 changed files with 144 additions and 229 deletions

View File

@@ -231,9 +231,6 @@ struct PIDHeaterInfo : public HeaterInfo {
typedef heater_info_t bed_info_t;
#endif
#endif
#if HAS_TEMP_PROBE
typedef temp_info_t probe_info_t;
#endif
#if HAS_HEATED_CHAMBER
#if ENABLED(PIDTEMPCHAMBER)
typedef struct PIDHeaterInfo<PID_t> chamber_info_t;
@@ -243,12 +240,15 @@ struct PIDHeaterInfo : public HeaterInfo {
#elif HAS_TEMP_CHAMBER
typedef temp_info_t chamber_info_t;
#endif
#if HAS_TEMP_BOARD
typedef temp_info_t board_info_t;
#if HAS_TEMP_PROBE
typedef temp_info_t probe_info_t;
#endif
#if EITHER(HAS_COOLER, HAS_TEMP_COOLER)
typedef heater_info_t cooler_info_t;
#endif
#if HAS_TEMP_BOARD
typedef temp_info_t board_info_t;
#endif
// Heater watch handling
template <int INCREASE, int HYSTERESIS, millis_t PERIOD>
@@ -318,12 +318,12 @@ typedef struct { int16_t raw_min, raw_max; celsius_t mintemp, maxtemp; } temp_ra
#if TEMP_SENSOR_BED_IS_CUSTOM
CTI_BED,
#endif
#if TEMP_SENSOR_PROBE_IS_CUSTOM
CTI_PROBE,
#endif
#if TEMP_SENSOR_CHAMBER_IS_CUSTOM
CTI_CHAMBER,
#endif
#if TEMP_SENSOR_PROBE_IS_CUSTOM
CTI_PROBE,
#endif
#if TEMP_SENSOR_COOLER_IS_CUSTOM
CTI_COOLER,
#endif
@@ -599,12 +599,12 @@ class Temperature {
#if HAS_HEATED_BED
static celsius_float_t analog_to_celsius_bed(const int16_t raw);
#endif
#if HAS_TEMP_PROBE
static celsius_float_t analog_to_celsius_probe(const int16_t raw);
#endif
#if HAS_TEMP_CHAMBER
static celsius_float_t analog_to_celsius_chamber(const int16_t raw);
#endif
#if HAS_TEMP_PROBE
static celsius_float_t analog_to_celsius_probe(const int16_t raw);
#endif
#if HAS_TEMP_COOLER
static celsius_float_t analog_to_celsius_cooler(const int16_t raw);
#endif