Browse Source

Correct XYZ after obtaining plan_bed_level_matrix

The current position needs to be updated by using the inverse
`plan_bed_level_matrix` on X, Y, and Z. All moves in the planner are
transformed by the `plan_bed_level_matrix` from this point forward.
Scott Lahteine 9 years ago
parent
commit
97a69d9b1c
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp View File

1055
         //corrected_position.debug("position after");
1055
         //corrected_position.debug("position after");
1056
         current_position[X_AXIS] = corrected_position.x;
1056
         current_position[X_AXIS] = corrected_position.x;
1057
         current_position[Y_AXIS] = corrected_position.y;
1057
         current_position[Y_AXIS] = corrected_position.y;
1058
-        current_position[Z_AXIS] = zprobe_zoffset; // was: corrected_position.z
1058
+        current_position[Z_AXIS] = corrected_position.z;
1059
 
1059
 
1060
         sync_plan_position();
1060
         sync_plan_position();
1061
       }
1061
       }
1084
       vector_3 corrected_position = plan_get_position();
1084
       vector_3 corrected_position = plan_get_position();
1085
       current_position[X_AXIS] = corrected_position.x;
1085
       current_position[X_AXIS] = corrected_position.x;
1086
       current_position[Y_AXIS] = corrected_position.y;
1086
       current_position[Y_AXIS] = corrected_position.y;
1087
-      current_position[Z_AXIS] = zprobe_zoffset; // was: corrected_position.z
1087
+      current_position[Z_AXIS] = corrected_position.z;
1088
 
1088
 
1089
       sync_plan_position();
1089
       sync_plan_position();
1090
     }
1090
     }

Loading…
Cancel
Save