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

This commit is contained in:
Bernhard 2011-11-26 11:51:38 +01:00
parent 4d6a5c29df
commit 6d6f323535
4 changed files with 15 additions and 2 deletions

View file

@ -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

View file

@ -22,6 +22,7 @@ public:
void startFileprint();
void pauseSDPrint();
void getStatus();
void printingHasFinished();
void getfilename(const uint8_t nr);
uint16_t getnrfilenames();

View file

@ -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

View file

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