chiark / gitweb /
added a partial release option to "m84" aka "stepper release". If you do tiny layers...
authorBernhard <bkubicek@x201.(none)>
Fri, 9 Dec 2011 11:51:08 +0000 (12:51 +0100)
committerBernhard <bkubicek@x201.(none)>
Fri, 9 Dec 2011 11:51:08 +0000 (12:51 +0100)
Marlin/Configuration.h
Marlin/Marlin.pde
Marlin/cardreader.pde

index e8b960f788843264afdb34289bfd4e7178d6fa24..febc3bcca6fcf8c46ef21adb3d9eb74b0f9ff172 100644 (file)
@@ -292,6 +292,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
 //#define ULTRA_LCD  //general lcd support, also 16x2
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
+#define SD_FINISHED_RELEASECOMMAND "M84 X Y E" // no z because of layer shift.
 
 //#define ULTIPANEL
 #ifdef ULTIPANEL
index ac42c15846c2bc0158e3d4a22d628223821bcffe..f3182a7d05cf8023eee5b066d7247b009efe975c 100644 (file)
@@ -903,18 +903,22 @@ FORCE_INLINE void process_commands()
       }
       else
       { 
-        #if ((E_ENABLE_PIN != X_ENABLE_PIN) && (E_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
-        if(code_seen('E')) {
-          st_synchronize();
-          LCD_MESSAGEPGM("Free Move");
-          disable_e();
-        }
-        else {
+        bool all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))|| (code_seen(axis_codes[3])));
+        if(all_axis)
+        {
           finishAndDisableSteppers();
         }
-        #else
-          finishAndDisableSteppers();
-        #endif
+        else
+        {
+          st_synchronize();
+          if(code_seen('X')) disable_x();
+          if(code_seen('Y')) disable_y();
+          if(code_seen('Z')) disable_z();
+          #if ((E_ENABLE_PIN != X_ENABLE_PIN) && (E_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
+            if(code_seen('E')) disable_e();
+          #endif 
+          LCD_MESSAGEPGM("Partial Release");
+        }
       }
       break;
     case 85: // M85
index 8355f6aedae61ccdde5d1ab68d19f41a58816c66..6ad04068e4559972230751023c0defaf63b10cba 100644 (file)
@@ -436,7 +436,7 @@ void CardReader::printingHasFinished()
  if(SD_FINISHED_STEPPERRELEASE)
  {
    //finishAndDisableSteppers();
-   enquecommand("M84");
+   enquecommand(SD_FINISHED_RELEASECOMMAND);
  }
  autotempShutdown();
 }