Browse Source

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

Robert Pelnar 6 years ago
parent
commit
9ab6fbe3df
2 changed files with 8 additions and 3 deletions
  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;
    sdpos = 0;
    sdprinting = false;
    sdprinting = false;
    cardOK = false;
    cardOK = false;
+   paused = false;
    saving = false;
    saving = false;
    logging = false;
    logging = false;
    autostart_atmillis=0;
    autostart_atmillis=0;
@@ -243,9 +244,10 @@ void CardReader::startFileprint()
   if(cardOK)
   if(cardOK)
   {
   {
     sdprinting = true;
     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)
   if(sdprinting)
   {
   {
     sdprinting = false;
     sdprinting = false;
+	paused = true;
   }
   }
 }
 }
 
 
@@ -327,6 +330,7 @@ void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
     SERIAL_ECHOLN(name);
     SERIAL_ECHOLN(name);
   }
   }
   sdprinting = false;
   sdprinting = false;
+  paused = false;
   
   
  
  
   SdFile myDir;
   SdFile myDir;

+ 1 - 0
Firmware/cardreader.h

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