Allow SERIAL_ECHOPAIR to take up to 12 pairs (#13311)
This commit is contained in:
@ -338,22 +338,11 @@ float bilinear_z_offset(const float raw[XYZ]) {
|
||||
/*
|
||||
static float last_offset = 0;
|
||||
if (ABS(last_offset - offset) > 0.2) {
|
||||
SERIAL_ECHOPGM("Sudden Shift at ");
|
||||
SERIAL_ECHOPAIR("x=", rx);
|
||||
SERIAL_ECHOPAIR(" / ", bilinear_grid_spacing[X_AXIS]);
|
||||
SERIAL_ECHOLNPAIR(" -> gridx=", gridx);
|
||||
SERIAL_ECHOPAIR(" y=", ry);
|
||||
SERIAL_ECHOPAIR(" / ", bilinear_grid_spacing[Y_AXIS]);
|
||||
SERIAL_ECHOLNPAIR(" -> gridy=", gridy);
|
||||
SERIAL_ECHOPAIR(" ratio_x=", ratio_x);
|
||||
SERIAL_ECHOLNPAIR(" ratio_y=", ratio_y);
|
||||
SERIAL_ECHOPAIR(" z1=", z1);
|
||||
SERIAL_ECHOPAIR(" z2=", z2);
|
||||
SERIAL_ECHOPAIR(" z3=", z3);
|
||||
SERIAL_ECHOLNPAIR(" z4=", z4);
|
||||
SERIAL_ECHOPAIR(" L=", L);
|
||||
SERIAL_ECHOPAIR(" R=", R);
|
||||
SERIAL_ECHOLNPAIR(" offset=", offset);
|
||||
SERIAL_ECHOLNPAIR("Sudden Shift at x=", rx, " / ", bilinear_grid_spacing[X_AXIS], " -> gridx=", gridx);
|
||||
SERIAL_ECHOLNPAIR(" y=", ry, " / ", bilinear_grid_spacing[Y_AXIS], " -> gridy=", gridy);
|
||||
SERIAL_ECHOLNPAIR(" ratio_x=", ratio_x, " ratio_y=", ratio_y);
|
||||
SERIAL_ECHOLNPAIR(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4);
|
||||
SERIAL_ECHOLNPAIR(" L=", L, " R=", R, " offset=", offset);
|
||||
}
|
||||
last_offset = offset;
|
||||
//*/
|
||||
|
@ -45,8 +45,7 @@
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
if (!isnan(z_values[x][y])) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" M421 I", x);
|
||||
SERIAL_ECHOPAIR(" J", y);
|
||||
SERIAL_ECHOPAIR(" M421 I", x, " J", y);
|
||||
SERIAL_ECHOPAIR_F(" Z", z_values[x][y], 2);
|
||||
SERIAL_EOL();
|
||||
serial_delay(75); // Prevent Printrun from exploding
|
||||
|
@ -202,11 +202,7 @@ class unified_bed_leveling {
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
serialprintPGM( !WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1) ? PSTR("x1_i") : PSTR("yi") );
|
||||
SERIAL_ECHOPAIR(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0);
|
||||
SERIAL_ECHOPAIR(",x1_i=", x1_i);
|
||||
SERIAL_ECHOPAIR(",yi=", yi);
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOLNPAIR(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -235,12 +231,8 @@ class unified_bed_leveling {
|
||||
if (!WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(y1_i, 0, GRID_MAX_POINTS_Y - 1)) {
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
serialprintPGM( !WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) ? PSTR("xi") : PSTR("y1_i") );
|
||||
SERIAL_ECHOPAIR(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0);
|
||||
SERIAL_ECHOPAIR(", xi=", xi);
|
||||
SERIAL_ECHOPAIR(", y1_i=", y1_i);
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_EOL();
|
||||
serialprintPGM(!WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) ? PSTR("xi") : PSTR("y1_i"));
|
||||
SERIAL_ECHOLNPAIR(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -598,8 +598,7 @@
|
||||
}
|
||||
|
||||
if (!WITHIN(g29_storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.");
|
||||
SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -627,8 +626,7 @@
|
||||
}
|
||||
|
||||
if (!WITHIN(g29_storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.");
|
||||
SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
goto LEAVE;
|
||||
}
|
||||
|
||||
@ -1640,10 +1638,8 @@
|
||||
|
||||
if (storage_slot == -1)
|
||||
SERIAL_ECHOPGM("No Mesh Loaded.");
|
||||
else {
|
||||
SERIAL_ECHOPAIR("Mesh ", storage_slot);
|
||||
SERIAL_ECHOPGM(" Loaded.");
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOPAIR("Mesh ", storage_slot, " Loaded.");
|
||||
SERIAL_EOL();
|
||||
serial_delay(50);
|
||||
|
||||
@ -1683,19 +1679,16 @@
|
||||
SERIAL_EOL();
|
||||
|
||||
#if HAS_KILL
|
||||
SERIAL_ECHOPAIR("Kill pin on :", KILL_PIN);
|
||||
SERIAL_ECHOLNPAIR(" state:", READ(KILL_PIN));
|
||||
SERIAL_ECHOLNPAIR("Kill pin on :", int(KILL_PIN), " state:", READ(KILL_PIN));
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
serial_delay(50);
|
||||
|
||||
#if ENABLED(UBL_DEVEL_DEBUGGING)
|
||||
SERIAL_ECHOLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation); SERIAL_EOL();
|
||||
SERIAL_ECHOLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk); SERIAL_EOL();
|
||||
SERIAL_ECHOLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk);
|
||||
serial_delay(50);
|
||||
|
||||
SERIAL_ECHOPAIR("Meshes go from ", hex_address((void*)settings.meshes_start_index()));
|
||||
SERIAL_ECHOLNPAIR(" to ", hex_address((void*)settings.meshes_end_index()));
|
||||
SERIAL_ECHOLNPAIR("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index()));
|
||||
serial_delay(50);
|
||||
|
||||
SERIAL_ECHOLNPAIR("sizeof(ubl) : ", (int)sizeof(ubl)); SERIAL_EOL();
|
||||
@ -1705,8 +1698,7 @@
|
||||
SERIAL_ECHOLNPAIR("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index())));
|
||||
serial_delay(50);
|
||||
|
||||
SERIAL_ECHOPAIR("EEPROM can hold ", settings.calc_num_meshes());
|
||||
SERIAL_ECHOLNPGM(" meshes.\n");
|
||||
SERIAL_ECHOLNPAIR("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n");
|
||||
serial_delay(25);
|
||||
#endif // UBL_DEVEL_DEBUGGING
|
||||
|
||||
@ -1753,24 +1745,21 @@
|
||||
}
|
||||
|
||||
if (!parser.has_value()) {
|
||||
SERIAL_ECHOLNPGM("?Storage slot # required.");
|
||||
SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPAIR("?Storage slot # required.\n?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
g29_storage_slot = parser.value_int();
|
||||
|
||||
if (!WITHIN(g29_storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.");
|
||||
SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1);
|
||||
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||
settings.load_mesh(g29_storage_slot, &tmp_z_values);
|
||||
|
||||
SERIAL_ECHOPAIR("Subtracting mesh in slot ", g29_storage_slot);
|
||||
SERIAL_ECHOLNPGM(" from current mesh.");
|
||||
SERIAL_ECHOLNPAIR("Subtracting mesh in slot ", g29_storage_slot, " from current mesh.");
|
||||
|
||||
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
|
@ -65,12 +65,13 @@
|
||||
cell_dest_yi = get_cell_index_y(end[Y_AXIS]);
|
||||
|
||||
if (g26_debug_flag) {
|
||||
SERIAL_ECHOPAIR(" ubl.line_to_destination_cartesian(xe=", destination[X_AXIS]);
|
||||
SERIAL_ECHOPAIR(", ye=", destination[Y_AXIS]);
|
||||
SERIAL_ECHOPAIR(", ze=", destination[Z_AXIS]);
|
||||
SERIAL_ECHOPAIR(", ee=", destination[E_AXIS]);
|
||||
SERIAL_CHAR(')');
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOLNPAIR(
|
||||
" ubl.line_to_destination_cartesian(xe=", destination[X_AXIS],
|
||||
", ye=", destination[Y_AXIS],
|
||||
", ze=", destination[Z_AXIS],
|
||||
", ee=", destination[E_AXIS],
|
||||
")"
|
||||
);
|
||||
debug_current_and_destination(PSTR("Start of ubl.line_to_destination_cartesian()"));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user