From c95b463e0bee3aab8591cf4228cc53ab4ae74e26 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Mon, 3 Sep 2018 20:44:40 +0200 Subject: [PATCH 1/3] Remove unused variable yes. Remove redundant tmp_extruder assignment. --- Firmware/mmu.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 78b9d93a..0f25b30e 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -466,13 +466,11 @@ void mmu_M600_wait_and_beep() { void mmu_M600_load_filament(bool automatic) { //load filament for mmu v2 - bool yes = false; tmp_extruder = mmu_extruder; if (!automatic) { #ifdef MMU_M600_SWITCH_EXTRUDER - yes = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Do you want to switch extruder?"), false); + bool yes = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Do you want to switch extruder?"), false); if(yes) tmp_extruder = choose_extruder_menu(); - else tmp_extruder = mmu_extruder; #endif //MMU_M600_SWITCH_EXTRUDER } else { @@ -989,4 +987,4 @@ void mmu_eject_filament(uint8_t filament, bool recover) { puts_P(PSTR("Filament nr out of range!")); } -} \ No newline at end of file +} From cbf633cfd42fd43ea04ddb0dc1453c4d8d87c05d Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Mon, 3 Sep 2018 20:47:12 +0200 Subject: [PATCH 2/3] Remove unused variable chars. --- Firmware/ultralcd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index f10aa6eb..8ed4b519 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -482,12 +482,10 @@ void lcdui_print_temp(char type, int val_current, int val_target) // Print Z-coordinate (8 chars total) void lcdui_print_Z_coord(void) { - int chars = 8; if (custom_message_type == CUSTOM_MSG_TYPE_MESHBL) lcd_puts_P(_N("Z --- ")); else - chars = lcd_printf_P(_N("Z%6.2f "), current_position[Z_AXIS]); -// lcd_space(8 - chars); + lcd_printf_P(_N("Z%6.2f "), current_position[Z_AXIS]); } #ifdef PLANNER_DIAGNOSTICS From 63a215b0c3c87ed44d033deee9281858a0330391 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Mon, 3 Sep 2018 20:48:03 +0200 Subject: [PATCH 3/3] Remove unused variable chars. --- Firmware/ultralcd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 8ed4b519..f4076867 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -525,8 +525,7 @@ void lcdui_print_percent_done(void) char per[4]; bool num = IS_SD_PRINTING || (PRINTER_ACTIVE && (print_percent_done_normal != PRINT_PERCENT_DONE_INIT)); sprintf_P(per, num?_N("%3hhd"):_N("---"), calc_percent_done()); - int chars = lcd_printf_P(_N("%3S%3s%%"), src, per); -// lcd_space(7 - chars); + lcd_printf_P(_N("%3S%3s%%"), src, per); } // Print extruder status (5 chars total)