Browse Source

More logging of matrix behavior

Scott Lahteine 8 years ago
parent
commit
fdee2be49c
1 changed files with 14 additions and 4 deletions
  1. 14
    4
      Marlin/Marlin_main.cpp

+ 14
- 4
Marlin/Marlin_main.cpp View File

@@ -1351,8 +1351,14 @@ static void setup_for_endstop_move() {
1351 1351
     #if DISABLED(DELTA)
1352 1352
 
1353 1353
       static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
1354
+
1354 1355
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1355
-          if (DEBUGGING(LEVELING)) DEBUG_POS("BEFORE set_bed_level_equation_lsq", current_position);
1356
+          plan_bed_level_matrix.set_to_identity();
1357
+          if (DEBUGGING(LEVELING)) {
1358
+            vector_3 uncorrected_position = plan_get_position();
1359
+            DEBUG_POS(">>> set_bed_level_equation_lsq", uncorrected_position);
1360
+            DEBUG_POS(">>> set_bed_level_equation_lsq", current_position);
1361
+          }
1356 1362
         #endif
1357 1363
 
1358 1364
         vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
@@ -1371,7 +1377,7 @@ static void setup_for_endstop_move() {
1371 1377
         current_position[Z_AXIS] = corrected_position.z;
1372 1378
 
1373 1379
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1374
-          if (DEBUGGING(LEVELING)) DEBUG_POS("AFTER set_bed_level_equation_lsq", current_position);
1380
+          if (DEBUGGING(LEVELING)) DEBUG_POS("<<< set_bed_level_equation_lsq", current_position);
1375 1381
         #endif
1376 1382
 
1377 1383
         sync_plan_position();
@@ -3059,7 +3065,11 @@ inline void gcode_G28() {
3059 3065
       #else //!DELTA
3060 3066
 
3061 3067
         #if ENABLED(DEBUG_LEVELING_FEATURE)
3062
-          if (DEBUGGING(LEVELING)) DEBUG_POS("BEFORE matrix.set_to_identity", current_position);
3068
+          if (DEBUGGING(LEVELING)) {
3069
+            vector_3 corrected_position = plan_get_position();
3070
+            DEBUG_POS("BEFORE matrix.set_to_identity", corrected_position);
3071
+            DEBUG_POS("BEFORE matrix.set_to_identity", current_position);
3072
+          }
3063 3073
         #endif
3064 3074
 
3065 3075
         //vector_3 corrected_position = plan_get_position();
@@ -3071,7 +3081,7 @@ inline void gcode_G28() {
3071 3081
         current_position[Z_AXIS] = uncorrected_position.z;
3072 3082
 
3073 3083
         #if ENABLED(DEBUG_LEVELING_FEATURE)
3074
-          if (DEBUGGING(LEVELING)) DEBUG_POS("AFTER matrix.set_to_identity", current_position);
3084
+          if (DEBUGGING(LEVELING)) DEBUG_POS("AFTER matrix.set_to_identity", uncorrected_position);
3075 3085
         #endif
3076 3086
 
3077 3087
         sync_plan_position();

Loading…
Cancel
Save