Scott Lahteine 3 лет назад
Родитель
Сommit
5a6fc3e5b7
2 измененных файлов: 5 добавлений и 5 удалений
  1. 1
    1
      Marlin/src/gcode/sd/M1001.cpp
  2. 4
    4
      Marlin/src/sd/cardreader.cpp

+ 1
- 1
Marlin/src/gcode/sd/M1001.cpp Просмотреть файл

@@ -65,7 +65,7 @@
65 65
  */
66 66
 void GcodeSuite::M1001() {
67 67
   // If there's another auto#.g file to run...
68
-  if (TERN(NO_SD_AUTOSTART, false, !card.autofile_check())) return;
68
+  if (TERN(NO_SD_AUTOSTART, false, card.autofile_check())) return;
69 69
 
70 70
   // Purge the recovery file...
71 71
   TERN_(POWER_LOSS_RECOVERY, recovery.purge());

+ 4
- 4
Marlin/src/sd/cardreader.cpp Просмотреть файл

@@ -755,10 +755,10 @@ void CardReader::write_command(char * const buf) {
755 755
    *   - After finishing the previous auto#.g file
756 756
    *   - From the LCD command to begin the auto#.g files
757 757
    *
758
-   * Return 'true' if there was nothing to do
758
+   * Return 'true' if an auto file was started
759 759
    */
760 760
   bool CardReader::autofile_check() {
761
-    if (!autofile_index) return true;
761
+    if (!autofile_index) return false;
762 762
 
763 763
     if (!isMounted())
764 764
       mount();
@@ -773,11 +773,11 @@ void CardReader::write_command(char * const buf) {
773 773
         cdroot();
774 774
         openAndPrintFile(autoname);
775 775
         autofile_index++;
776
-        return false;
776
+        return true;
777 777
       }
778 778
     }
779 779
     autofile_cancel();
780
-    return true;
780
+    return false;
781 781
   }
782 782
 #endif
783 783
 

Загрузка…
Отмена
Сохранить