Selaa lähdekoodia

added a partial release option to "m84" aka "stepper release". If you do tiny layers, you might want to keep the z-axis powered to not loose height positioning after homeing.

Bernhard 13 vuotta sitten
vanhempi
commit
5b4625f79c
3 muutettua tiedostoa jossa 16 lisäystä ja 11 poistoa
  1. 1
    0
      Marlin/Configuration.h
  2. 14
    10
      Marlin/Marlin.pde
  3. 1
    1
      Marlin/cardreader.pde

+ 1
- 0
Marlin/Configuration.h Näytä tiedosto

@@ -292,6 +292,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
292 292
 //#define ULTRA_LCD  //general lcd support, also 16x2
293 293
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
294 294
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
295
+#define SD_FINISHED_RELEASECOMMAND "M84 X Y E" // no z because of layer shift.
295 296
 
296 297
 //#define ULTIPANEL
297 298
 #ifdef ULTIPANEL

+ 14
- 10
Marlin/Marlin.pde Näytä tiedosto

@@ -903,18 +903,22 @@ FORCE_INLINE void process_commands()
903 903
       }
904 904
       else
905 905
       { 
906
-        #if ((E_ENABLE_PIN != X_ENABLE_PIN) && (E_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
907
-        if(code_seen('E')) {
908
-          st_synchronize();
909
-          LCD_MESSAGEPGM("Free Move");
910
-          disable_e();
911
-        }
912
-        else {
906
+        bool all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))|| (code_seen(axis_codes[3])));
907
+        if(all_axis)
908
+        {
913 909
           finishAndDisableSteppers();
914 910
         }
915
-        #else
916
-          finishAndDisableSteppers();
917
-        #endif
911
+        else
912
+        {
913
+          st_synchronize();
914
+          if(code_seen('X')) disable_x();
915
+          if(code_seen('Y')) disable_y();
916
+          if(code_seen('Z')) disable_z();
917
+          #if ((E_ENABLE_PIN != X_ENABLE_PIN) && (E_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
918
+            if(code_seen('E')) disable_e();
919
+          #endif 
920
+          LCD_MESSAGEPGM("Partial Release");
921
+        }
918 922
       }
919 923
       break;
920 924
     case 85: // M85

+ 1
- 1
Marlin/cardreader.pde Näytä tiedosto

@@ -436,7 +436,7 @@ void CardReader::printingHasFinished()
436 436
  if(SD_FINISHED_STEPPERRELEASE)
437 437
  {
438 438
    //finishAndDisableSteppers();
439
-   enquecommand("M84");
439
+   enquecommand(SD_FINISHED_RELEASECOMMAND);
440 440
  }
441 441
  autotempShutdown();
442 442
 }

Loading…
Peruuta
Tallenna