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
     #if DISABLED(DELTA)
1351
     #if DISABLED(DELTA)
1352
 
1352
 
1353
       static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
1353
       static void set_bed_level_equation_lsq(double* plane_equation_coefficients) {
1354
+
1354
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
1362
         #endif
1357
 
1363
 
1358
         vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
1364
         vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
1371
         current_position[Z_AXIS] = corrected_position.z;
1377
         current_position[Z_AXIS] = corrected_position.z;
1372
 
1378
 
1373
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
1381
         #endif
1376
 
1382
 
1377
         sync_plan_position();
1383
         sync_plan_position();
3059
       #else //!DELTA
3065
       #else //!DELTA
3060
 
3066
 
3061
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
3073
         #endif
3064
 
3074
 
3065
         //vector_3 corrected_position = plan_get_position();
3075
         //vector_3 corrected_position = plan_get_position();
3071
         current_position[Z_AXIS] = uncorrected_position.z;
3081
         current_position[Z_AXIS] = uncorrected_position.z;
3072
 
3082
 
3073
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
3085
         #endif
3076
 
3086
 
3077
         sync_plan_position();
3087
         sync_plan_position();

Loading…
Cancel
Save