Bladeren bron

cardreader - new member "paused"
tmc2130 - decreased crash sensitivity for Y

Robert Pelnar 6 jaren geleden
bovenliggende
commit
9ab6fbe3df
2 gewijzigde bestanden met toevoegingen van 8 en 3 verwijderingen
  1. 7 3
      Firmware/cardreader.cpp
  2. 1 0
      Firmware/cardreader.h

+ 7 - 3
Firmware/cardreader.cpp

@@ -24,6 +24,7 @@ CardReader::CardReader()
    sdpos = 0;
    sdprinting = false;
    cardOK = false;
+   paused = false;
    saving = false;
    logging = false;
    autostart_atmillis=0;
@@ -243,9 +244,10 @@ void CardReader::startFileprint()
   if(cardOK)
   {
     sdprinting = true;
-    #ifdef SDCARD_SORT_ALPHA
-	 // flush_presort();
-    #endif
+	paused = false;
+	#ifdef SDCARD_SORT_ALPHA
+		//flush_presort();
+	#endif
   }
 }
 
@@ -254,6 +256,7 @@ void CardReader::pauseSDPrint()
   if(sdprinting)
   {
     sdprinting = false;
+	paused = true;
   }
 }
 
@@ -327,6 +330,7 @@ void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
     SERIAL_ECHOLN(name);
   }
   sdprinting = false;
+  paused = false;
   
  
   SdFile myDir;

+ 1 - 0
Firmware/cardreader.h

@@ -73,6 +73,7 @@ public:
   bool logging;
   bool sdprinting ;  
   bool cardOK ;
+  bool paused ;
   char filename[13];
   uint16_t creationTime, creationDate;
   uint32_t cluster, position;