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.
master
bkubicek 11 years ago
parent ab965376ff
commit 39d88bcccb

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

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

Loading…
Cancel
Save