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,6 +108,9 @@
108 108
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
109 109
 //can be software-disabled for whatever purposes by
110 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 114
 #define EXTRUDE_MINTEMP 170
112 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,12 +495,14 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
495 495
       SERIAL_ECHO_START;
496 496
       SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
497 497
     }
498
+    #ifdef PREVENT_LENGTHY_EXTRUDE
498 499
     if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH)
499 500
     {
500 501
       position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
501 502
       SERIAL_ECHO_START;
502 503
       SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
503 504
     }
505
+    #endif
504 506
   #endif
505 507
   
506 508
   // Prepare to set up new block

Loading…
Cancel
Save