Selaa lähdekoodia

Fix M29 for Pronterface SD card upload (#13010)

jeffstaley 6 vuotta sitten
vanhempi
commit
0e0cc13650
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      Marlin/src/gcode/queue.cpp

+ 2
- 2
Marlin/src/gcode/queue.cpp Näytä tiedosto

630
           gcode_LastN = gcode_N;
630
           gcode_LastN = gcode_N;
631
         }
631
         }
632
         #if ENABLED(SDSUPPORT)
632
         #if ENABLED(SDSUPPORT)
633
-          else if (card.flag.saving && strcmp(command, "M29") != 0) // No line number with M29 in Pronterface
633
+          else if (card.flag.saving && command[0] == 'M' && command[1] == '2' && command[2] == '9' && (command[3] == '\0' || command[3] == ' '))
634
             return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
634
             return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
635
         #endif
635
         #endif
636
 
636
 
839
 
839
 
840
     if (card.flag.saving) {
840
     if (card.flag.saving) {
841
       char* command = command_queue[cmd_queue_index_r];
841
       char* command = command_queue[cmd_queue_index_r];
842
-      if (strstr_P(command, PSTR("M29"))) {
842
+      if (command[0] == 'M' && command[1] == '2' && command[2] == '9' && (command[3] == '\0' || command[3] == ' ')) {
843
         // M29 closes the file
843
         // M29 closes the file
844
         card.closefile();
844
         card.closefile();
845
         SERIAL_ECHOLNPGM(MSG_FILE_SAVED);
845
         SERIAL_ECHOLNPGM(MSG_FILE_SAVED);

Loading…
Peruuta
Tallenna