Przeglądaj źródła

Fix up enqueue now functions

…and apply to MALYAN_LCD.
Scott Lahteine 7 lat temu
rodzic
commit
78ea4871f9

+ 3
- 3
Marlin/src/gcode/queue.cpp Wyświetl plik

176
   /**
176
   /**
177
    * Enqueue and return only when commands are actually enqueued
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
   #if HAS_LCD_QUEUE_NOW
182
   #if HAS_LCD_QUEUE_NOW
183
     /**
183
     /**
184
      * Enqueue from program memory and return only when commands are actually enqueued
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
       enqueue_and_echo_commands_P(pgcode);
187
       enqueue_and_echo_commands_P(pgcode);
188
       while (drain_injected_commands_P()) idle();
188
       while (drain_injected_commands_P()) idle();
189
     }
189
     }

+ 3
- 3
Marlin/src/gcode/queue.h Wyświetl plik

97
  */
97
  */
98
 bool enqueue_and_echo_command(const char* cmd, bool say_ok=false);
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
 #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW)
101
 #define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW)
102
 
102
 
103
 #if HAS_QUEUE_NOW
103
 #if HAS_QUEUE_NOW
104
   /**
104
   /**
105
    * Enqueue and return only when commands are actually enqueued
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
   #if HAS_LCD_QUEUE_NOW
108
   #if HAS_LCD_QUEUE_NOW
109
     /**
109
     /**
110
      * Enqueue from program memory and return only when commands are actually enqueued
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
   #endif
113
   #endif
114
 #endif
114
 #endif
115
 
115
 

+ 5
- 5
Marlin/src/lcd/malyanlcd.cpp Wyświetl plik

109
       // M104 S<temperature>
109
       // M104 S<temperature>
110
       char cmd[20];
110
       char cmd[20];
111
       sprintf_P(cmd, PSTR("M104 S%s"), command + 1);
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
     } break;
113
     } break;
114
 
114
 
115
     case 'P': {
115
     case 'P': {
116
       // M140 S<temperature>
116
       // M140 S<temperature>
117
       char cmd[20];
117
       char cmd[20];
118
       sprintf_P(cmd, PSTR("M140 S%s"), command + 1);
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
     } break;
120
     } break;
121
 
121
 
122
     default:
122
     default:
178
     case 'E':
178
     case 'E':
179
       // enable or disable steppers
179
       // enable or disable steppers
180
       // switch to relative
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
       steppers_enabled = !steppers_enabled;
183
       steppers_enabled = !steppers_enabled;
184
       break;
184
       break;
185
     case 'A':
185
     case 'A':
245
       break;
245
       break;
246
     case 'H':
246
     case 'H':
247
       // Home all axis
247
       // Home all axis
248
-      enqueue_and_echo_command_now("G28");
248
+      enqueue_and_echo_commands_now_P(PSTR("G28"));
249
       break;
249
       break;
250
     default: {
250
     default: {
251
       // Print file 000 - a three digit number indicating which
251
       // Print file 000 - a three digit number indicating which

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz