Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#6538 from bgort/ubl_gridlbls
Browse files Browse the repository at this point in the history
Fix, cleanup, prettify `G29 O` output
  • Loading branch information
thinkyhead authored May 2, 2017
2 parents 99b11db + 92e22c3 commit ac69eca
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions Marlin/ubl.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
safe_delay(10);
}

static void serial_echo_12x_spaces() {
static void serial_echo_mspaces(const uint8_t cnt) {
for (uint8_t i = GRID_MAX_POINTS_X - 1; --i;) {
SERIAL_ECHO_SP(12);
SERIAL_ECHO_SP((uint8_t)cnt);
safe_delay(10);
}
}
Expand Down Expand Up @@ -142,21 +142,18 @@
}

void unified_bed_leveling::display_map(const int map_type) {

const bool map0 = map_type == 0;
const uint8_t spaces = 9;

if (map0) {
SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n");
serial_echo_xy(0, GRID_MAX_POINTS_Y - 1);
SERIAL_ECHOPGM(" ");
}

if (map0) {
serial_echo_12x_spaces();
SERIAL_ECHO_SP(3);
serial_echo_mspaces(spaces);
serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
SERIAL_EOL;
serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
serial_echo_12x_spaces();
serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MAX_Y);
serial_echo_mspaces(spaces);
serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y);
SERIAL_EOL;
}
Expand Down Expand Up @@ -202,12 +199,12 @@
if (map0) {
serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y);
SERIAL_ECHO_SP(4);
serial_echo_12x_spaces();
serial_echo_mspaces(spaces);
serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MIN_Y);
SERIAL_EOL;
serial_echo_xy(0, 0);
SERIAL_ECHO_SP(7);
serial_echo_12x_spaces();
SERIAL_ECHO_SP(5);
serial_echo_mspaces(spaces);
serial_echo_xy(GRID_MAX_POINTS_X - 1, 0);
SERIAL_EOL;
}
Expand Down

0 comments on commit ac69eca

Please sign in to comment.