diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 74b8e6785a..90f703f088 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -197,13 +197,13 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); // Add a sing void enqueue_and_echo_commands_P(const char * const cmd); // Set one or more commands to be prioritized over the next Serial/SD command. void clear_command_queue(); -#define HAS_LCD_QUEUE_NOW (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE))) +#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)))) #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW) #if HAS_QUEUE_NOW // Return only when commands are actually enqueued - void enqueue_and_echo_command_now(const char* cmd, bool say_ok=false); + void enqueue_and_echo_command_now(const char* cmd); #if HAS_LCD_QUEUE_NOW - void enqueue_and_echo_commands_P_now(const char * const cmd); + void enqueue_and_echo_commands_now_P(const char * const cmd); #endif #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index fe2bf1e014..9ceed51d36 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -897,11 +897,11 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) { } #if HAS_QUEUE_NOW - void enqueue_and_echo_command_now(const char* cmd, bool say_ok/*=false*/) { - while (!enqueue_and_echo_command(cmd, say_ok)) idle(); + void enqueue_and_echo_command_now(const char* cmd) { + while (!enqueue_and_echo_command(cmd)) idle(); } #if HAS_LCD_QUEUE_NOW - void enqueue_and_echo_commands_P_now(const char * const pgcode) { + void enqueue_and_echo_commands_now_P(const char * const pgcode) { enqueue_and_echo_commands_P(pgcode); while (drain_injected_commands_P()) idle(); } diff --git a/Marlin/malyanlcd.cpp b/Marlin/malyanlcd.cpp index 29177deefb..894b8ae642 100644 --- a/Marlin/malyanlcd.cpp +++ b/Marlin/malyanlcd.cpp @@ -106,14 +106,14 @@ void process_lcd_c_command(const char* command) { // M104 S char cmd[20]; sprintf_P(cmd, PSTR("M104 S%s"), command + 1); - enqueue_and_echo_command_now(cmd, false); + enqueue_and_echo_command_now(cmd); } break; case 'P': { // M140 S char cmd[20]; sprintf_P(cmd, PSTR("M140 S%s"), command + 1); - enqueue_and_echo_command_now(cmd, false); + enqueue_and_echo_command_now(cmd); } break; default: @@ -175,8 +175,8 @@ void process_lcd_j_command(const char* command) { case 'E': // enable or disable steppers // switch to relative - enqueue_and_echo_command_now("G91"); - enqueue_and_echo_command_now(steppers_enabled ? "M18" : "M17"); + enqueue_and_echo_commands_now_P(PSTR("G91")); + enqueue_and_echo_commands_now_P(steppers_enabled ? PSTR("M18") : PSTR("M17")); steppers_enabled = !steppers_enabled; break; case 'A': @@ -242,7 +242,7 @@ void process_lcd_p_command(const char* command) { break; case 'H': // Home all axis - enqueue_and_echo_command_now("G28"); + enqueue_and_echo_commands_now_P(PSTR("G28")); break; default: { // Print file 000 - a three digit number indicating which diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 8b52041944..a91f881fff 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1710,7 +1710,7 @@ void kill_screen(const char* lcd_msg) { void lcd_enqueue_commands_P(const char * const cmd) { no_reentry = true; - enqueue_and_echo_commands_P_now(cmd); + enqueue_and_echo_commands_now_P(cmd); no_reentry = false; }