Fix a few ambiguous overloaded calls

Noticed this when exploring another optimisation

By specification exactly which overloaded function to use
we save some memory

Seems to have something to do with doing arithmetic in the function argument

Change in memory:
Flash: -156 bytes
SRAM: 0 bytes
This commit is contained in:
Guðni Már Gilbert 2023-03-25 22:31:29 +00:00 committed by DRracer
parent 3b049a1b91
commit b7c42e83cf
3 changed files with 4 additions and 4 deletions

View File

@ -3456,7 +3456,7 @@ static void mmu_M600_unload_filament() {
lcd_clear();
lcd_puts_at_P(0, 1, _T(MSG_UNLOADING_FILAMENT));
lcd_print(' ');
lcd_print(MMU2::mmu2.get_current_tool() + 1);
lcd_print(uint8_t(MMU2::mmu2.get_current_tool() + 1));
// unload just current filament for multimaterial printers (used also in M702)
MMU2::mmu2.unload();

View File

@ -320,7 +320,7 @@ static void FullScreenMsg(const char *pgmS, uint8_t slot){
lcd_clear();
lcd_puts_at_P(0, 1, pgmS);
lcd_print(' ');
lcd_print(slot + 1);
lcd_print(uint8_t(slot + 1));
}
void FullScreenMsgCut(uint8_t slot){

View File

@ -583,7 +583,7 @@ void lcdui_print_status_line(void) {
lcd_space(LCD_WIDTH);
lcd_puts_at_P(0, 3, _T(MSG_CALIBRATE_Z_AUTO));
lcd_puts_P(PSTR(" : "));
lcd_print(custom_message_state - 10);
lcd_print(uint8_t(custom_message_state - 10));
} else {
if (custom_message_state == 3) {
lcd_setstatuspgm(MSG_WELCOME);
@ -4796,7 +4796,7 @@ uint8_t choose_menu_P(const char *header, const char *item, const char *last_ite
for (uint_least8_t i = 0; i < ordinary_items; i++)
{
lcd_set_cursor(2 + item_len, i+1);
lcd_print(first + i + 1);
lcd_print(uint8_t(first + i + 1));
}
if (last_item&&last_visible) lcd_puts_at_P(1, 3, last_item);