Skip to content

Commit 7e81834

Browse files
committed
Save 3 bytes of SRAM !
1 parent ec14a66 commit 7e81834

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Marlin/src/lcd/menu/menu_ubl.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ static int16_t ubl_storage_slot = 0,
3737
custom_hotend_temp = 190,
3838
side_points = 3,
3939
ubl_fillin_amount = 5,
40-
ubl_height_amount = 1,
41-
n_edit_pts = 1,
42-
x_plot = 0,
43-
y_plot = 0;
40+
ubl_height_amount = 1;
41+
42+
static uint8_t n_edit_pts = 1, x_plot = 0, y_plot = 0;
4443

4544
#if HAS_HEATED_BED
4645
static int16_t custom_bed_temp = 50;
@@ -423,7 +422,7 @@ void _lcd_ubl_map_lcd_edit_cmd() {
423422
char ubl_lcd_gcode[50], str[10], str2[10];
424423
dtostrf(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]), 0, 2, str);
425424
dtostrf(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]), 0, 2, str2);
426-
snprintf_P(ubl_lcd_gcode, sizeof(ubl_lcd_gcode), PSTR("G29 P4 X%s Y%s R%i"), str, str2, n_edit_pts);
425+
snprintf_P(ubl_lcd_gcode, sizeof(ubl_lcd_gcode), PSTR("G29 P4 X%s Y%s R%i"), str, str2, int(n_edit_pts));
427426
lcd_enqueue_one_now(ubl_lcd_gcode);
428427
}
429428

0 commit comments

Comments
 (0)