Fix M32 P subroutine handling

This commit is contained in:
Scott Lahteine
2017-11-15 00:15:57 -06:00
parent 9f8b4c5ee8
commit e0d367f1fb
4 changed files with 64 additions and 43 deletions

View File

@ -361,19 +361,25 @@ inline void get_serial_commands() {
|| ((sd_char == '#' || sd_char == ':') && !sd_comment_mode)
) {
if (card_eof) {
SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
card.printingHasFinished();
#if ENABLED(PRINTER_EVENT_LEDS)
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
set_led_color(0, 255, 0); // Green
#if HAS_RESUME_CONTINUE
enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue!
#else
safe_delay(1000);
if (card.sdprinting)
sd_count = 0; // If a sub-file was printing, continue from call point
else {
SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
#if ENABLED(PRINTER_EVENT_LEDS)
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
set_led_color(0, 255, 0); // Green
#if HAS_RESUME_CONTINUE
enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue!
#else
safe_delay(1000);
#endif
set_led_color(0, 0, 0); // OFF
#endif
set_led_color(0, 0, 0); // OFF
#endif
card.checkautostart(true);
card.checkautostart(true);
}
}
else if (n == -1) {
SERIAL_ERROR_START();