Kaynağa Gözat

make an option if sd-card stop should release the steppers.

Bernhard 12 yıl önce
ebeveyn
işleme
6d6f323535
4 değiştirilmiş dosya ile 15 ekleme ve 2 silme
  1. 1
    0
      Marlin/Configuration.h
  2. 2
    1
      Marlin/cardreader.h
  3. 11
    0
      Marlin/cardreader.pde
  4. 1
    1
      Marlin/ultralcd.pde

+ 1
- 0
Marlin/Configuration.h Dosyayı Görüntüle

@@ -281,6 +281,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
281 281
 //LCD and SD support
282 282
 //#define ULTRA_LCD  //general lcd support, also 16x2
283 283
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
284
+#define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
284 285
 
285 286
 //#define ULTIPANEL
286 287
 #ifdef ULTIPANEL

+ 2
- 1
Marlin/cardreader.h Dosyayı Görüntüle

@@ -2,7 +2,7 @@
2 2
 #define __CARDREADERH
3 3
 
4 4
 #ifdef SDSUPPORT
5
- 
5
+
6 6
 #include "SdFile.h"
7 7
 enum LsAction {LS_SerialPrint,LS_Count,LS_GetFilename};
8 8
 class CardReader
@@ -22,6 +22,7 @@ public:
22 22
   void startFileprint();
23 23
   void pauseSDPrint();
24 24
   void getStatus();
25
+  void printingHasFinished();
25 26
 
26 27
   void getfilename(const uint8_t nr);
27 28
   uint16_t getnrfilenames();

+ 11
- 0
Marlin/cardreader.pde Dosyayı Görüntüle

@@ -2,6 +2,8 @@
2 2
 //#include <unistd.h>
3 3
 #ifdef SDSUPPORT
4 4
 
5
+#include "Configuration.h"
6
+
5 7
 CardReader::CardReader()
6 8
 {
7 9
    filesize = 0;
@@ -426,4 +428,13 @@ void CardReader::updir()
426 428
   }
427 429
 }
428 430
 
431
+
432
+void CardReader::printingHasFinished()
433
+{
434
+ sdprinting = false;
435
+ if(SD_FINISHED_STEPPERRELEASE)
436
+ {
437
+   finishAndDisableSteppers();
438
+ }
439
+}
429 440
 #endif //SDSUPPORT

+ 1
- 1
Marlin/ultralcd.pde Dosyayı Görüntüle

@@ -1471,7 +1471,7 @@ void MainMenu::showMainMenu()
1471 1471
         #endif
1472 1472
         if((activeline==line)&&CLICKED)
1473 1473
         {
1474
-          card.sdprinting = false;
1474
+          card.printingHasFinished();
1475 1475
           BLOCK;
1476 1476
           status=Main_SD;
1477 1477
           beepshort();

Loading…
İptal
Kaydet