preparation for hibernation

If a print is stopped, it would be nice in the future to write a file with the printer state, the filename of the print, and the position within the print.
this file could be read, to continue a previously stopped print.
not finished yet.
This commit is contained in:
bkubicek 2013-10-22 10:04:08 +02:00
parent ab965376ff
commit 39d88bcccb
2 changed files with 11 additions and 2 deletions

View file

@ -535,12 +535,21 @@ void CardReader::checkautostart(bool force)
lastnr++;
}
void CardReader::closefile()
void CardReader::closefile(bool store_location)
{
file.sync();
file.close();
saving = false;
logging = false;
if(store_location)
{
//future: store printer state, filename and position for continueing a stoped print
// so one can unplug the printer and continue printing the next day.
}
}
void CardReader::getfilename(const uint8_t nr)

View file

@ -21,7 +21,7 @@ public:
void openFile(char* name,bool read,bool replace_current=true);
void openLogFile(char* name);
void removeFile(char* name);
void closefile();
void closefile(bool store_location=false);
void release();
void startFileprint();
void pauseSDPrint();