Browse Source

Merge pull request #3528 from thinkyhead/rc_fix_bed_level_equation_oopsie

Fix borked set_bed_level_equation_lsq
Scott Lahteine 8 years ago
parent
commit
db86aaf385
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      Marlin/Marlin_main.cpp

+ 4
- 5
Marlin/Marlin_main.cpp View File

@@ -1413,9 +1413,6 @@ static void setup_for_endstop_move() {
1413 1413
 
1414 1414
       static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
1415 1415
 
1416
-        vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
1417
-        plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
1418
-
1419 1416
         //plan_bed_level_matrix.debug("bed level before");
1420 1417
 
1421 1418
         #if ENABLED(DEBUG_LEVELING_FEATURE)
@@ -1427,14 +1424,16 @@ static void setup_for_endstop_move() {
1427 1424
           }
1428 1425
         #endif
1429 1426
 
1427
+        vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
1428
+        plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
1429
+
1430 1430
         vector_3 corrected_position = plan_get_position();
1431
- 
1432 1431
         current_position[X_AXIS] = corrected_position.x;
1433 1432
         current_position[Y_AXIS] = corrected_position.y;
1434 1433
         current_position[Z_AXIS] = corrected_position.z;
1435 1434
 
1436 1435
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1437
-          if (DEBUGGING(LEVELING)) DEBUG_POS("<<< set_bed_level_equation_lsq", current_position);
1436
+          if (DEBUGGING(LEVELING)) DEBUG_POS("<<< set_bed_level_equation_lsq", corrected_position);
1438 1437
         #endif
1439 1438
 
1440 1439
         sync_plan_position();

Loading…
Cancel
Save