MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / enqueue_now_P

Method enqueue_now_P

Marlin/src/gcode/queue.cpp:216–229  ·  view source on GitHub ↗

* Enqueue from program memory and return only when commands are actually enqueued * Never call this from a G-code handler! */

Source from the content-addressed store, hash-verified

214 * Never call this from a G-code handler!
215 */
216void GCodeQueue::enqueue_now_P(PGM_P const pgcode) {
217 size_t i = 0;
218 PGM_P p = pgcode;
219 for (;;) {
220 char c;
221 while ((c = pgm_read_byte(&p[i])) && c != '\n') i++;
222 char cmd[i + 1];
223 memcpy_P(cmd, p, i);
224 cmd[i] = '\0';
225 enqueue_one_now(cmd);
226 if (!c) break;
227 p += i + 1;
228 }
229}
230
231/**
232 * Send an "ok" message to the host, indicating

Callers 4

levelControlMethod · 0.80
manualAssistLevelingMethod · 0.80
process_lcd_p_commandFunction · 0.80
handleDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected