This commit is contained in:
Richard Wackerbarth 2015-06-06 19:47:07 -05:00
commit 5239a4e839
2 changed files with 18 additions and 4 deletions

View File

@ -446,6 +446,9 @@ const unsigned int dropsegments=5; //everything with less than this number of st
#define FILAMENTCHANGE_ZADD 10 #define FILAMENTCHANGE_ZADD 10
#define FILAMENTCHANGE_FIRSTRETRACT -2 #define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -100 #define FILAMENTCHANGE_FINALRETRACT -100
#define AUTO_FILAMENT_CHANGE //This extrude filament until you press the button on LCD
#define AUTO_FILAMENT_CHANGE_LENGTH 0.04 //Extrusion length on automatic extrusion loop
#define AUTO_FILAMENT_CHANGE_FEEDRATE 300 //Extrusion feedrate (mm/min) on automatic extrusion loop
#endif #endif
#endif #endif

View File

@ -4958,12 +4958,23 @@ inline void gcode_M503() {
LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE); LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE);
uint8_t cnt = 0; uint8_t cnt = 0;
while (!lcd_clicked()) { while (!lcd_clicked()) {
if (++cnt == 0) lcd_quick_feedback(); // every 256th frame till the lcd is clicked #ifndef AUTO_FILAMENT_CHANGE
manage_heater(); if (++cnt == 0) lcd_quick_feedback(); // every 256th frame till the lcd is clicked
manage_inactivity(true); manage_heater();
lcd_update(); manage_inactivity(true);
lcd_update();
#else
current_position[E_AXIS] += AUTO_FILAMENT_CHANGE_LENGTH;
plan_buffer_line(target[X_AXIS],target[Y_AXIS],target[Z_MAX_ENDSTOP_INVERTING],current_position[E_AXIS],AUTO_FILAMENT_CHANGE_FEEDRATE/60,active_extruder);
st_synchronize();
#endif
} // while(!lcd_clicked) } // while(!lcd_clicked)
#ifdef AUTO_FILAMENT_CHANGE
current_position[E_AXIS]= 0;
st_synchronize();
#endif
//return to normal //return to normal
if (code_seen('L')) target[E_AXIS] -= code_value(); if (code_seen('L')) target[E_AXIS] -= code_value();
#ifdef FILAMENTCHANGE_FINALRETRACT #ifdef FILAMENTCHANGE_FINALRETRACT