make an option if sd-card stop should release the steppers.
This commit is contained in:
parent
4d6a5c29df
commit
6d6f323535
4 changed files with 15 additions and 2 deletions
|
@ -281,6 +281,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
||||||
//LCD and SD support
|
//LCD and SD support
|
||||||
//#define ULTRA_LCD //general lcd support, also 16x2
|
//#define ULTRA_LCD //general lcd support, also 16x2
|
||||||
//#define SDSUPPORT // Enable SD Card Support in Hardware Console
|
//#define SDSUPPORT // Enable SD Card Support in Hardware Console
|
||||||
|
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
|
||||||
|
|
||||||
//#define ULTIPANEL
|
//#define ULTIPANEL
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define __CARDREADERH
|
#define __CARDREADERH
|
||||||
|
|
||||||
#ifdef SDSUPPORT
|
#ifdef SDSUPPORT
|
||||||
|
|
||||||
#include "SdFile.h"
|
#include "SdFile.h"
|
||||||
enum LsAction {LS_SerialPrint,LS_Count,LS_GetFilename};
|
enum LsAction {LS_SerialPrint,LS_Count,LS_GetFilename};
|
||||||
class CardReader
|
class CardReader
|
||||||
|
@ -22,6 +22,7 @@ public:
|
||||||
void startFileprint();
|
void startFileprint();
|
||||||
void pauseSDPrint();
|
void pauseSDPrint();
|
||||||
void getStatus();
|
void getStatus();
|
||||||
|
void printingHasFinished();
|
||||||
|
|
||||||
void getfilename(const uint8_t nr);
|
void getfilename(const uint8_t nr);
|
||||||
uint16_t getnrfilenames();
|
uint16_t getnrfilenames();
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
//#include <unistd.h>
|
//#include <unistd.h>
|
||||||
#ifdef SDSUPPORT
|
#ifdef SDSUPPORT
|
||||||
|
|
||||||
|
#include "Configuration.h"
|
||||||
|
|
||||||
CardReader::CardReader()
|
CardReader::CardReader()
|
||||||
{
|
{
|
||||||
filesize = 0;
|
filesize = 0;
|
||||||
|
@ -426,4 +428,13 @@ void CardReader::updir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CardReader::printingHasFinished()
|
||||||
|
{
|
||||||
|
sdprinting = false;
|
||||||
|
if(SD_FINISHED_STEPPERRELEASE)
|
||||||
|
{
|
||||||
|
finishAndDisableSteppers();
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif //SDSUPPORT
|
#endif //SDSUPPORT
|
|
@ -1471,7 +1471,7 @@ void MainMenu::showMainMenu()
|
||||||
#endif
|
#endif
|
||||||
if((activeline==line)&&CLICKED)
|
if((activeline==line)&&CLICKED)
|
||||||
{
|
{
|
||||||
card.sdprinting = false;
|
card.printingHasFinished();
|
||||||
BLOCK;
|
BLOCK;
|
||||||
status=Main_SD;
|
status=Main_SD;
|
||||||
beepshort();
|
beepshort();
|
||||||
|
|
Reference in a new issue