Browse Source

Simplify printingHasFinished

Unswitch the call to file.close().

Do not call quickStop(): motion has already completed due to
st_synchronize.
Yuri D'Elia 2 years ago
parent
commit
3a1914f2fb
1 changed files with 2 additions and 3 deletions
  1. 2 3
      Firmware/cardreader.cpp

+ 2 - 3
Firmware/cardreader.cpp

@@ -1008,9 +1008,10 @@ void CardReader::flush_presort() {
 void CardReader::printingHasFinished()
 {
     st_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--;
       openFileReadFilteredGcode(filenames[file_subcall_ctr],true);
       setIndex(filespos[file_subcall_ctr]);
@@ -1018,8 +1019,6 @@ void CardReader::printingHasFinished()
     }
     else
     {
-      quickStop();
-      file.close();
       sdprinting = false;
       if(SD_FINISHED_STEPPERRELEASE)
       {