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,8 +358,7 @@ void Endstops::event_handler() {
358 358
 
359 359
     #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
360 360
       if (planner.abort_on_endstop_hit) {
361
-        card.sdprinting = false;
362
-        card.closefile();
361
+        card.stopSDPrint();
363 362
         quickstop_stepper();
364 363
         thermalManager.disable_all_heaters();
365 364
         print_job_timer.stop();

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

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

Loading…
Cancel
Save