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

View File

@ -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();

View File

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

View File

@ -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();