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

master
Bernhard 13 years ago
parent 4d6a5c29df
commit 6d6f323535

@ -281,6 +281,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
//LCD and SD support
//#define ULTRA_LCD //general lcd support, also 16x2
//#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
#ifdef ULTIPANEL

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

@ -2,6 +2,8 @@
//#include <unistd.h>
#ifdef SDSUPPORT
#include "Configuration.h"
CardReader::CardReader()
{
filesize = 0;
@ -426,4 +428,13 @@ void CardReader::updir()
}
}
void CardReader::printingHasFinished()
{
sdprinting = false;
if(SD_FINISHED_STEPPERRELEASE)
{
finishAndDisableSteppers();
}
}
#endif //SDSUPPORT

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

Loading…
Cancel
Save