Browse Source

Use card.stopSDPrint() for completeness

Scott Lahteine 6 years ago
parent
commit
4f72e041f2
2 changed files with 3 additions and 4 deletions
  1. 1
    2
      Marlin/src/module/endstops.cpp
  2. 2
    2
      Marlin/src/sd/cardreader.cpp

+ 1
- 2
Marlin/src/module/endstops.cpp View File

358
 
358
 
359
     #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
359
     #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
360
       if (planner.abort_on_endstop_hit) {
360
       if (planner.abort_on_endstop_hit) {
361
-        card.sdprinting = false;
362
-        card.closefile();
361
+        card.stopSDPrint();
363
         quickstop_stepper();
362
         quickstop_stepper();
364
         thermalManager.disable_all_heaters();
363
         thermalManager.disable_all_heaters();
365
         print_job_timer.stop();
364
         print_job_timer.stop();

+ 2
- 2
Marlin/src/sd/cardreader.cpp View File

326
 }
326
 }
327
 
327
 
328
 void CardReader::release() {
328
 void CardReader::release() {
329
-  sdprinting = false;
329
+  stopSDPrint();
330
   cardOK = false;
330
   cardOK = false;
331
 }
331
 }
332
 
332
 
947
     startFileprint();
947
     startFileprint();
948
   }
948
   }
949
   else {
949
   else {
950
-    sdprinting = false;
950
+    stopSDPrint();
951
 
951
 
952
     #if ENABLED(POWER_LOSS_RECOVERY)
952
     #if ENABLED(POWER_LOSS_RECOVERY)
953
       removeJobRecoveryFile();
953
       removeJobRecoveryFile();

Loading…
Cancel
Save