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

Method gcode_line_error

Marlin/src/gcode/queue.cpp:320–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318#endif // (ARDUINO_ARCH_STM32F4 || ARDUINO_ARCH_STM32) && USBCON
319
320void GCodeQueue::gcode_line_error(FSTR_P const ferr, const serial_index_t serial_ind) {
321 PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command
322 SERIAL_ERROR_START();
323 SERIAL_ECHOLN(ferr, serial_state[serial_ind.index].last_N);
324 while (read_serial(serial_ind) != -1) { /* nada */ } // Clear out the RX buffer. Why don't use flush here ?
325 flush_and_request_resend(serial_ind);
326 serial_state[serial_ind.index].count = 0;
327}
328
329FORCE_INLINE bool is_M29(const char * const cmd) { // matches "M29" & "M29 ", but not "M290", etc
330 const char * const m29 = strstr_P(cmd, PSTR("M29"));

Callers

nothing calls this directly

Calls 3

SERIAL_ERROR_STARTFunction · 0.85
read_serialFunction · 0.85
SERIAL_ECHOLNFunction · 0.50

Tested by

no test coverage detected