Display chamber with HAS_TEMP_CHAMBER (#15194)

This commit is contained in:
Luu Lac
2019-09-08 02:20:18 -05:00
committed by Scott Lahteine
parent ca0f47985b
commit 8bca3fcf2c
4 changed files with 40 additions and 37 deletions

View File

@ -623,25 +623,6 @@ class Temperature {
start_watching_hotend(ee);
}
#if WATCH_CHAMBER
static void start_watching_chamber();
#else
static inline void start_watching_chamber() {}
#endif
#if HAS_HEATED_CHAMBER
static void setTargetChamber(const int16_t celsius) {
temp_chamber.target =
#ifdef CHAMBER_MAXTEMP
_MIN(celsius, CHAMBER_MAXTEMP)
#else
celsius
#endif
;
start_watching_chamber();
}
#endif // HAS_HEATED_CHAMBER
FORCE_INLINE static bool isHeatingHotend(const uint8_t e) {
E_UNUSED();
return temp_hotend[HOTEND_INDEX].target > temp_hotend[HOTEND_INDEX].current;
@ -660,6 +641,10 @@ class Temperature {
);
#endif
FORCE_INLINE static bool still_heating(const uint8_t e) {
return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
}
#if HAS_HEATED_BED
#if ENABLED(SHOW_TEMP_ADC_VALUES)
@ -712,9 +697,24 @@ class Temperature {
#endif
#endif // HAS_TEMP_CHAMBER
FORCE_INLINE static bool still_heating(const uint8_t e) {
return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
}
#if WATCH_CHAMBER
static void start_watching_chamber();
#else
static inline void start_watching_chamber() {}
#endif
#if HAS_HEATED_CHAMBER
static void setTargetChamber(const int16_t celsius) {
temp_chamber.target =
#ifdef CHAMBER_MAXTEMP
_MIN(celsius, CHAMBER_MAXTEMP)
#else
celsius
#endif
;
start_watching_chamber();
}
#endif // HAS_HEATED_CHAMBER
/**
* The software PWM power for a heater