chiark / gitweb /
Made a more granular configuration possible PREVENT_LENGTHY_EXTRUDE. You can now...
authorErik de Bruijn <github@erikdebruijn.nl>
Tue, 8 May 2012 15:27:45 +0000 (17:27 +0200)
committerErik de Bruijn <github@erikdebruijn.nl>
Tue, 8 May 2012 15:44:08 +0000 (17:44 +0200)
Turning off the protection might be beneficial to those who want to do fast and long reversals.

Marlin/Configuration.h
Marlin/planner.cpp

index f15876770eb702f6440b954a7b608537a9f391e7..880d48a7d24a8560d37ab9be666c7078f90513bf 100644 (file)
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
 //can be software-disabled for whatever purposes by
 #define PREVENT_DANGEROUS_EXTRUDE
+//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
+#define PREVENT_LENGTHY_EXTRUDE
+
 #define EXTRUDE_MINTEMP 170
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
 
index cfb503deb8138d08e57790250973c9d1a2f5a53d..b620589533f9abb86ed4e9113dd8199842cea1d3 100644 (file)
@@ -495,12 +495,14 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
       SERIAL_ECHO_START;
       SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
     }
+    #ifdef PREVENT_LENGTHY_EXTRUDE
     if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH)
     {
       position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
       SERIAL_ECHO_START;
       SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
     }
+    #endif
   #endif
   
   // Prepare to set up new block