Browse Source

Made a more granular configuration possible PREVENT_LENGTHY_EXTRUDE. You can now decide to allow/disallow large length of extrusions to be executed.

Turning off the protection might be beneficial to those who want to do fast and long reversals.
Erik de Bruijn 13 years ago
parent
commit
e3fe1f0d00
2 changed files with 5 additions and 0 deletions
  1. 3
    0
      Marlin/Configuration.h
  2. 2
    0
      Marlin/planner.cpp

+ 3
- 0
Marlin/Configuration.h View File

108
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
108
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
109
 //can be software-disabled for whatever purposes by
109
 //can be software-disabled for whatever purposes by
110
 #define PREVENT_DANGEROUS_EXTRUDE
110
 #define PREVENT_DANGEROUS_EXTRUDE
111
+//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
112
+#define PREVENT_LENGTHY_EXTRUDE
113
+
111
 #define EXTRUDE_MINTEMP 170
114
 #define EXTRUDE_MINTEMP 170
112
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
115
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
113
 
116
 

+ 2
- 0
Marlin/planner.cpp View File

495
       SERIAL_ECHO_START;
495
       SERIAL_ECHO_START;
496
       SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
496
       SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
497
     }
497
     }
498
+    #ifdef PREVENT_LENGTHY_EXTRUDE
498
     if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH)
499
     if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH)
499
     {
500
     {
500
       position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
501
       position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
501
       SERIAL_ECHO_START;
502
       SERIAL_ECHO_START;
502
       SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
503
       SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
503
     }
504
     }
505
+    #endif
504
   #endif
506
   #endif
505
   
507
   
506
   // Prepare to set up new block
508
   // Prepare to set up new block

Loading…
Cancel
Save