diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 6317852df..342ee9756 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -3544,6 +3544,12 @@ void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex){ if (!farm_mode && (eFilamentAction != FilamentAction::None)) { lcd_load_filament_color_check(); } + + #ifdef COMMUNITY_PREVENT_OOZE + // Retract filament to prevent oozing + retract_for_ooze_prevention(); + #endif //COMMUNITY_PREVENT_OOZE + lcd_update_enable(true); lcd_update(2); lcd_setstatuspgm(MSG_WELCOME); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index f042dca01..781fa1db9 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -5603,6 +5603,17 @@ static void lcd_sd_updir() menu_data_reset(); //Forces reloading of cached variables. } +#ifdef COMMUNITY_PREVENT_OOZE +/// @brief Retract filament to prevent oozing +void retract_for_ooze_prevention() { + current_position[E_AXIS] += FILAMENTCHANGE_COMMUNITY_ROOZEFEED; + plan_buffer_line_curposXYZE(FILAMENTCHANGE_RFEED); + current_position[E_AXIS] += FILAMENTCHANGE_COMMUNITY_EOOZEFEED; + plan_buffer_line_curposXYZE(FILAMENTCHANGE_EFEED_FIRST); + st_synchronize(); +} +#endif //COMMUNITY_PREVENT_OOZE + // continue stopping the print from the main loop after lcd_print_stop() is called void lcd_print_stop_finish() { @@ -5619,6 +5630,11 @@ void lcd_print_stop_finish() } st_synchronize(); + #ifdef COMMUNITY_PREVENT_OOZE + // Retract filament to prevent oozing + retract_for_ooze_prevention(); + #endif //COMMUNITY_PREVENT_OOZE + // did we come here from a thermal error? if(get_temp_error()) { // time to stop the error beep diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 2ff77e2cb..afb4ace77 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -254,4 +254,8 @@ extern void lcd_pinda_temp_compensation_toggle(); extern void lcd_heat_bed_on_load_toggle(); +#ifdef COMMUNITY_PREVENT_OOZE +extern void retract_for_ooze_prevention(); +#endif //COMMUNITY_PREVENT_OOZE + #endif //ULTRALCD_H diff --git a/Firmware/variants/MK25-RAMBo10a.h b/Firmware/variants/MK25-RAMBo10a.h index 7ff78d2d4..943b965c3 100644 --- a/Firmware/variants/MK25-RAMBo10a.h +++ b/Firmware/variants/MK25-RAMBo10a.h @@ -233,6 +233,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK25-RAMBo13a.h b/Firmware/variants/MK25-RAMBo13a.h index c0ef8b558..35bfe89a0 100644 --- a/Firmware/variants/MK25-RAMBo13a.h +++ b/Firmware/variants/MK25-RAMBo13a.h @@ -234,6 +234,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK25S-RAMBo10a.h b/Firmware/variants/MK25S-RAMBo10a.h index 293930f7b..94946ca45 100644 --- a/Firmware/variants/MK25S-RAMBo10a.h +++ b/Firmware/variants/MK25S-RAMBo10a.h @@ -233,6 +233,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK25S-RAMBo13a.h b/Firmware/variants/MK25S-RAMBo13a.h index 705a5d1dc..b09588508 100644 --- a/Firmware/variants/MK25S-RAMBo13a.h +++ b/Firmware/variants/MK25S-RAMBo13a.h @@ -234,6 +234,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK3-E3DREVO.h b/Firmware/variants/MK3-E3DREVO.h index 6c1cdee78..46237f1b8 100644 --- a/Firmware/variants/MK3-E3DREVO.h +++ b/Firmware/variants/MK3-E3DREVO.h @@ -367,6 +367,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK3-E3DREVO_HF_60W.h b/Firmware/variants/MK3-E3DREVO_HF_60W.h index c8fbf6886..81cca3934 100644 --- a/Firmware/variants/MK3-E3DREVO_HF_60W.h +++ b/Firmware/variants/MK3-E3DREVO_HF_60W.h @@ -368,6 +368,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK3.h b/Firmware/variants/MK3.h index 6f91daaad..393bff59f 100644 --- a/Firmware/variants/MK3.h +++ b/Firmware/variants/MK3.h @@ -370,6 +370,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK3S-E3DREVO.h b/Firmware/variants/MK3S-E3DREVO.h index 4b6f5112c..91f79408c 100644 --- a/Firmware/variants/MK3S-E3DREVO.h +++ b/Firmware/variants/MK3S-E3DREVO.h @@ -371,6 +371,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK3S-E3DREVO_HF_60W.h b/Firmware/variants/MK3S-E3DREVO_HF_60W.h index 23aa69f90..7437c281d 100644 --- a/Firmware/variants/MK3S-E3DREVO_HF_60W.h +++ b/Firmware/variants/MK3S-E3DREVO_HF_60W.h @@ -372,6 +372,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/MK3S.h b/Firmware/variants/MK3S.h index 43fef35f7..4ebf2ea2e 100644 --- a/Firmware/variants/MK3S.h +++ b/Firmware/variants/MK3S.h @@ -374,6 +374,15 @@ #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/obsolete/1_75mm_MK2-RAMBo10a-E3Dv6full.h b/Firmware/variants/obsolete/1_75mm_MK2-RAMBo10a-E3Dv6full.h index 52129c065..928021809 100644 --- a/Firmware/variants/obsolete/1_75mm_MK2-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/obsolete/1_75mm_MK2-RAMBo10a-E3Dv6full.h @@ -162,6 +162,15 @@ CHANGE FILAMENT SETTINGS #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------ diff --git a/Firmware/variants/obsolete/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/obsolete/1_75mm_MK2-RAMBo13a-E3Dv6full.h index efc1c48dd..94ca7304a 100644 --- a/Firmware/variants/obsolete/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/obsolete/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -161,6 +161,15 @@ CHANGE FILAMENT SETTINGS #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 +//Retract and then extrude some filament to prevent oozing. +//After the loading sequence and after a print is canceled, the filament is retracted to get it out of the heat zone of the nozzle. +//Then a small extrusion is performed to make sure the filament is close enough for the next print without oozing. +//#define COMMUNITY_PREVENT_OOZE +#ifdef COMMUNITY_PREVENT_OOZE +#define FILAMENTCHANGE_COMMUNITY_ROOZEFEED -10 //E retract distance in mm for ooze prevention +#define FILAMENTCHANGE_COMMUNITY_EOOZEFEED 4 //E extrude distance in mm for ooze prevention +#endif //End COMMUNITY_PREVENT_OOZE + #endif /*------------------------------------