Browse Source

disable steppers as routine in stepper.cpp

Bernhard 13 years ago
parent
commit
4d6a5c29df
3 changed files with 14 additions and 6 deletions
  1. 2
    6
      Marlin/Marlin.pde
  2. 10
    0
      Marlin/stepper.cpp
  3. 2
    0
      Marlin/stepper.h

+ 2
- 6
Marlin/Marlin.pde View File

641
       //processed in write to file routine above
641
       //processed in write to file routine above
642
       //card,saving = false;
642
       //card,saving = false;
643
       break;
643
       break;
644
+      
644
     #endif //SDSUPPORT
645
     #endif //SDSUPPORT
645
 
646
 
646
     case 30: //M30 take time since the start of the SD print or an M109 command
647
     case 30: //M30 take time since the start of the SD print or an M109 command
832
       }
833
       }
833
       else
834
       else
834
       { 
835
       { 
835
-        st_synchronize(); 
836
-        LCD_MESSAGEPGM("Free move.");
837
-        disable_x(); 
838
-        disable_y(); 
839
-        disable_z(); 
840
-        disable_e(); 
836
+        finishAndDisableSteppers();
841
       }
837
       }
842
       break;
838
       break;
843
     case 85: // M85
839
     case 85: // M85

+ 10
- 0
Marlin/stepper.cpp View File

702
   CRITICAL_SECTION_END;
702
   CRITICAL_SECTION_END;
703
   return count_pos;
703
   return count_pos;
704
 }
704
 }
705
+
706
+void finishAndDisableSteppers()
707
+{
708
+  st_synchronize(); 
709
+  LCD_MESSAGEPGM("Released.");
710
+  disable_x(); 
711
+  disable_y(); 
712
+  disable_z(); 
713
+  disable_e(); 
714
+}

+ 2
- 0
Marlin/stepper.h View File

46
 
46
 
47
 void checkStepperErrors(); //Print errors detected by the stepper
47
 void checkStepperErrors(); //Print errors detected by the stepper
48
 
48
 
49
+void finishAndDisableSteppers();
50
+
49
 extern block_t *current_block;  // A pointer to the block currently being traced
51
 extern block_t *current_block;  // A pointer to the block currently being traced
50
 
52
 
51
 
53
 

Loading…
Cancel
Save