Cleanup: remove unused FILAMENT_RUNOUT_SUPPORT define
FILAMENT_RUNOUT_SUPPORT has never been supported in the MK3 branch, and contains a ton of horrible and unmaintained code that doesn't even compile anymore. Since this code is currently polluting a sizable block inside the G0/G1 code block, simply get rid of it.
This commit is contained in:
parent
b3532749ff
commit
1949802bea
@ -4226,9 +4226,6 @@ void process_commands()
|
||||
#endif
|
||||
|
||||
if (!buflen) return; //empty command
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
SET_INPUT(FR_SENS);
|
||||
#endif
|
||||
|
||||
#ifdef CMDBUFFER_DEBUG
|
||||
SERIAL_ECHOPGM("Processing a GCODE command: ");
|
||||
@ -4680,176 +4677,6 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
|
||||
case 0: // G0 -> G1
|
||||
case 1: // G1
|
||||
if(Stopped == false) {
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
if(READ(FR_SENS)){
|
||||
|
||||
int feedmultiplyBckp=feedmultiply;
|
||||
float target[4];
|
||||
float lastpos[4];
|
||||
target[X_AXIS]=current_position[X_AXIS];
|
||||
target[Y_AXIS]=current_position[Y_AXIS];
|
||||
target[Z_AXIS]=current_position[Z_AXIS];
|
||||
target[E_AXIS]=current_position[E_AXIS];
|
||||
lastpos[X_AXIS]=current_position[X_AXIS];
|
||||
lastpos[Y_AXIS]=current_position[Y_AXIS];
|
||||
lastpos[Z_AXIS]=current_position[Z_AXIS];
|
||||
lastpos[E_AXIS]=current_position[E_AXIS];
|
||||
//retract by E
|
||||
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FIRSTRETRACT ;
|
||||
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 400, active_extruder);
|
||||
|
||||
|
||||
target[Z_AXIS]+= FILAMENTCHANGE_ZADD ;
|
||||
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 300, active_extruder);
|
||||
|
||||
target[X_AXIS]= FILAMENTCHANGE_XPOS ;
|
||||
|
||||
target[Y_AXIS]= FILAMENTCHANGE_YPOS ;
|
||||
|
||||
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70, active_extruder);
|
||||
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FINALRETRACT ;
|
||||
|
||||
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20, active_extruder);
|
||||
|
||||
//finish moves
|
||||
st_synchronize();
|
||||
//disable extruder steppers so filament can be removed
|
||||
disable_e0();
|
||||
disable_e1();
|
||||
disable_e2();
|
||||
_delay(100);
|
||||
|
||||
//LCD_ALERTMESSAGEPGM(_T(MSG_FILAMENTCHANGE));
|
||||
uint8_t cnt=0;
|
||||
int counterBeep = 0;
|
||||
lcd_wait_interact();
|
||||
while(!lcd_clicked()){
|
||||
cnt++;
|
||||
manage_heater();
|
||||
manage_inactivity(true);
|
||||
//lcd_update(0);
|
||||
if(cnt==0)
|
||||
{
|
||||
#if BEEPER > 0
|
||||
|
||||
if (counterBeep== 500){
|
||||
counterBeep = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SET_OUTPUT(BEEPER);
|
||||
if (counterBeep== 0){
|
||||
if(eSoundMode!=e_SOUND_MODE_SILENT)
|
||||
WRITE(BEEPER,HIGH);
|
||||
}
|
||||
|
||||
if (counterBeep== 20){
|
||||
WRITE(BEEPER,LOW);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
counterBeep++;
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
WRITE(BEEPER,LOW);
|
||||
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FIRSTFEED ;
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20, active_extruder);
|
||||
|
||||
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
lcd_change_fil_state = 0;
|
||||
lcd_loading_filament();
|
||||
while ((lcd_change_fil_state == 0)||(lcd_change_fil_state != 1)){
|
||||
|
||||
lcd_change_fil_state = 0;
|
||||
lcd_alright();
|
||||
switch(lcd_change_fil_state){
|
||||
|
||||
case 2:
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FIRSTFEED ;
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20, active_extruder);
|
||||
|
||||
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
|
||||
|
||||
|
||||
lcd_loading_filament();
|
||||
break;
|
||||
case 3:
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
|
||||
lcd_loading_color();
|
||||
break;
|
||||
|
||||
default:
|
||||
lcd_change_success();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
target[E_AXIS]+= 5;
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
|
||||
|
||||
target[E_AXIS]+= FILAMENTCHANGE_FIRSTRETRACT;
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 400, active_extruder);
|
||||
|
||||
|
||||
//current_position[E_AXIS]=target[E_AXIS]; //the long retract of L is compensated by manual filament feeding
|
||||
//plan_set_e_position(current_position[E_AXIS]);
|
||||
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70, active_extruder); //should do nothing
|
||||
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70, active_extruder); //move xy back
|
||||
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], 200, active_extruder); //move z back
|
||||
|
||||
|
||||
target[E_AXIS]= target[E_AXIS] - FILAMENTCHANGE_FIRSTRETRACT;
|
||||
|
||||
|
||||
|
||||
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], 5, active_extruder); //final untretract
|
||||
|
||||
|
||||
plan_set_e_position(lastpos[E_AXIS]);
|
||||
|
||||
feedmultiply=feedmultiplyBckp;
|
||||
|
||||
|
||||
|
||||
char cmd[9];
|
||||
|
||||
sprintf_P(cmd, PSTR("M220 S%i"), feedmultiplyBckp);
|
||||
enquecommand(cmd);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
get_coordinates(); // For X Y Z E F
|
||||
|
||||
// When recovering from a previous print move, restore the originally
|
||||
|
@ -264,13 +264,6 @@
|
||||
ADDITIONAL FEATURES SETTINGS
|
||||
*------------------------------------*/
|
||||
|
||||
// Define Prusa filament runout sensor
|
||||
//#define FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SENSOR 1
|
||||
#endif
|
||||
|
||||
// temperature runaway
|
||||
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
|
||||
#define TEMP_RUNAWAY_BED_TIMEOUT 360
|
||||
|
@ -265,13 +265,6 @@
|
||||
ADDITIONAL FEATURES SETTINGS
|
||||
*------------------------------------*/
|
||||
|
||||
// Define Prusa filament runout sensor
|
||||
//#define FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SENSOR 1
|
||||
#endif
|
||||
|
||||
// temperature runaway
|
||||
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
|
||||
#define TEMP_RUNAWAY_BED_TIMEOUT 360
|
||||
|
@ -264,13 +264,6 @@
|
||||
ADDITIONAL FEATURES SETTINGS
|
||||
*------------------------------------*/
|
||||
|
||||
// Define Prusa filament runout sensor
|
||||
//#define FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SENSOR 1
|
||||
#endif
|
||||
|
||||
// temperature runaway
|
||||
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
|
||||
#define TEMP_RUNAWAY_BED_TIMEOUT 360
|
||||
|
@ -265,13 +265,6 @@
|
||||
ADDITIONAL FEATURES SETTINGS
|
||||
*------------------------------------*/
|
||||
|
||||
// Define Prusa filament runout sensor
|
||||
//#define FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SENSOR 1
|
||||
#endif
|
||||
|
||||
// temperature runaway
|
||||
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
|
||||
#define TEMP_RUNAWAY_BED_TIMEOUT 360
|
||||
|
@ -401,13 +401,6 @@
|
||||
ADDITIONAL FEATURES SETTINGS
|
||||
*------------------------------------*/
|
||||
|
||||
// Define Prusa filament runout sensor
|
||||
//#define FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SENSOR 1
|
||||
#endif
|
||||
|
||||
// temperature runaway
|
||||
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
|
||||
#define TEMP_RUNAWAY_BED_TIMEOUT 360
|
||||
|
@ -405,13 +405,6 @@
|
||||
ADDITIONAL FEATURES SETTINGS
|
||||
*------------------------------------*/
|
||||
|
||||
// Define Prusa filament runout sensor
|
||||
//#define FILAMENT_RUNOUT_SUPPORT
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
#define FILAMENT_RUNOUT_SENSOR 1
|
||||
#endif
|
||||
|
||||
// temperature runaway
|
||||
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
|
||||
#define TEMP_RUNAWAY_BED_TIMEOUT 360
|
||||
|
Loading…
Reference in New Issue
Block a user