|
|
@ -359,7 +359,7 @@ class Temperature { |
|
|
|
#if HAS_HOTEND |
|
|
|
static hotend_info_t temp_hotend[HOTENDS]; |
|
|
|
static const celsius_t hotend_maxtemp[HOTENDS]; |
|
|
|
static inline celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); } |
|
|
|
static celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); } |
|
|
|
#endif |
|
|
|
#if HAS_HEATED_BED |
|
|
|
static bed_info_t temp_bed; |
|
|
@ -402,16 +402,16 @@ class Temperature { |
|
|
|
#if ENABLED(PREVENT_COLD_EXTRUSION) |
|
|
|
static bool allow_cold_extrude; |
|
|
|
static celsius_t extrude_min_temp; |
|
|
|
static inline bool tooCold(const celsius_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp - (TEMP_WINDOW); } |
|
|
|
static inline bool tooColdToExtrude(const uint8_t E_NAME) { return tooCold(wholeDegHotend(HOTEND_INDEX)); } |
|
|
|
static inline bool targetTooColdToExtrude(const uint8_t E_NAME) { return tooCold(degTargetHotend(HOTEND_INDEX)); } |
|
|
|
static bool tooCold(const celsius_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp - (TEMP_WINDOW); } |
|
|
|
static bool tooColdToExtrude(const uint8_t E_NAME) { return tooCold(wholeDegHotend(HOTEND_INDEX)); } |
|
|
|
static bool targetTooColdToExtrude(const uint8_t E_NAME) { return tooCold(degTargetHotend(HOTEND_INDEX)); } |
|
|
|
#else |
|
|
|
static inline bool tooColdToExtrude(const uint8_t) { return false; } |
|
|
|
static inline bool targetTooColdToExtrude(const uint8_t) { return false; } |
|
|
|
static bool tooColdToExtrude(const uint8_t) { return false; } |
|
|
|
static bool targetTooColdToExtrude(const uint8_t) { return false; } |
|
|
|
#endif |
|
|
|
|
|
|
|
static inline bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); } |
|
|
|
static inline bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); } |
|
|
|
static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); } |
|
|
|
static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); } |
|
|
|
|
|
|
|
#if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) |
|
|
|
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP) |
|
|
@ -449,7 +449,7 @@ class Temperature { |
|
|
|
}; |
|
|
|
|
|
|
|
// Convert the given heater_id_t to idle array index
|
|
|
|
static inline IdleIndex idle_index_for_id(const int8_t heater_id) { |
|
|
|
static IdleIndex idle_index_for_id(const int8_t heater_id) { |
|
|
|
TERN_(HAS_HEATED_BED, if (heater_id == H_BED) return IDLE_INDEX_BED); |
|
|
|
return (IdleIndex)_MAX(heater_id, 0); |
|
|
|
} |
|
|
@ -525,7 +525,7 @@ class Temperature { |
|
|
|
#if HAS_FAN_LOGIC |
|
|
|
static millis_t fan_update_ms; |
|
|
|
|
|
|
|
static inline void manage_extruder_fans(millis_t ms) { |
|
|
|
static void manage_extruder_fans(millis_t ms) { |
|
|
|
if (ELAPSED(ms, fan_update_ms)) { // only need to check fan state very infrequently
|
|
|
|
const millis_t next_ms = ms + fan_update_interval_ms; |
|
|
|
#if HAS_PWMFANCHECK |
|
|
@ -566,25 +566,25 @@ class Temperature { |
|
|
|
static void M305_report(const uint8_t t_index, const bool forReplay=true); |
|
|
|
static void reset_user_thermistors(); |
|
|
|
static celsius_float_t user_thermistor_to_deg_c(const uint8_t t_index, const int16_t raw); |
|
|
|
static inline bool set_pull_up_res(int8_t t_index, float value) { |
|
|
|
static bool set_pull_up_res(int8_t t_index, float value) { |
|
|
|
//if (!WITHIN(t_index, 0, USER_THERMISTORS - 1)) return false;
|
|
|
|
if (!WITHIN(value, 1, 1000000)) return false; |
|
|
|
user_thermistor[t_index].series_res = value; |
|
|
|
return true; |
|
|
|
} |
|
|
|
static inline bool set_res25(int8_t t_index, float value) { |
|
|
|
static bool set_res25(int8_t t_index, float value) { |
|
|
|
if (!WITHIN(value, 1, 10000000)) return false; |
|
|
|
user_thermistor[t_index].res_25 = value; |
|
|
|
user_thermistor[t_index].pre_calc = true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
static inline bool set_beta(int8_t t_index, float value) { |
|
|
|
static bool set_beta(int8_t t_index, float value) { |
|
|
|
if (!WITHIN(value, 1, 1000000)) return false; |
|
|
|
user_thermistor[t_index].beta = value; |
|
|
|
user_thermistor[t_index].pre_calc = true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
static inline bool set_sh_coeff(int8_t t_index, float value) { |
|
|
|
static bool set_sh_coeff(int8_t t_index, float value) { |
|
|
|
if (!WITHIN(value, -0.01f, 0.01f)) return false; |
|
|
|
user_thermistor[t_index].sh_c_coeff = value; |
|
|
|
user_thermistor[t_index].pre_calc = true; |
|
|
@ -634,18 +634,18 @@ class Temperature { |
|
|
|
static uint8_t fan_speed_scaler[FAN_COUNT]; |
|
|
|
#endif |
|
|
|
|
|
|
|
static inline uint8_t scaledFanSpeed(const uint8_t fan, const uint8_t fs) { |
|
|
|
static uint8_t scaledFanSpeed(const uint8_t fan, const uint8_t fs) { |
|
|
|
UNUSED(fan); // Potentially unused!
|
|
|
|
return (fs * uint16_t(TERN(ADAPTIVE_FAN_SLOWING, fan_speed_scaler[fan], 128))) >> 7; |
|
|
|
} |
|
|
|
|
|
|
|
static inline uint8_t scaledFanSpeed(const uint8_t fan) { |
|
|
|
static uint8_t scaledFanSpeed(const uint8_t fan) { |
|
|
|
return scaledFanSpeed(fan, fan_speed[fan]); |
|
|
|
} |
|
|
|
|
|
|
|
static constexpr inline uint8_t pwmToPercent(const uint8_t speed) { return ui8_to_percent(speed); } |
|
|
|
static inline uint8_t fanSpeedPercent(const uint8_t fan) { return ui8_to_percent(fan_speed[fan]); } |
|
|
|
static inline uint8_t scaledFanSpeedPercent(const uint8_t fan) { return ui8_to_percent(scaledFanSpeed(fan)); } |
|
|
|
static uint8_t fanSpeedPercent(const uint8_t fan) { return ui8_to_percent(fan_speed[fan]); } |
|
|
|
static uint8_t scaledFanSpeedPercent(const uint8_t fan) { return ui8_to_percent(scaledFanSpeed(fan)); } |
|
|
|
|
|
|
|
#if ENABLED(EXTRA_FAN_SPEED) |
|
|
|
typedef struct { uint8_t saved, speed; } extra_fan_t; |
|
|
@ -659,7 +659,7 @@ class Temperature { |
|
|
|
|
|
|
|
#endif // HAS_FAN
|
|
|
|
|
|
|
|
static inline void zero_fan_speeds() { |
|
|
|
static void zero_fan_speeds() { |
|
|
|
#if HAS_FAN |
|
|
|
FANS_LOOP(i) set_fan_speed(i, 0); |
|
|
|
#endif |
|
|
@ -680,13 +680,13 @@ class Temperature { |
|
|
|
* Preheating hotends |
|
|
|
*/ |
|
|
|
#if MILLISECONDS_PREHEAT_TIME > 0 |
|
|
|
static inline bool is_preheating(const uint8_t E_NAME) { |
|
|
|
static bool is_preheating(const uint8_t E_NAME) { |
|
|
|
return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]); |
|
|
|
} |
|
|
|
static inline void start_preheat_time(const uint8_t E_NAME) { |
|
|
|
static void start_preheat_time(const uint8_t E_NAME) { |
|
|
|
preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME; |
|
|
|
} |
|
|
|
static inline void reset_preheat_time(const uint8_t E_NAME) { |
|
|
|
static void reset_preheat_time(const uint8_t E_NAME) { |
|
|
|
preheat_end_time[HOTEND_INDEX] = 0; |
|
|
|
} |
|
|
|
#else |
|
|
@ -697,21 +697,21 @@ class Temperature { |
|
|
|
//inline so that there is no performance decrease.
|
|
|
|
//deg=degreeCelsius
|
|
|
|
|
|
|
|
static inline celsius_float_t degHotend(const uint8_t E_NAME) { |
|
|
|
static celsius_float_t degHotend(const uint8_t E_NAME) { |
|
|
|
return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].celsius); |
|
|
|
} |
|
|
|
|
|
|
|
static inline celsius_t wholeDegHotend(const uint8_t E_NAME) { |
|
|
|
static celsius_t wholeDegHotend(const uint8_t E_NAME) { |
|
|
|
return TERN0(HAS_HOTEND, static_cast<celsius_t>(temp_hotend[HOTEND_INDEX].celsius + 0.5f)); |
|
|
|
} |
|
|
|
|
|
|
|
#if ENABLED(SHOW_TEMP_ADC_VALUES) |
|
|
|
static inline int16_t rawHotendTemp(const uint8_t E_NAME) { |
|
|
|
static int16_t rawHotendTemp(const uint8_t E_NAME) { |
|
|
|
return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].raw); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
static inline celsius_t degTargetHotend(const uint8_t E_NAME) { |
|
|
|
static celsius_t degTargetHotend(const uint8_t E_NAME) { |
|
|
|
return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].target); |
|
|
|
} |
|
|
|
|
|
|
@ -730,11 +730,11 @@ class Temperature { |
|
|
|
start_watching_hotend(ee); |
|
|
|
} |
|
|
|
|
|
|
|
static inline bool isHeatingHotend(const uint8_t E_NAME) { |
|
|
|
static bool isHeatingHotend(const uint8_t E_NAME) { |
|
|
|
return temp_hotend[HOTEND_INDEX].target > temp_hotend[HOTEND_INDEX].celsius; |
|
|
|
} |
|
|
|
|
|
|
|
static inline bool isCoolingHotend(const uint8_t E_NAME) { |
|
|
|
static bool isCoolingHotend(const uint8_t E_NAME) { |
|
|
|
return temp_hotend[HOTEND_INDEX].target < temp_hotend[HOTEND_INDEX].celsius; |
|
|
|
} |
|
|
|
|
|
|
@ -748,16 +748,16 @@ class Temperature { |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
static inline bool still_heating(const uint8_t e) { |
|
|
|
static bool still_heating(const uint8_t e) { |
|
|
|
return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(wholeDegHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS; |
|
|
|
} |
|
|
|
|
|
|
|
static inline bool degHotendNear(const uint8_t e, const celsius_t temp) { |
|
|
|
static bool degHotendNear(const uint8_t e, const celsius_t temp) { |
|
|
|
return ABS(wholeDegHotend(e) - temp) < (TEMP_HYSTERESIS); |
|
|
|
} |
|
|
|
|
|
|
|
// Start watching a Hotend to make sure it's really heating up
|
|
|
|
static inline void start_watching_hotend(const uint8_t E_NAME) { |
|
|
|
static void start_watching_hotend(const uint8_t E_NAME) { |
|
|
|
UNUSED(HOTEND_INDEX); |
|
|
|
#if WATCH_HOTENDS |
|
|
|
watch_hotend[HOTEND_INDEX].restart(degHotend(HOTEND_INDEX), degTargetHotend(HOTEND_INDEX)); |
|
|
@ -769,16 +769,16 @@ class Temperature { |
|
|
|
#if HAS_HEATED_BED |
|
|
|
|
|
|
|
#if ENABLED(SHOW_TEMP_ADC_VALUES) |
|
|
|
static inline int16_t rawBedTemp() { return temp_bed.raw; } |
|
|
|
static int16_t rawBedTemp() { return temp_bed.raw; } |
|
|
|
#endif |
|
|
|
static inline celsius_float_t degBed() { return temp_bed.celsius; } |
|
|
|
static inline celsius_t wholeDegBed() { return static_cast<celsius_t>(degBed() + 0.5f); } |
|
|
|
static inline celsius_t degTargetBed() { return temp_bed.target; } |
|
|
|
static inline bool isHeatingBed() { return temp_bed.target > temp_bed.celsius; } |
|
|
|
static inline bool isCoolingBed() { return temp_bed.target < temp_bed.celsius; } |
|
|
|
static celsius_float_t degBed() { return temp_bed.celsius; } |
|
|
|
static celsius_t wholeDegBed() { return static_cast<celsius_t>(degBed() + 0.5f); } |
|
|
|
static celsius_t degTargetBed() { return temp_bed.target; } |
|
|
|
static bool isHeatingBed() { return temp_bed.target > temp_bed.celsius; } |
|
|
|
static bool isCoolingBed() { return temp_bed.target < temp_bed.celsius; } |
|
|
|
|
|
|
|
// Start watching the Bed to make sure it's really heating up
|
|
|
|
static inline void start_watching_bed() { TERN_(WATCH_BED, watch_bed.restart(degBed(), degTargetBed())); } |
|
|
|
static void start_watching_bed() { TERN_(WATCH_BED, watch_bed.restart(degBed(), degTargetBed())); } |
|
|
|
|
|
|
|
static void setTargetBed(const celsius_t celsius) { |
|
|
|
TERN_(AUTO_POWER_CONTROL, if (celsius) powerManager.power_on()); |
|
|
@ -792,7 +792,7 @@ class Temperature { |
|
|
|
|
|
|
|
static void wait_for_bed_heating(); |
|
|
|
|
|
|
|
static inline bool degBedNear(const celsius_t temp) { |
|
|
|
static bool degBedNear(const celsius_t temp) { |
|
|
|
return ABS(wholeDegBed() - temp) < (TEMP_BED_HYSTERESIS); |
|
|
|
} |
|
|
|
|
|
|
@ -800,25 +800,25 @@ class Temperature { |
|
|
|
|
|
|
|
#if HAS_TEMP_PROBE |
|
|
|
#if ENABLED(SHOW_TEMP_ADC_VALUES) |
|
|
|
static inline int16_t rawProbeTemp() { return temp_probe.raw; } |
|
|
|
static int16_t rawProbeTemp() { return temp_probe.raw; } |
|
|
|
#endif |
|
|
|
static inline celsius_float_t degProbe() { return temp_probe.celsius; } |
|
|
|
static inline celsius_t wholeDegProbe() { return static_cast<celsius_t>(degProbe() + 0.5f); } |
|
|
|
static inline bool isProbeBelowTemp(const celsius_t target_temp) { return wholeDegProbe() < target_temp; } |
|
|
|
static inline bool isProbeAboveTemp(const celsius_t target_temp) { return wholeDegProbe() > target_temp; } |
|
|
|
static celsius_float_t degProbe() { return temp_probe.celsius; } |
|
|
|
static celsius_t wholeDegProbe() { return static_cast<celsius_t>(degProbe() + 0.5f); } |
|
|
|
static bool isProbeBelowTemp(const celsius_t target_temp) { return wholeDegProbe() < target_temp; } |
|
|
|
static bool isProbeAboveTemp(const celsius_t target_temp) { return wholeDegProbe() > target_temp; } |
|
|
|
static bool wait_for_probe(const celsius_t target_temp, bool no_wait_for_cooling=true); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_TEMP_CHAMBER |
|
|
|
#if ENABLED(SHOW_TEMP_ADC_VALUES) |
|
|
|
static inline int16_t rawChamberTemp() { return temp_chamber.raw; } |
|
|
|
static int16_t rawChamberTemp() { return temp_chamber.raw; } |
|
|
|
#endif |
|
|
|
static inline celsius_float_t degChamber() { return temp_chamber.celsius; } |
|
|
|
static inline celsius_t wholeDegChamber() { return static_cast<celsius_t>(degChamber() + 0.5f); } |
|
|
|
static celsius_float_t degChamber() { return temp_chamber.celsius; } |
|
|
|
static celsius_t wholeDegChamber() { return static_cast<celsius_t>(degChamber() + 0.5f); } |
|
|
|
#if HAS_HEATED_CHAMBER |
|
|
|
static inline celsius_t degTargetChamber() { return temp_chamber.target; } |
|
|
|
static inline bool isHeatingChamber() { return temp_chamber.target > temp_chamber.celsius; } |
|
|
|
static inline bool isCoolingChamber() { return temp_chamber.target < temp_chamber.celsius; } |
|
|
|
static celsius_t degTargetChamber() { return temp_chamber.target; } |
|
|
|
static bool isHeatingChamber() { return temp_chamber.target > temp_chamber.celsius; } |
|
|
|
static bool isCoolingChamber() { return temp_chamber.target < temp_chamber.celsius; } |
|
|
|
static bool wait_for_chamber(const bool no_wait_for_cooling=true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -829,49 +829,49 @@ class Temperature { |
|
|
|
start_watching_chamber(); |
|
|
|
} |
|
|
|
// Start watching the Chamber to make sure it's really heating up
|
|
|
|
static inline void start_watching_chamber() { TERN_(WATCH_CHAMBER, watch_chamber.restart(degChamber(), degTargetChamber())); } |
|
|
|
static void start_watching_chamber() { TERN_(WATCH_CHAMBER, watch_chamber.restart(degChamber(), degTargetChamber())); } |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_TEMP_COOLER |
|
|
|
#if ENABLED(SHOW_TEMP_ADC_VALUES) |
|
|
|
static inline int16_t rawCoolerTemp() { return temp_cooler.raw; } |
|
|
|
static int16_t rawCoolerTemp() { return temp_cooler.raw; } |
|
|
|
#endif |
|
|
|
static inline celsius_float_t degCooler() { return temp_cooler.celsius; } |
|
|
|
static inline celsius_t wholeDegCooler() { return static_cast<celsius_t>(temp_cooler.celsius + 0.5f); } |
|
|
|
static celsius_float_t degCooler() { return temp_cooler.celsius; } |
|
|
|
static celsius_t wholeDegCooler() { return static_cast<celsius_t>(temp_cooler.celsius + 0.5f); } |
|
|
|
#if HAS_COOLER |
|
|
|
static inline celsius_t degTargetCooler() { return temp_cooler.target; } |
|
|
|
static inline bool isLaserHeating() { return temp_cooler.target > temp_cooler.celsius; } |
|
|
|
static inline bool isLaserCooling() { return temp_cooler.target < temp_cooler.celsius; } |
|
|
|
static celsius_t degTargetCooler() { return temp_cooler.target; } |
|
|
|
static bool isLaserHeating() { return temp_cooler.target > temp_cooler.celsius; } |
|
|
|
static bool isLaserCooling() { return temp_cooler.target < temp_cooler.celsius; } |
|
|
|
static bool wait_for_cooler(const bool no_wait_for_cooling=true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_TEMP_BOARD |
|
|
|
#if ENABLED(SHOW_TEMP_ADC_VALUES) |
|
|
|
static inline int16_t rawBoardTemp() { return temp_board.raw; } |
|
|
|
static int16_t rawBoardTemp() { return temp_board.raw; } |
|
|
|
#endif |
|
|
|
static inline celsius_float_t degBoard() { return temp_board.celsius; } |
|
|
|
static inline celsius_t wholeDegBoard() { return static_cast<celsius_t>(temp_board.celsius + 0.5f); } |
|
|
|
static celsius_float_t degBoard() { return temp_board.celsius; } |
|
|
|
static celsius_t wholeDegBoard() { return static_cast<celsius_t>(temp_board.celsius + 0.5f); } |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_TEMP_REDUNDANT |
|
|
|
#if ENABLED(SHOW_TEMP_ADC_VALUES) |
|
|
|
static inline int16_t rawRedundantTemp() { return temp_redundant.raw; } |
|
|
|
static inline int16_t rawRedundanTargetTemp() { return (*temp_redundant.target).raw; } |
|
|
|
static int16_t rawRedundantTemp() { return temp_redundant.raw; } |
|
|
|
static int16_t rawRedundanTargetTemp() { return (*temp_redundant.target).raw; } |
|
|
|
#endif |
|
|
|
static inline celsius_float_t degRedundant() { return temp_redundant.celsius; } |
|
|
|
static inline celsius_float_t degRedundantTarget() { return (*temp_redundant.target).celsius; } |
|
|
|
static inline celsius_t wholeDegRedundant() { return static_cast<celsius_t>(temp_redundant.celsius + 0.5f); } |
|
|
|
static inline celsius_t wholeDegRedundantTarget() { return static_cast<celsius_t>((*temp_redundant.target).celsius + 0.5f); } |
|
|
|
static celsius_float_t degRedundant() { return temp_redundant.celsius; } |
|
|
|
static celsius_float_t degRedundantTarget() { return (*temp_redundant.target).celsius; } |
|
|
|
static celsius_t wholeDegRedundant() { return static_cast<celsius_t>(temp_redundant.celsius + 0.5f); } |
|
|
|
static celsius_t wholeDegRedundantTarget() { return static_cast<celsius_t>((*temp_redundant.target).celsius + 0.5f); } |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_COOLER |
|
|
|
static inline void setTargetCooler(const celsius_t celsius) { |
|
|
|
static void setTargetCooler(const celsius_t celsius) { |
|
|
|
temp_cooler.target = constrain(celsius, COOLER_MIN_TARGET, COOLER_MAX_TARGET); |
|
|
|
start_watching_cooler(); |
|
|
|
} |
|
|
|
// Start watching the Cooler to make sure it's really cooling down
|
|
|
|
static inline void start_watching_cooler() { TERN_(WATCH_COOLER, watch_cooler.restart(degCooler(), degTargetCooler())); } |
|
|
|
static void start_watching_cooler() { TERN_(WATCH_COOLER, watch_cooler.restart(degCooler(), degTargetCooler())); } |
|
|
|
#endif |
|
|
|
|
|
|
|
/**
|
|
|
@ -887,7 +887,7 @@ class Temperature { |
|
|
|
/**
|
|
|
|
* Cooldown, as from the LCD. Disables all heaters and fans. |
|
|
|
*/ |
|
|
|
static inline void cooldown() { |
|
|
|
static void cooldown() { |
|
|
|
zero_fan_speeds(); |
|
|
|
disable_all_heaters(); |
|
|
|
} |
|
|
@ -921,7 +921,7 @@ class Temperature { |
|
|
|
* Update the temp manager when PID values change |
|
|
|
*/ |
|
|
|
#if ENABLED(PIDTEMP) |
|
|
|
static inline void updatePID() { |
|
|
|
static void updatePID() { |
|
|
|
TERN_(PID_EXTRUSION_SCALING, last_e_position = 0); |
|
|
|
} |
|
|
|
#endif |
|
|
@ -934,13 +934,13 @@ class Temperature { |
|
|
|
|
|
|
|
#if HEATER_IDLE_HANDLER |
|
|
|
|
|
|
|
static inline void reset_hotend_idle_timer(const uint8_t E_NAME) { |
|
|
|
static void reset_hotend_idle_timer(const uint8_t E_NAME) { |
|
|
|
heater_idle[HOTEND_INDEX].reset(); |
|
|
|
start_watching_hotend(HOTEND_INDEX); |
|
|
|
} |
|
|
|
|
|
|
|
#if HAS_HEATED_BED |
|
|
|
static inline void reset_bed_idle_timer() { |
|
|
|
static void reset_bed_idle_timer() { |
|
|
|
heater_idle[IDLE_INDEX_BED].reset(); |
|
|
|
start_watching_bed(); |
|
|
|
} |
|
|
@ -961,7 +961,7 @@ class Temperature { |
|
|
|
#if HAS_HOTEND && HAS_STATUS_MESSAGE |
|
|
|
static void set_heating_message(const uint8_t e); |
|
|
|
#else |
|
|
|
static inline void set_heating_message(const uint8_t) {} |
|
|
|
static void set_heating_message(const uint8_t) {} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if HAS_LCD_MENU && HAS_TEMPERATURE |
|
|
@ -974,7 +974,7 @@ class Temperature { |
|
|
|
static volatile bool raw_temps_ready; |
|
|
|
static void update_raw_temperatures(); |
|
|
|
static void updateTemperaturesFromRawValues(); |
|
|
|
static inline bool updateTemperaturesIfReady() { |
|
|
|
static bool updateTemperaturesIfReady() { |
|
|
|
if (!raw_temps_ready) return false; |
|
|
|
updateTemperaturesFromRawValues(); |
|
|
|
raw_temps_ready = false; |
|
|
@ -1028,7 +1028,7 @@ class Temperature { |
|
|
|
}; |
|
|
|
|
|
|
|
// Convert the given heater_id_t to runaway state array index
|
|
|
|
static inline RunawayIndex runaway_index_for_id(const int8_t heater_id) { |
|
|
|
static RunawayIndex runaway_index_for_id(const int8_t heater_id) { |
|
|
|
TERN_(HAS_THERMALLY_PROTECTED_CHAMBER, if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER); |
|
|
|
TERN_(HAS_THERMALLY_PROTECTED_CHAMBER, if (heater_id == H_COOLER) return RUNAWAY_IND_COOLER); |
|
|
|
TERN_(HAS_THERMALLY_PROTECTED_BED, if (heater_id == H_BED) return RUNAWAY_IND_BED); |
|
|
|