From 9f66eceb2954387ad296d55deb5d91c93663ee05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 15 Apr 2023 11:28:37 +0000 Subject: [PATCH] optimisation: belt test new values use lcd_print instead of lcd_printf_P to print the number only Tested on MK3S+ Change in memory: Flash: -34 bytes SRAM: 0 bytes --- Firmware/ultralcd.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index d638779ab..415642d5d 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -5925,13 +5925,15 @@ void lcd_belttest() // that clobbers ours, with more info than we could provide. So on fail we just fall through to take us back to status. if (lcd_selfcheck_axis_sg(X_AXIS)){ X = eeprom_read_word((uint16_t*)(EEPROM_BELTSTATUS_X)); - lcd_set_cursor(10,1), lcd_printf_P(PSTR("%u"),X); // Show new X value next to old one. - lcd_puts_at_P(0,2,_T(MSG_CHECKING_Y)); - lcd_set_cursor(0,3), lcd_printf_P(PSTR("Y: %u -> ..."),Y); + lcd_set_cursor(10, 1); + lcd_print(X); // Show new X value next to old one. + lcd_puts_at_P(0, 2, _T(MSG_CHECKING_Y)); + lcd_set_cursor(0, 3), lcd_printf_P(PSTR("Y: %u -> ..."),Y); if (lcd_selfcheck_axis_sg(Y_AXIS)) { Y = eeprom_read_word((uint16_t*)(EEPROM_BELTSTATUS_Y)); - lcd_set_cursor(10,3),lcd_printf_P(PSTR("%u"),Y); + lcd_set_cursor(10, 3); + lcd_print(Y); lcd_putc_at(19, 3, LCD_STR_UPLEVEL[0]); lcd_wait_for_click_delay(10); }