Browse Source

Minor patch ups to `G29`

This may fix a subtle bug caused by doing `G29` more than once without
`G28` between.
Scott Lahteine 8 years ago
parent
commit
a644ab1de4
1 changed files with 12 additions and 10 deletions
  1. 12
    10
      Marlin/Marlin_main.cpp

+ 12
- 10
Marlin/Marlin_main.cpp View File

1351
         //bedLevel.debug("bedLevel");
1351
         //bedLevel.debug("bedLevel");
1352
 
1352
 
1353
         //plan_bed_level_matrix.debug("bed level before");
1353
         //plan_bed_level_matrix.debug("bed level before");
1354
-        //vector_3 uncorrected_position = plan_get_position_mm();
1354
+        //vector_3 uncorrected_position = plan_get_position();
1355
         //uncorrected_position.debug("position before");
1355
         //uncorrected_position.debug("position before");
1356
 
1356
 
1357
         vector_3 corrected_position = plan_get_position();
1357
         vector_3 corrected_position = plan_get_position();
3039
 
3039
 
3040
     #endif // AUTO_BED_LEVELING_GRID
3040
     #endif // AUTO_BED_LEVELING_GRID
3041
 
3041
 
3042
-    #if ENABLED(Z_PROBE_SLED)
3043
-      dock_sled(false); // engage (un-dock) the Z probe
3044
-    #elif ENABLED(Z_PROBE_ALLEN_KEY) || (ENABLED(DELTA) && SERVO_LEVELING)
3045
-      deploy_z_probe();
3046
-    #endif
3047
-
3048
-    st_synchronize();
3049
-
3050
     if (!dryrun) {
3042
     if (!dryrun) {
3043
+
3051
       // make sure the bed_level_rotation_matrix is identity or the planner will get it wrong
3044
       // make sure the bed_level_rotation_matrix is identity or the planner will get it wrong
3052
       plan_bed_level_matrix.set_to_identity();
3045
       plan_bed_level_matrix.set_to_identity();
3053
 
3046
 
3054
       #if ENABLED(DELTA)
3047
       #if ENABLED(DELTA)
3055
         reset_bed_level();
3048
         reset_bed_level();
3056
       #else //!DELTA
3049
       #else //!DELTA
3057
-        //vector_3 corrected_position = plan_get_position_mm();
3050
+
3058
         #if ENABLED(DEBUG_LEVELING_FEATURE)
3051
         #if ENABLED(DEBUG_LEVELING_FEATURE)
3059
           if (DEBUGGING(LEVELING)) DEBUG_POS("BEFORE matrix.set_to_identity", current_position);
3052
           if (DEBUGGING(LEVELING)) DEBUG_POS("BEFORE matrix.set_to_identity", current_position);
3060
         #endif
3053
         #endif
3061
 
3054
 
3055
+        //vector_3 corrected_position = plan_get_position();
3062
         //corrected_position.debug("position before G29");
3056
         //corrected_position.debug("position before G29");
3063
         vector_3 uncorrected_position = plan_get_position();
3057
         vector_3 uncorrected_position = plan_get_position();
3064
         //uncorrected_position.debug("position during G29");
3058
         //uncorrected_position.debug("position during G29");
3074
       #endif // !DELTA
3068
       #endif // !DELTA
3075
     }
3069
     }
3076
 
3070
 
3071
+    #if ENABLED(Z_PROBE_SLED)
3072
+      dock_sled(false); // engage (un-dock) the Z probe
3073
+    #elif ENABLED(Z_PROBE_ALLEN_KEY) || (ENABLED(DELTA) && SERVO_LEVELING)
3074
+      deploy_z_probe();
3075
+    #endif
3076
+
3077
+    st_synchronize();
3078
+
3077
     setup_for_endstop_move();
3079
     setup_for_endstop_move();
3078
 
3080
 
3079
     feedrate = homing_feedrate[Z_AXIS];
3081
     feedrate = homing_feedrate[Z_AXIS];

Loading…
Cancel
Save