|
@ -402,10 +402,18 @@ class Temperature { |
|
|
static uint8_t soft_pwm_controller_speed; |
|
|
static uint8_t soft_pwm_controller_speed; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if BOTH(HAS_MARLINUI_MENU, PREVENT_COLD_EXTRUSION) && E_MANUAL > 0 |
|
|
|
|
|
static bool allow_cold_extrude_override; |
|
|
|
|
|
static void set_menu_cold_override(const bool allow) { allow_cold_extrude_override = allow; } |
|
|
|
|
|
#else |
|
|
|
|
|
static constexpr bool allow_cold_extrude_override = false; |
|
|
|
|
|
static void set_menu_cold_override(const bool) {} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(PREVENT_COLD_EXTRUSION) |
|
|
#if ENABLED(PREVENT_COLD_EXTRUSION) |
|
|
static bool allow_cold_extrude; |
|
|
static bool allow_cold_extrude; |
|
|
static celsius_t extrude_min_temp; |
|
|
static celsius_t extrude_min_temp; |
|
|
static bool tooCold(const celsius_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp - (TEMP_WINDOW); } |
|
|
static bool tooCold(const celsius_t temp) { return !allow_cold_extrude && !allow_cold_extrude_override && temp < extrude_min_temp - (TEMP_WINDOW); } |
|
|
static bool tooColdToExtrude(const uint8_t E_NAME) { return tooCold(wholeDegHotend(HOTEND_INDEX)); } |
|
|
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)); } |
|
|
static bool targetTooColdToExtrude(const uint8_t E_NAME) { return tooCold(degTargetHotend(HOTEND_INDEX)); } |
|
|
#else |
|
|
#else |
|
|