Add fast binary file transfer to SD card option (#12249)
This commit is contained in:
committed by
Scott Lahteine
parent
72d8adfd1e
commit
66d44c72c3
@ -33,6 +33,10 @@
|
||||
#include "../core/language.h"
|
||||
#include "../gcode/queue.h"
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#include "../feature/emergency_parser.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#include "../feature/power_loss_recovery.h"
|
||||
#endif
|
||||
@ -461,7 +465,11 @@ void CardReader::openFile(char * const path, const bool read, const bool subcall
|
||||
}
|
||||
else {
|
||||
saving = true;
|
||||
SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, path);
|
||||
getfilename(0, fname);
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
emergency_parser.disable();
|
||||
#endif
|
||||
SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, fname);
|
||||
lcd_setstatus(fname);
|
||||
}
|
||||
}
|
||||
@ -569,6 +577,9 @@ void CardReader::closefile(const bool store_location) {
|
||||
file.sync();
|
||||
file.close();
|
||||
saving = logging = false;
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
emergency_parser.enable();
|
||||
#endif
|
||||
|
||||
if (store_location) {
|
||||
//future: store printer state, filename and position for continuing a stopped print
|
||||
|
Reference in New Issue
Block a user