浏览代码

Fix up enqueue now functions

…and apply to MALYAN_LCD.
Scott Lahteine 7 年前
父节点
当前提交
78ea4871f9
共有 4 个文件被更改,包括 12 次插入12 次删除
  1. 3
    3
      Marlin/src/gcode/queue.cpp
  2. 3
    3
      Marlin/src/gcode/queue.h
  3. 5
    5
      Marlin/src/lcd/malyanlcd.cpp
  4. 1
    1
      Marlin/src/lcd/ultralcd.cpp

+ 3
- 3
Marlin/src/gcode/queue.cpp 查看文件

@@ -176,14 +176,14 @@ void enqueue_and_echo_commands_P(const char * const pgcode) {
176 176
   /**
177 177
    * Enqueue and return only when commands are actually enqueued
178 178
    */
179
-  void enqueue_and_echo_command_now(const char* cmd, bool say_ok/*=false*/) {
180
-    while (!enqueue_and_echo_command(cmd, say_ok)) idle();
179
+  void enqueue_and_echo_command_now(const char* cmd) {
180
+    while (!enqueue_and_echo_command(cmd)) idle();
181 181
   }
182 182
   #if HAS_LCD_QUEUE_NOW
183 183
     /**
184 184
      * Enqueue from program memory and return only when commands are actually enqueued
185 185
      */
186
-    void enqueue_and_echo_commands_P_now(const char * const pgcode) {
186
+    void enqueue_and_echo_commands_now_P(const char * const pgcode) {
187 187
       enqueue_and_echo_commands_P(pgcode);
188 188
       while (drain_injected_commands_P()) idle();
189 189
     }

+ 3
- 3
Marlin/src/gcode/queue.h 查看文件

@@ -97,19 +97,19 @@ void enqueue_and_echo_commands_P(const char * const pgcode);
97 97
  */
98 98
 bool enqueue_and_echo_command(const char* cmd, bool say_ok=false);
99 99
 
100
-#define HAS_LCD_QUEUE_NOW (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)))
100
+#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE))))
101 101
 #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW)
102 102
 
103 103
 #if HAS_QUEUE_NOW
104 104
   /**
105 105
    * Enqueue and return only when commands are actually enqueued
106 106
    */
107
-  void enqueue_and_echo_command_now(const char* cmd, bool say_ok=false);
107
+  void enqueue_and_echo_command_now(const char* cmd);
108 108
   #if HAS_LCD_QUEUE_NOW
109 109
     /**
110 110
      * Enqueue from program memory and return only when commands are actually enqueued
111 111
      */
112
-    void enqueue_and_echo_commands_P_now(const char * const cmd);
112
+    void enqueue_and_echo_commands_now_P(const char * const cmd);
113 113
   #endif
114 114
 #endif
115 115
 

+ 5
- 5
Marlin/src/lcd/malyanlcd.cpp 查看文件

@@ -109,14 +109,14 @@ void process_lcd_c_command(const char* command) {
109 109
       // M104 S<temperature>
110 110
       char cmd[20];
111 111
       sprintf_P(cmd, PSTR("M104 S%s"), command + 1);
112
-      enqueue_and_echo_command_now(cmd, false);
112
+      enqueue_and_echo_command_now(cmd);
113 113
     } break;
114 114
 
115 115
     case 'P': {
116 116
       // M140 S<temperature>
117 117
       char cmd[20];
118 118
       sprintf_P(cmd, PSTR("M140 S%s"), command + 1);
119
-      enqueue_and_echo_command_now(cmd, false);
119
+      enqueue_and_echo_command_now(cmd);
120 120
     } break;
121 121
 
122 122
     default:
@@ -178,8 +178,8 @@ void process_lcd_j_command(const char* command) {
178 178
     case 'E':
179 179
       // enable or disable steppers
180 180
       // switch to relative
181
-      enqueue_and_echo_command_now("G91");
182
-      enqueue_and_echo_command_now(steppers_enabled ? "M18" : "M17");
181
+      enqueue_and_echo_commands_now_P(PSTR("G91"));
182
+      enqueue_and_echo_commands_now_P(steppers_enabled ? PSTR("M18") : PSTR("M17"));
183 183
       steppers_enabled = !steppers_enabled;
184 184
       break;
185 185
     case 'A':
@@ -245,7 +245,7 @@ void process_lcd_p_command(const char* command) {
245 245
       break;
246 246
     case 'H':
247 247
       // Home all axis
248
-      enqueue_and_echo_command_now("G28");
248
+      enqueue_and_echo_commands_now_P(PSTR("G28"));
249 249
       break;
250 250
     default: {
251 251
       // Print file 000 - a three digit number indicating which

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp 查看文件

@@ -1719,7 +1719,7 @@ void kill_screen(const char* lcd_msg) {
1719 1719
 
1720 1720
     void lcd_enqueue_commands_P(const char * const cmd) {
1721 1721
       no_reentry = true;
1722
-      enqueue_and_echo_commands_P_now(cmd);
1722
+      enqueue_and_echo_commands_now_P(cmd);
1723 1723
       no_reentry = false;
1724 1724
     }
1725 1725
 

正在加载...
取消
保存