Browse Source

Merge bPR #1882

pull/1/head
Richard Wackerbarth 10 years ago
parent
commit
5239a4e839
  1. 3
      Marlin/Configuration_adv.h
  2. 11
      Marlin/Marlin_main.cpp

3
Marlin/Configuration_adv.h

@ -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

11
Marlin/Marlin_main.cpp

@ -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()) {
#ifndef AUTO_FILAMENT_CHANGE
if (++cnt == 0) lcd_quick_feedback(); // every 256th frame till the lcd is clicked if (++cnt == 0) lcd_quick_feedback(); // every 256th frame till the lcd is clicked
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
lcd_update(); 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

Loading…
Cancel
Save