From 6118d41baa6b7d2ef8816c0a695212b58a129143 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sun, 14 Feb 2021 14:13:41 -0500 Subject: [PATCH] Tweak probe preheat to wait for cooldown, bypass block on unload prime --- Marlin/Configuration.h | 2 +- Marlin/Configuration_adv.h | 4 ++-- .../lib/dgus_creality/creality_touch/EstepsHandler.cpp | 6 +++--- .../extui/lib/dgus_creality/creality_touch/PIDHandler.cpp | 2 +- Marlin/src/module/probe.cpp | 4 ++-- Marlin/src/module/temperature.cpp | 6 +++--- Marlin/src/module/temperature.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 49d31a55ab..953c57508f 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -128,7 +128,7 @@ // Choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_CREALITY_V452 + #define MOTHERBOARD BOARD_CREALITY_V453 #endif // Name displayed in the LCD "Ready" message and Info menu diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index fa41530431..92a264014b 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2181,7 +2181,7 @@ // For direct drive, the full length of the nozzle. //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. - #define ADVANCED_PAUSE_PURGE_LENGTH 0 // (mm) Length to extrude after loading. + #define ADVANCED_PAUSE_PURGE_LENGTH 2 // (mm) Length to extrude after loading. // Set to 0 for manual extrusion. // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. @@ -2189,7 +2189,7 @@ //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: - #define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_PURGE_RETRACT 3 // (mm) Unload initial retract length. #define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract. #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. #define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload diff --git a/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/EstepsHandler.cpp b/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/EstepsHandler.cpp index a32d23c92b..c9e4fd6d31 100644 --- a/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/EstepsHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/EstepsHandler.cpp @@ -44,7 +44,7 @@ void EstepsHandler::Init() { void EstepsHandler::HandleStartButton(DGUS_VP_Variable &var, void *val_ptr) { - static_assert(ADVANCED_PAUSE_PURGE_LENGTH == 0, "Assuming PURGE_LENGTH is 0 so we can use M701"); + //static_assert(ADVANCED_PAUSE_PURGE_LENGTH == 0, "Assuming PURGE_LENGTH is 0 so we can use M701"); // Validate if (calibration_temperature < EXTRUDE_MINTEMP) { @@ -81,7 +81,7 @@ void EstepsHandler::HandleStartButton(DGUS_VP_Variable &var, void *val_ptr) { } planner.synchronize(); - + // Set-up command SetStatusMessage(PSTR("Extruding...")); @@ -119,7 +119,7 @@ void EstepsHandler::HandleApplyButton(DGUS_VP_Variable &var, void *val_ptr) { settings.save(); ScreenHandler.Buzzer(0, 250); - + ScreenHandler.PopToOldScreen(); ScreenHandler.GotoScreen(DGUSLCD_SCREEN_MAIN, false); diff --git a/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PIDHandler.cpp b/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PIDHandler.cpp index 2ed4077a9d..665805fa12 100644 --- a/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PIDHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus_creality/creality_touch/PIDHandler.cpp @@ -35,7 +35,7 @@ void PIDHandler::Init() { void PIDHandler::HandleStartButton(DGUS_VP_Variable &var, void *val_ptr) { - static_assert(ADVANCED_PAUSE_PURGE_LENGTH == 0, "Assuming PURGE_LENGTH is 0 so we can use M701"); + //static_assert(ADVANCED_PAUSE_PURGE_LENGTH == 0, "Assuming PURGE_LENGTH is 0 so we can use M701"); // Validate if (calibration_temperature < EXTRUDE_MINTEMP) { diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 8cda039db6..917b99b0c4 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -380,8 +380,8 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { DEBUG_EOL(); - TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotend_temp > thermalManager.degHotend(0) + (TEMP_WINDOW)) thermalManager.wait_for_hotend(0)); - TERN_(WAIT_FOR_BED_HEAT, if (bed_temp > thermalManager.degBed() + (TEMP_BED_WINDOW)) thermalManager.wait_for_bed_heating()); + TERN_(WAIT_FOR_NOZZLE_HEAT, if (!WITHIN(thermalManager.degHotend(0), (thermalManager.degTargetHotend(0) - TEMP_HYSTERESIS), (thermalManager.degTargetHotend(0) + TEMP_HYSTERESIS))) thermalManager.wait_for_hotend(0, false)); + TERN_(WAIT_FOR_BED_HEAT, if (!WITHIN(thermalManager.degBed(), (thermalManager.degTargetBed() - TEMP_BED_HYSTERESIS), (thermalManager.degTargetBed() + TEMP_BED_HYSTERESIS))) thermalManager.wait_for_bed_heating(false)); } #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 7c610ea4cc..f825346ac0 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -3526,11 +3526,11 @@ void Temperature::tick() { return false; } - void Temperature::wait_for_bed_heating() { - if (isHeatingBed()) { + void Temperature::wait_for_bed_heating(const bool no_wait_for_cooling/*=true*/) { + if (isHeatingBed() || !no_wait_for_cooling ) { SERIAL_ECHOLNPGM("Wait for bed heating..."); LCD_MESSAGEPGM(MSG_BED_HEATING); - wait_for_bed(); + wait_for_bed(no_wait_for_cooling); ui.reset_status(); } } diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 75da232874..85e015742a 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -672,7 +672,7 @@ class Temperature { #endif ); - static void wait_for_bed_heating(); + static void wait_for_bed_heating(const bool no_wait_for_cooling=true); FORCE_INLINE static bool degBedNear(const float &temp) { return ABS(degBed() - temp) < (TEMP_BED_HYSTERESIS);