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
 
1413
 
1414
       static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
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
         //plan_bed_level_matrix.debug("bed level before");
1416
         //plan_bed_level_matrix.debug("bed level before");
1420
 
1417
 
1421
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1418
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1427
           }
1424
           }
1428
         #endif
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
         vector_3 corrected_position = plan_get_position();
1430
         vector_3 corrected_position = plan_get_position();
1431
- 
1432
         current_position[X_AXIS] = corrected_position.x;
1431
         current_position[X_AXIS] = corrected_position.x;
1433
         current_position[Y_AXIS] = corrected_position.y;
1432
         current_position[Y_AXIS] = corrected_position.y;
1434
         current_position[Z_AXIS] = corrected_position.z;
1433
         current_position[Z_AXIS] = corrected_position.z;
1435
 
1434
 
1436
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
1437
         #endif
1439
 
1438
 
1440
         sync_plan_position();
1439
         sync_plan_position();

Loading…
Cancel
Save