Cardreader read/write open methods
This commit is contained in:
@ -36,7 +36,7 @@
|
||||
void GcodeSuite::M23() {
|
||||
// Simplify3D includes the size, so zero out all spaces (#7227)
|
||||
for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0';
|
||||
card.openFile(parser.string_arg, true);
|
||||
card.openFileRead(parser.string_arg);
|
||||
|
||||
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
|
||||
ui.set_progress(0);
|
||||
|
@ -54,11 +54,11 @@ void GcodeSuite::M28() {
|
||||
#endif
|
||||
}
|
||||
else
|
||||
card.openFile(p, false);
|
||||
card.openFileWrite(p);
|
||||
|
||||
#else
|
||||
|
||||
card.openFile(parser.string_arg, false);
|
||||
card.openFileWrite(parser.string_arg);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -26,8 +26,7 @@
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../sd/cardreader.h"
|
||||
#include "../../module/printcounter.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/planner.h" // for synchronize()
|
||||
|
||||
#include "../../Marlin.h" // for startOrResumeJob
|
||||
|
||||
@ -45,9 +44,9 @@ void GcodeSuite::M32() {
|
||||
if (IS_SD_PRINTING()) planner.synchronize();
|
||||
|
||||
if (card.isMounted()) {
|
||||
const bool call_procedure = parser.boolval('P');
|
||||
const uint8_t call_procedure = parser.boolval('P');
|
||||
|
||||
card.openFile(parser.string_arg, true, call_procedure);
|
||||
card.openFileRead(parser.string_arg, call_procedure);
|
||||
|
||||
if (parser.seenval('S')) card.setIndex(parser.value_long());
|
||||
|
||||
|
Reference in New Issue
Block a user