Browse Source

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

pull/1/head
Bernhard 13 years ago
parent
commit
6d6f323535
  1. 1
      Marlin/Configuration.h
  2. 1
      Marlin/cardreader.h
  3. 11
      Marlin/cardreader.pde
  4. 2
      Marlin/ultralcd.pde

1
Marlin/Configuration.h

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

1
Marlin/cardreader.h

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

11
Marlin/cardreader.pde

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

2
Marlin/ultralcd.pde

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

Loading…
Cancel
Save