Browse Source

write_command changes input

Scott Lahteine 4 years ago
parent
commit
e3116eed2e
2 changed files with 5 additions and 5 deletions
  1. 4
    4
      Marlin/src/sd/cardreader.cpp
  2. 1
    1
      Marlin/src/sd/cardreader.h

+ 4
- 4
Marlin/src/sd/cardreader.cpp View File

@@ -722,10 +722,10 @@ void CardReader::report_status() {
722 722
     SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING);
723 723
 }
724 724
 
725
-void CardReader::write_command(const char * const buf) {
726
-  char *begin = buf;
727
-  char *npos = nullptr;
728
-  char *end = buf + strlen(buf) - 1;
725
+void CardReader::write_command(char * const buf) {
726
+  char *begin = buf,
727
+       *npos = nullptr,
728
+       *end = buf + strlen(buf) - 1;
729 729
 
730 730
   file.writeError = false;
731 731
   if ((npos = strchr(buf, 'N'))) {

+ 1
- 1
Marlin/src/sd/cardreader.h View File

@@ -92,7 +92,7 @@ public:
92 92
 
93 93
   // SD Card Logging
94 94
   static void openLogFile(const char * const path);
95
-  static void write_command(const char * const buf);
95
+  static void write_command(char * const buf);
96 96
 
97 97
   #if DISABLED(NO_SD_AUTOSTART)     // Auto-Start auto#.g file handling
98 98
     static uint8_t autofile_index;  // Next auto#.g index to run, plus one. Ignored by autofile_check when zero.

Loading…
Cancel
Save