Skip to content

Commit

Permalink
Simply run M31 at the end of an SD print
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 14, 2016
1 parent 23d2bc5 commit 34da77d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,12 +1170,6 @@ inline void get_serial_commands() {
if (card_eof) {
SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
print_job_timer.stop();
char time[30];
millis_t t = print_job_timer.duration();
sprintf_P(time, PSTR("%i " MSG_END_HOUR " %i " MSG_END_MINUTE), int(t / 60 / 60), int(t / 60) % 60);
SERIAL_ECHO_START;
SERIAL_ECHOLN(time);
lcd_setstatus(time, true);
card.printingHasFinished();
card.checkautostart(true);
}
Expand Down
6 changes: 3 additions & 3 deletions Marlin/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,19 +602,19 @@ void CardReader::updir() {

void CardReader::printingHasFinished() {
stepper.synchronize();
file.close();
if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure.
file.close();
file_subcall_ctr--;
openFile(proc_filenames[file_subcall_ctr], true, true);
setIndex(filespos[file_subcall_ctr]);
startFileprint();
}
else {
file.close();
sdprinting = false;
if (SD_FINISHED_STEPPERRELEASE)
enqueue_and_echo_commands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
thermalManager.autotempShutdown();
print_job_timer.stop();
enqueue_and_echo_commands_P(PSTR("M31"));
}
}

Expand Down

0 comments on commit 34da77d

Please sign in to comment.