Fix CardReader string args
This commit is contained in:
parent
9165749321
commit
98d6c751d3
@ -515,7 +515,7 @@ void CardReader::endFilePrint(TERN_(SD_RESORT, const bool re_sort/*=false*/)) {
|
|||||||
TERN_(SD_RESORT, if (re_sort) presort());
|
TERN_(SD_RESORT, if (re_sort) presort());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardReader::openLogFile(char * const path) {
|
void CardReader::openLogFile(const char * const path) {
|
||||||
flag.logging = DISABLED(SDCARD_READONLY);
|
flag.logging = DISABLED(SDCARD_READONLY);
|
||||||
IF_DISABLED(SDCARD_READONLY, openFileWrite(path));
|
IF_DISABLED(SDCARD_READONLY, openFileWrite(path));
|
||||||
}
|
}
|
||||||
@ -634,7 +634,7 @@ inline void echo_write_to_file(const char * const fname) {
|
|||||||
//
|
//
|
||||||
// Open a file by DOS path for write
|
// Open a file by DOS path for write
|
||||||
//
|
//
|
||||||
void CardReader::openFileWrite(char * const path) {
|
void CardReader::openFileWrite(const char * const path) {
|
||||||
if (!isMounted()) return;
|
if (!isMounted()) return;
|
||||||
|
|
||||||
announceOpen(2, path);
|
announceOpen(2, path);
|
||||||
@ -722,7 +722,7 @@ void CardReader::report_status() {
|
|||||||
SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING);
|
SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardReader::write_command(char * const buf) {
|
void CardReader::write_command(const char * const buf) {
|
||||||
char *begin = buf;
|
char *begin = buf;
|
||||||
char *npos = nullptr;
|
char *npos = nullptr;
|
||||||
char *end = buf + strlen(buf) - 1;
|
char *end = buf + strlen(buf) - 1;
|
||||||
|
@ -91,8 +91,8 @@ public:
|
|||||||
static void manage_media();
|
static void manage_media();
|
||||||
|
|
||||||
// SD Card Logging
|
// SD Card Logging
|
||||||
static void openLogFile(char * const path);
|
static void openLogFile(const char * const path);
|
||||||
static void write_command(char * const buf);
|
static void write_command(const char * const buf);
|
||||||
|
|
||||||
#if DISABLED(NO_SD_AUTOSTART) // Auto-Start auto#.g file handling
|
#if DISABLED(NO_SD_AUTOSTART) // Auto-Start auto#.g file handling
|
||||||
static uint8_t autofile_index; // Next auto#.g index to run, plus one. Ignored by autofile_check when zero.
|
static uint8_t autofile_index; // Next auto#.g index to run, plus one. Ignored by autofile_check when zero.
|
||||||
@ -103,7 +103,7 @@ public:
|
|||||||
|
|
||||||
// Basic file ops
|
// Basic file ops
|
||||||
static void openFileRead(char * const path, const uint8_t subcall=0);
|
static void openFileRead(char * const path, const uint8_t subcall=0);
|
||||||
static void openFileWrite(char * const path);
|
static void openFileWrite(const char * const path);
|
||||||
static void closefile(const bool store_location=false);
|
static void closefile(const bool store_location=false);
|
||||||
static bool fileExists(const char * const name);
|
static bool fileExists(const char * const name);
|
||||||
static void removeFile(const char * const name);
|
static void removeFile(const char * const name);
|
||||||
|
Loading…
Reference in New Issue
Block a user