chiark / gitweb /
disable steppers as routine in stepper.cpp
authorBernhard <bkubicek@x201.(none)>
Sat, 26 Nov 2011 10:50:23 +0000 (11:50 +0100)
committerBernhard <bkubicek@x201.(none)>
Sat, 26 Nov 2011 10:50:23 +0000 (11:50 +0100)
Marlin/Marlin.pde
Marlin/stepper.cpp
Marlin/stepper.h

index 60ec2b22e5472d6eb441f2f12065beb12849aa11..d94f810c1dbd11e7bea2c322738cb46241ce0865 100644 (file)
@@ -641,6 +641,7 @@ inline void process_commands()
       //processed in write to file routine above
       //card,saving = false;
       break;
+      
     #endif //SDSUPPORT
 
     case 30: //M30 take time since the start of the SD print or an M109 command
@@ -832,12 +833,7 @@ inline void process_commands()
       }
       else
       { 
-        st_synchronize(); 
-        LCD_MESSAGEPGM("Free move.");
-        disable_x(); 
-        disable_y(); 
-        disable_z(); 
-        disable_e(); 
+        finishAndDisableSteppers();
       }
       break;
     case 85: // M85
index 0c3f0ee1bd4fef76c9b170256c5be82c2f354e89..491b6e7f2b82c7fdd8c144dfd37e94e35c400cfc 100644 (file)
@@ -702,3 +702,13 @@ long st_get_position(char axis)
   CRITICAL_SECTION_END;
   return count_pos;
 }
+
+void finishAndDisableSteppers()
+{
+  st_synchronize(); 
+  LCD_MESSAGEPGM("Released.");
+  disable_x(); 
+  disable_y(); 
+  disable_z(); 
+  disable_e(); 
+}
index 97f72bf2ed93bf6dbaff35849665fd6dcceb2aea..73b7efb1cd21f943d2002bff349a24bf6446463f 100644 (file)
@@ -46,6 +46,8 @@ void endstops_hit_on_purpose(); //avoid creation of the message, i.e. after home
 
 void checkStepperErrors(); //Print errors detected by the stepper
 
+void finishAndDisableSteppers();
+
 extern block_t *current_block;  // A pointer to the block currently being traced