Skip to content

Commit 1949802

Browse files
committed
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.
1 parent b353274 commit 1949802

7 files changed

+0
-215
lines changed

Firmware/Marlin_main.cpp

-173
Original file line numberDiff line numberDiff line change
@@ -4226,9 +4226,6 @@ void process_commands()
42264226
#endif
42274227

42284228
if (!buflen) return; //empty command
4229-
#ifdef FILAMENT_RUNOUT_SUPPORT
4230-
SET_INPUT(FR_SENS);
4231-
#endif
42324229

42334230
#ifdef CMDBUFFER_DEBUG
42344231
SERIAL_ECHOPGM("Processing a GCODE command: ");
@@ -4680,176 +4677,6 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
46804677
case 0: // G0 -> G1
46814678
case 1: // G1
46824679
if(Stopped == false) {
4683-
4684-
#ifdef FILAMENT_RUNOUT_SUPPORT
4685-
4686-
if(READ(FR_SENS)){
4687-
4688-
int feedmultiplyBckp=feedmultiply;
4689-
float target[4];
4690-
float lastpos[4];
4691-
target[X_AXIS]=current_position[X_AXIS];
4692-
target[Y_AXIS]=current_position[Y_AXIS];
4693-
target[Z_AXIS]=current_position[Z_AXIS];
4694-
target[E_AXIS]=current_position[E_AXIS];
4695-
lastpos[X_AXIS]=current_position[X_AXIS];
4696-
lastpos[Y_AXIS]=current_position[Y_AXIS];
4697-
lastpos[Z_AXIS]=current_position[Z_AXIS];
4698-
lastpos[E_AXIS]=current_position[E_AXIS];
4699-
//retract by E
4700-
4701-
target[E_AXIS]+= FILAMENTCHANGE_FIRSTRETRACT ;
4702-
4703-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 400, active_extruder);
4704-
4705-
4706-
target[Z_AXIS]+= FILAMENTCHANGE_ZADD ;
4707-
4708-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 300, active_extruder);
4709-
4710-
target[X_AXIS]= FILAMENTCHANGE_XPOS ;
4711-
4712-
target[Y_AXIS]= FILAMENTCHANGE_YPOS ;
4713-
4714-
4715-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70, active_extruder);
4716-
4717-
target[E_AXIS]+= FILAMENTCHANGE_FINALRETRACT ;
4718-
4719-
4720-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20, active_extruder);
4721-
4722-
//finish moves
4723-
st_synchronize();
4724-
//disable extruder steppers so filament can be removed
4725-
disable_e0();
4726-
disable_e1();
4727-
disable_e2();
4728-
_delay(100);
4729-
4730-
//LCD_ALERTMESSAGEPGM(_T(MSG_FILAMENTCHANGE));
4731-
uint8_t cnt=0;
4732-
int counterBeep = 0;
4733-
lcd_wait_interact();
4734-
while(!lcd_clicked()){
4735-
cnt++;
4736-
manage_heater();
4737-
manage_inactivity(true);
4738-
//lcd_update(0);
4739-
if(cnt==0)
4740-
{
4741-
#if BEEPER > 0
4742-
4743-
if (counterBeep== 500){
4744-
counterBeep = 0;
4745-
4746-
}
4747-
4748-
4749-
SET_OUTPUT(BEEPER);
4750-
if (counterBeep== 0){
4751-
if(eSoundMode!=e_SOUND_MODE_SILENT)
4752-
WRITE(BEEPER,HIGH);
4753-
}
4754-
4755-
if (counterBeep== 20){
4756-
WRITE(BEEPER,LOW);
4757-
}
4758-
4759-
4760-
4761-
4762-
counterBeep++;
4763-
#else
4764-
#endif
4765-
}
4766-
}
4767-
4768-
WRITE(BEEPER,LOW);
4769-
4770-
target[E_AXIS]+= FILAMENTCHANGE_FIRSTFEED ;
4771-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20, active_extruder);
4772-
4773-
4774-
target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
4775-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
4776-
4777-
4778-
4779-
4780-
4781-
lcd_change_fil_state = 0;
4782-
lcd_loading_filament();
4783-
while ((lcd_change_fil_state == 0)||(lcd_change_fil_state != 1)){
4784-
4785-
lcd_change_fil_state = 0;
4786-
lcd_alright();
4787-
switch(lcd_change_fil_state){
4788-
4789-
case 2:
4790-
target[E_AXIS]+= FILAMENTCHANGE_FIRSTFEED ;
4791-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20, active_extruder);
4792-
4793-
4794-
target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
4795-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
4796-
4797-
4798-
lcd_loading_filament();
4799-
break;
4800-
case 3:
4801-
target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
4802-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
4803-
lcd_loading_color();
4804-
break;
4805-
4806-
default:
4807-
lcd_change_success();
4808-
break;
4809-
}
4810-
4811-
}
4812-
4813-
4814-
4815-
target[E_AXIS]+= 5;
4816-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2, active_extruder);
4817-
4818-
target[E_AXIS]+= FILAMENTCHANGE_FIRSTRETRACT;
4819-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 400, active_extruder);
4820-
4821-
4822-
//current_position[E_AXIS]=target[E_AXIS]; //the long retract of L is compensated by manual filament feeding
4823-
//plan_set_e_position(current_position[E_AXIS]);
4824-
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70, active_extruder); //should do nothing
4825-
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70, active_extruder); //move xy back
4826-
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], 200, active_extruder); //move z back
4827-
4828-
4829-
target[E_AXIS]= target[E_AXIS] - FILAMENTCHANGE_FIRSTRETRACT;
4830-
4831-
4832-
4833-
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], 5, active_extruder); //final untretract
4834-
4835-
4836-
plan_set_e_position(lastpos[E_AXIS]);
4837-
4838-
feedmultiply=feedmultiplyBckp;
4839-
4840-
4841-
4842-
char cmd[9];
4843-
4844-
sprintf_P(cmd, PSTR("M220 S%i"), feedmultiplyBckp);
4845-
enquecommand(cmd);
4846-
4847-
}
4848-
4849-
4850-
4851-
#endif
4852-
48534680
get_coordinates(); // For X Y Z E F
48544681

48554682
// When recovering from a previous print move, restore the originally

Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h

-7
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,6 @@
264264
ADDITIONAL FEATURES SETTINGS
265265
*------------------------------------*/
266266

267-
// Define Prusa filament runout sensor
268-
//#define FILAMENT_RUNOUT_SUPPORT
269-
270-
#ifdef FILAMENT_RUNOUT_SUPPORT
271-
#define FILAMENT_RUNOUT_SENSOR 1
272-
#endif
273-
274267
// temperature runaway
275268
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
276269
#define TEMP_RUNAWAY_BED_TIMEOUT 360

Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h

-7
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,6 @@
265265
ADDITIONAL FEATURES SETTINGS
266266
*------------------------------------*/
267267

268-
// Define Prusa filament runout sensor
269-
//#define FILAMENT_RUNOUT_SUPPORT
270-
271-
#ifdef FILAMENT_RUNOUT_SUPPORT
272-
#define FILAMENT_RUNOUT_SENSOR 1
273-
#endif
274-
275268
// temperature runaway
276269
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
277270
#define TEMP_RUNAWAY_BED_TIMEOUT 360

Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h

-7
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,6 @@
264264
ADDITIONAL FEATURES SETTINGS
265265
*------------------------------------*/
266266

267-
// Define Prusa filament runout sensor
268-
//#define FILAMENT_RUNOUT_SUPPORT
269-
270-
#ifdef FILAMENT_RUNOUT_SUPPORT
271-
#define FILAMENT_RUNOUT_SENSOR 1
272-
#endif
273-
274267
// temperature runaway
275268
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
276269
#define TEMP_RUNAWAY_BED_TIMEOUT 360

Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h

-7
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,6 @@
265265
ADDITIONAL FEATURES SETTINGS
266266
*------------------------------------*/
267267

268-
// Define Prusa filament runout sensor
269-
//#define FILAMENT_RUNOUT_SUPPORT
270-
271-
#ifdef FILAMENT_RUNOUT_SUPPORT
272-
#define FILAMENT_RUNOUT_SENSOR 1
273-
#endif
274-
275268
// temperature runaway
276269
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
277270
#define TEMP_RUNAWAY_BED_TIMEOUT 360

Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h

-7
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,6 @@
401401
ADDITIONAL FEATURES SETTINGS
402402
*------------------------------------*/
403403

404-
// Define Prusa filament runout sensor
405-
//#define FILAMENT_RUNOUT_SUPPORT
406-
407-
#ifdef FILAMENT_RUNOUT_SUPPORT
408-
#define FILAMENT_RUNOUT_SENSOR 1
409-
#endif
410-
411404
// temperature runaway
412405
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
413406
#define TEMP_RUNAWAY_BED_TIMEOUT 360

Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h

-7
Original file line numberDiff line numberDiff line change
@@ -405,13 +405,6 @@
405405
ADDITIONAL FEATURES SETTINGS
406406
*------------------------------------*/
407407

408-
// Define Prusa filament runout sensor
409-
//#define FILAMENT_RUNOUT_SUPPORT
410-
411-
#ifdef FILAMENT_RUNOUT_SUPPORT
412-
#define FILAMENT_RUNOUT_SENSOR 1
413-
#endif
414-
415408
// temperature runaway
416409
#define TEMP_RUNAWAY_BED_HYSTERESIS 5
417410
#define TEMP_RUNAWAY_BED_TIMEOUT 360

0 commit comments

Comments
 (0)