From 7e81834cb13899d39890d82f5fd5fa42c2965c17 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Aug 2019 16:01:13 -0500 Subject: [PATCH] Save 3 bytes of SRAM ! --- Marlin/src/lcd/menu/menu_ubl.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_ubl.cpp b/Marlin/src/lcd/menu/menu_ubl.cpp index b3bb94cb1621..85e42a8b87b8 100644 --- a/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/Marlin/src/lcd/menu/menu_ubl.cpp @@ -37,10 +37,9 @@ static int16_t ubl_storage_slot = 0, custom_hotend_temp = 190, side_points = 3, ubl_fillin_amount = 5, - ubl_height_amount = 1, - n_edit_pts = 1, - x_plot = 0, - y_plot = 0; + ubl_height_amount = 1; + +static uint8_t n_edit_pts = 1, x_plot = 0, y_plot = 0; #if HAS_HEATED_BED static int16_t custom_bed_temp = 50; @@ -423,7 +422,7 @@ void _lcd_ubl_map_lcd_edit_cmd() { char ubl_lcd_gcode[50], str[10], str2[10]; dtostrf(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]), 0, 2, str); dtostrf(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]), 0, 2, str2); - snprintf_P(ubl_lcd_gcode, sizeof(ubl_lcd_gcode), PSTR("G29 P4 X%s Y%s R%i"), str, str2, n_edit_pts); + snprintf_P(ubl_lcd_gcode, sizeof(ubl_lcd_gcode), PSTR("G29 P4 X%s Y%s R%i"), str, str2, int(n_edit_pts)); lcd_enqueue_one_now(ubl_lcd_gcode); }