Browse Source

Simply run M31 at the end of an SD print

pull/1/head
Scott Lahteine 8 years ago
parent
commit
34da77dad3
  1. 6
      Marlin/Marlin_main.cpp
  2. 6
      Marlin/cardreader.cpp

6
Marlin/Marlin_main.cpp

@ -1170,12 +1170,6 @@ inline void get_serial_commands() {
if (card_eof) { if (card_eof) {
SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED); SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
print_job_timer.stop(); 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.printingHasFinished();
card.checkautostart(true); card.checkautostart(true);
} }

6
Marlin/cardreader.cpp

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

Loading…
Cancel
Save