diff --git a/Marlin/ubl.cpp b/Marlin/ubl.cpp index b1d31fe680..0f0c928e25 100644 --- a/Marlin/ubl.cpp +++ b/Marlin/ubl.cpp @@ -136,16 +136,16 @@ void unified_bed_leveling::display_map(const int map_type) { const bool map0 = map_type == 0; - const uint8_t spaces = 11; + constexpr uint8_t spaces = 11 * (GRID_MAX_POINTS_X - 2); if (map0) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n"); serial_echo_xy(0, GRID_MAX_POINTS_Y - 1); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2) + 3); + SERIAL_ECHO_SP(spaces + 3); serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1); SERIAL_EOL; serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MAX_Y); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2)-3); + SERIAL_ECHO_SP(spaces - 3); serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y); SERIAL_EOL; } @@ -190,11 +190,11 @@ if (map0) { serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2) + 1); + SERIAL_ECHO_SP(spaces + 1); serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MIN_Y); SERIAL_EOL; serial_echo_xy(0, 0); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2) + 5); + SERIAL_ECHO_SP(spaces + 5); serial_echo_xy(GRID_MAX_POINTS_X - 1, 0); SERIAL_EOL; }