Browse Source

Getting setup for debugging

Roxy-3D 7 years ago
parent
commit
14cf527bb8
3 changed files with 35 additions and 35 deletions
  1. 6
    6
      Marlin/ubl.cpp
  2. 2
    2
      Marlin/ubl.h
  3. 27
    27
      Marlin/ubl_G29.cpp

+ 6
- 6
Marlin/ubl.cpp View File

@@ -47,9 +47,9 @@
47 47
     safe_delay(10);
48 48
   }
49 49
 
50
-  static void serial_echo_11x_spaces() {
50
+  static void serial_echo_12x_spaces() {
51 51
     for (uint8_t i = GRID_MAX_POINTS_X - 1; --i;) {
52
-      SERIAL_ECHOPGM("          ");
52
+      SERIAL_ECHOPGM("            ");
53 53
       #if TX_BUFFER_SIZE > 0
54 54
         MYSERIAL.flushTX();
55 55
       #endif
@@ -172,11 +172,11 @@
172 172
     }
173 173
 
174 174
     if (map0) {
175
-      serial_echo_11x_spaces();
175
+      serial_echo_12x_spaces();
176 176
       serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
177 177
       SERIAL_EOL;
178 178
       serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
179
-      serial_echo_11x_spaces();
179
+      serial_echo_12x_spaces();
180 180
       serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y);
181 181
       SERIAL_EOL;
182 182
     }
@@ -222,12 +222,12 @@
222 222
     if (map0) {
223 223
       serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
224 224
       SERIAL_ECHOPGM("    ");
225
-      serial_echo_11x_spaces();
225
+      serial_echo_12x_spaces();
226 226
       serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MIN_Y);
227 227
       SERIAL_EOL;
228 228
       serial_echo_xy(0, 0);
229 229
       SERIAL_ECHOPGM("       ");
230
-      serial_echo_11x_spaces();
230
+      serial_echo_12x_spaces();
231 231
       serial_echo_xy(GRID_MAX_POINTS_X - 1, 0);
232 232
       SERIAL_EOL;
233 233
     }

+ 2
- 2
Marlin/ubl.h View File

@@ -45,7 +45,7 @@
45 45
   void dump(char * const str, const float &f);
46 46
   bool ubl_lcd_clicked();
47 47
   void probe_entire_mesh(const float&, const float&, const bool, const bool, const bool);
48
-  void debug_current_and_destination(const char *title);
48
+  void debug_current_and_destination(const char * const title);
49 49
   void ubl_line_to_destination(const float&, uint8_t);
50 50
   void manually_probe_remaining_mesh(const float&, const float&, const float&, const float&, const bool);
51 51
   vector_3 tilt_mesh_based_on_3pts(const float&, const float&, const float&);
@@ -271,7 +271,7 @@
271 271
         #if ENABLED(DEBUG_LEVELING_FEATURE)
272 272
           if (DEBUGGING(MESH_ADJUST)) {
273 273
             SERIAL_ECHOPAIR(" raw get_z_correction(", lx0);
274
-            SERIAL_CHAR(',')
274
+            SERIAL_CHAR(',');
275 275
             SERIAL_ECHO(ly0);
276 276
             SERIAL_ECHOPGM(") = ");
277 277
             SERIAL_ECHO_F(z0, 6);

+ 27
- 27
Marlin/ubl_G29.cpp View File

@@ -1492,9 +1492,9 @@
1492 1492
       }
1493 1493
       
1494 1494
       if ((x_max - x_min + 1) < (grid_size_G) || (y_max - y_min + 1) < (grid_size_G)) {
1495
-        SERIAL_PROTOCOLPAIR("ERROR - probeable UBL MESH smaller than grid - X points: ", x_max - x_min + 1);
1496
-        SERIAL_PROTOCOLPAIR("  Y points: ", y_max - y_min + 1);
1497
-        SERIAL_PROTOCOLLNPAIR("  grid: ", grid_size_G);
1495
+        SERIAL_ECHOPAIR("ERROR - probeable UBL MESH smaller than grid - X points: ", x_max - x_min + 1);
1496
+        SERIAL_ECHOPAIR("  Y points: ", y_max - y_min + 1);
1497
+        SERIAL_ECHOLNPAIR("  grid: ", grid_size_G);
1498 1498
         return;
1499 1499
       }
1500 1500
       
@@ -1540,7 +1540,7 @@
1540 1540
         
1541 1541
         int8_t inStart, inStop, inInc;
1542 1542
         
1543
-SERIAL_PROTOCOLPAIR("\nPR_OUTER_VAR: ", PR_OUTER_VAR);
1543
+SERIAL_ECHOPAIR("\nPR_OUTER_VAR: ", PR_OUTER_VAR);
1544 1544
 
1545 1545
         if (zig) { // away from origin
1546 1546
           inStart = 0;
@@ -1557,40 +1557,40 @@ SERIAL_PROTOCOLPAIR("\nPR_OUTER_VAR: ", PR_OUTER_VAR);
1557 1557
         
1558 1558
         // Inner loop is Y with PROBE_Y_FIRST enabled
1559 1559
         for (PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
1560
-SERIAL_PROTOCOLPAIR("\nPR_INNER_VAR: ", PR_INNER_VAR);
1560
+SERIAL_ECHOPAIR("\nPR_INNER_VAR: ", PR_INNER_VAR);
1561 1561
 
1562
-SERIAL_PROTOCOLPAIR("\nCheckpoint: ", 1);
1562
+SERIAL_ECHOPAIR("\nCheckpoint: ", 1);
1563 1563
           
1564 1564
           // end of G29 AUTO_BED_LEVELING_BILINEAR method/code
1565 1565
           if (ubl_lcd_clicked()) {
1566
-SERIAL_PROTOCOLPAIR("\nCheckpoint: ", 2);
1567
-            SERIAL_PROTOCOLLNPGM("\nGrid only partially populated.\n");
1566
+SERIAL_ECHOPAIR("\nCheckpoint: ", 2);
1567
+            SERIAL_ECHOLNPGM("\nGrid only partially populated.\n");
1568 1568
             lcd_quick_feedback();
1569 1569
             STOW_PROBE();
1570
-SERIAL_PROTOCOLPAIR("\nCheckpoint: ", 3);
1570
+SERIAL_ECHOPAIR("\nCheckpoint: ", 3);
1571 1571
             while (ubl_lcd_clicked()) idle();
1572
-SERIAL_PROTOCOLPAIR("\nCheckpoint: ", 4);
1572
+SERIAL_ECHOPAIR("\nCheckpoint: ", 4);
1573 1573
               ubl.has_control_of_lcd_panel = false;
1574 1574
               restore_ubl_active_state_and_leave();
1575 1575
               safe_delay(50);  // Debounce the Encoder wheel
1576 1576
               return;
1577 1577
             }
1578
-SERIAL_PROTOCOLPAIR("\nCheckpoint: ", 5);
1578
+SERIAL_ECHOPAIR("\nCheckpoint: ", 5);
1579 1579
           
1580 1580
           const float probeX = ubl.mesh_index_to_xpos[grid_G_index_to_xpos[xCount]],  //where we want the probe to be
1581 1581
           probeY = ubl.mesh_index_to_ypos[grid_G_index_to_ypos[yCount]];
1582
-SERIAL_PROTOCOLPAIR("\nCheckpoint: ", 6);
1582
+SERIAL_ECHOPAIR("\nCheckpoint: ", 6);
1583 1583
           
1584 1584
           const float measured_z = probe_pt(LOGICAL_X_POSITION(probeX), LOGICAL_Y_POSITION(probeY), code_seen('E'), (code_seen('V') && code_has_value()) ? code_value_int() : 0 );  // takes into account the offsets
1585 1585
 
1586
-SERIAL_PROTOCOLPAIR("\nmeasured_z: ", measured_z );
1586
+SERIAL_ECHOPAIR("\nmeasured_z: ", measured_z );
1587 1587
 
1588 1588
           z_values_G[xCount][yCount] = measured_z;
1589
-//SERIAL_PROTOCOLLNPGM("\nFine Tuning of Mesh Stopped.");
1589
+//SERIAL_LNPGM("\nFine Tuning of Mesh Stopped.");
1590 1590
         }
1591 1591
       }
1592 1592
       
1593
-SERIAL_PROTOCOL("\nDone probing...\n");
1593
+SERIAL_ECHO("\nDone probing...\n");
1594 1594
 
1595 1595
       STOW_PROBE();
1596 1596
       restore_ubl_active_state_and_leave();
@@ -1615,22 +1615,22 @@ double zzz[] = { 0.05, 0.05, 0.15, 0.15 };
1615 1615
 int three_size = sizeof(xxx) / sizeof(double);
1616 1616
 
1617 1617
       results = lsf_linear_fit(xxx9, yyy9, zzz9, nine_size);
1618
-SERIAL_PROTOCOLPAIR("\nxxx9->A =", results->A); 
1619
-SERIAL_PROTOCOLPAIR("\nxxx9->B =", results->B); 
1620
-SERIAL_PROTOCOLPAIR("\nxxx9->D =", results->D); 
1621
-SERIAL_PROTOCOL("\n");
1618
+SERIAL_ECHOPAIR("\nxxx9->A =", results->A); 
1619
+SERIAL_ECHOPAIR("\nxxx9->B =", results->B); 
1620
+SERIAL_ECHOPAIR("\nxxx9->D =", results->D); 
1621
+SERIAL_ECHO("\n");
1622 1622
 
1623 1623
       results = lsf_linear_fit(xxx0, yyy0, zzz0, zero_size);
1624
-SERIAL_PROTOCOLPAIR("\nxxx0->A =", results->A); 
1625
-SERIAL_PROTOCOLPAIR("\nxxx0->B =", results->B); 
1626
-SERIAL_PROTOCOLPAIR("\nxxx0->D =", results->D); 
1627
-SERIAL_PROTOCOL("\n");
1624
+SERIAL_ECHOPAIR("\nxxx0->A =", results->A); 
1625
+SERIAL_ECHOPAIR("\nxxx0->B =", results->B); 
1626
+SERIAL_ECHOPAIR("\nxxx0->D =", results->D); 
1627
+SERIAL_ECHO("\n");
1628 1628
 
1629 1629
       results = lsf_linear_fit(xxx, yyy, zzz, three_size);
1630
-SERIAL_PROTOCOLPAIR("\nxxx->A =", results->A); 
1631
-SERIAL_PROTOCOLPAIR("\nxxx->B =", results->B); 
1632
-SERIAL_PROTOCOLPAIR("\nxxx->D =", results->D); 
1633
-SERIAL_PROTOCOL("\n");
1630
+SERIAL_ECHOPAIR("\nxxx->A =", results->A); 
1631
+SERIAL_ECHOPAIR("\nxxx->B =", results->B); 
1632
+SERIAL_ECHOPAIR("\nxxx->D =", results->D); 
1633
+SERIAL_ECHO("\n");
1634 1634
 
1635 1635
       return;
1636 1636
     }  // end of tilt_mesh_based_on_probed_grid()

Loading…
Cancel
Save