Browse Source

Clear up ordering in G30

Scott Lahteine 8 years ago
parent
commit
04e88d008e
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      Marlin/Marlin_main.cpp

+ 5
- 3
Marlin/Marlin_main.cpp View File

@@ -3839,11 +3839,13 @@ inline void gcode_G28() {
3839 3839
    * G30: Do a single Z probe at the current XY
3840 3840
    */
3841 3841
   inline void gcode_G30() {
3842
+
3843
+    setup_for_endstop_move();
3844
+
3842 3845
     deploy_z_probe();
3843 3846
 
3844 3847
     stepper.synchronize();
3845 3848
     // TODO: clear the leveling matrix or the planner will be set incorrectly
3846
-    setup_for_endstop_move(); // Too late. Must be done before deploying.
3847 3849
 
3848 3850
     run_z_probe();
3849 3851
 
@@ -3855,10 +3857,10 @@ inline void gcode_G28() {
3855 3857
     SERIAL_PROTOCOL(current_position[Z_AXIS] + 0.0001);
3856 3858
     SERIAL_EOL;
3857 3859
 
3858
-    clean_up_after_endstop_move(); // Too early. must be done after the stowing.
3859
-
3860 3860
     stow_z_probe();
3861 3861
 
3862
+    clean_up_after_endstop_move();
3863
+
3862 3864
     report_current_position();
3863 3865
   }
3864 3866
 

Loading…
Cancel
Save