|
@@ -179,7 +179,7 @@ enum ADCSensorState : char {
|
179
|
179
|
typedef struct TempInfo {
|
180
|
180
|
uint16_t acc;
|
181
|
181
|
int16_t raw;
|
182
|
|
- celsius_t celsius;
|
|
182
|
+ celsius_float_t celsius;
|
183
|
183
|
inline void reset() { acc = 0; }
|
184
|
184
|
inline void sample(const uint16_t s) { acc += s; }
|
185
|
185
|
inline void update() { raw = acc; }
|
|
@@ -501,7 +501,7 @@ class Temperature {
|
501
|
501
|
static user_thermistor_t user_thermistor[USER_THERMISTORS];
|
502
|
502
|
static void log_user_thermistor(const uint8_t t_index, const bool eprom=false);
|
503
|
503
|
static void reset_user_thermistors();
|
504
|
|
- static celsius_t user_thermistor_to_deg_c(const uint8_t t_index, const int raw);
|
|
504
|
+ static celsius_float_t user_thermistor_to_deg_c(const uint8_t t_index, const int raw);
|
505
|
505
|
static inline bool set_pull_up_res(int8_t t_index, float value) {
|
506
|
506
|
//if (!WITHIN(t_index, 0, USER_THERMISTORS - 1)) return false;
|
507
|
507
|
if (!WITHIN(value, 1, 1000000)) return false;
|
|
@@ -529,19 +529,19 @@ class Temperature {
|
529
|
529
|
#endif
|
530
|
530
|
|
531
|
531
|
#if HAS_HOTEND
|
532
|
|
- static celsius_t analog_to_celsius_hotend(const int raw, const uint8_t e);
|
|
532
|
+ static celsius_float_t analog_to_celsius_hotend(const int raw, const uint8_t e);
|
533
|
533
|
#endif
|
534
|
534
|
#if HAS_HEATED_BED
|
535
|
|
- static celsius_t analog_to_celsius_bed(const int raw);
|
|
535
|
+ static celsius_float_t analog_to_celsius_bed(const int raw);
|
536
|
536
|
#endif
|
537
|
537
|
#if HAS_TEMP_PROBE
|
538
|
|
- static celsius_t analog_to_celsius_probe(const int raw);
|
|
538
|
+ static celsius_float_t analog_to_celsius_probe(const int raw);
|
539
|
539
|
#endif
|
540
|
540
|
#if HAS_TEMP_CHAMBER
|
541
|
|
- static celsius_t analog_to_celsius_chamber(const int raw);
|
|
541
|
+ static celsius_float_t analog_to_celsius_chamber(const int raw);
|
542
|
542
|
#endif
|
543
|
543
|
#if HAS_TEMP_COOLER
|
544
|
|
- static celsius_t analog_to_celsius_cooler(const int raw);
|
|
544
|
+ static celsius_float_t analog_to_celsius_cooler(const int raw);
|
545
|
545
|
#endif
|
546
|
546
|
|
547
|
547
|
#if HAS_FAN
|
|
@@ -627,7 +627,7 @@ class Temperature {
|
627
|
627
|
//inline so that there is no performance decrease.
|
628
|
628
|
//deg=degreeCelsius
|
629
|
629
|
|
630
|
|
- static inline celsius_t degHotend(const uint8_t E_NAME) {
|
|
630
|
+ static inline celsius_float_t degHotend(const uint8_t E_NAME) {
|
631
|
631
|
return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].celsius);
|
632
|
632
|
}
|
633
|
633
|
|
|
@@ -701,7 +701,7 @@ class Temperature {
|
701
|
701
|
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
702
|
702
|
static inline int16_t rawBedTemp() { return temp_bed.raw; }
|
703
|
703
|
#endif
|
704
|
|
- static inline celsius_t degBed() { return temp_bed.celsius; }
|
|
704
|
+ static inline celsius_float_t degBed() { return temp_bed.celsius; }
|
705
|
705
|
static inline celsius_t wholeDegBed() { return static_cast<celsius_t>(degBed() + 0.5f); }
|
706
|
706
|
static inline celsius_t degTargetBed() { return temp_bed.target; }
|
707
|
707
|
static inline bool isHeatingBed() { return temp_bed.target > temp_bed.celsius; }
|
|
@@ -737,7 +737,7 @@ class Temperature {
|
737
|
737
|
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
738
|
738
|
static inline int16_t rawProbeTemp() { return temp_probe.raw; }
|
739
|
739
|
#endif
|
740
|
|
- static inline celsius_t degProbe() { return temp_probe.celsius; }
|
|
740
|
+ static inline celsius_float_t degProbe() { return temp_probe.celsius; }
|
741
|
741
|
static inline celsius_t wholeDegProbe() { return static_cast<celsius_t>(degProbe() + 0.5f); }
|
742
|
742
|
static inline bool isProbeBelowTemp(const celsius_t target_temp) { return wholeDegProbe() < target_temp; }
|
743
|
743
|
static inline bool isProbeAboveTemp(const celsius_t target_temp) { return wholeDegProbe() > target_temp; }
|
|
@@ -754,7 +754,7 @@ class Temperature {
|
754
|
754
|
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
755
|
755
|
static inline int16_t rawChamberTemp() { return temp_chamber.raw; }
|
756
|
756
|
#endif
|
757
|
|
- static inline celsius_t degChamber() { return temp_chamber.celsius; }
|
|
757
|
+ static inline celsius_float_t degChamber() { return temp_chamber.celsius; }
|
758
|
758
|
static inline celsius_t wholeDegChamber() { return static_cast<celsius_t>(degChamber() + 0.5f); }
|
759
|
759
|
#if HAS_HEATED_CHAMBER
|
760
|
760
|
static inline celsius_t degTargetChamber() { return temp_chamber.target; }
|
|
@@ -781,7 +781,7 @@ class Temperature {
|
781
|
781
|
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
782
|
782
|
static inline int16_t rawCoolerTemp() { return temp_cooler.raw; }
|
783
|
783
|
#endif
|
784
|
|
- static inline celsius_t degCooler() { return temp_cooler.celsius; }
|
|
784
|
+ static inline celsius_float_t degCooler() { return temp_cooler.celsius; }
|
785
|
785
|
static inline celsius_t wholeDegCooler() { return static_cast<celsius_t>(temp_cooler.celsius + 0.5f); }
|
786
|
786
|
#if HAS_COOLER
|
787
|
787
|
static inline celsius_t degTargetCooler() { return temp_cooler.target; }
|