Browse Source

Don't return "Not SD printing" in case that SD card print is paused

PavelSindler 6 năm trước cách đây
mục cha
commit
1077895fd4
2 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 1 1
      Firmware/Marlin.h
  2. 4 1
      Firmware/cardreader.cpp

+ 1 - 1
Firmware/Marlin.h

@@ -357,7 +357,7 @@ extern uint8_t print_percent_done_silent;
 extern uint16_t print_time_remaining_silent;
 #define PRINT_TIME_REMAINING_INIT 65535
 #define PRINT_PERCENT_DONE_INIT 255
-#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == 4) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL))
+#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == 4) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused)
 
 extern void calculate_extruder_multipliers();
 

+ 4 - 1
Firmware/cardreader.cpp

@@ -523,8 +523,11 @@ void CardReader::getStatus()
     SERIAL_PROTOCOL(itostr2(time%60));
     SERIAL_PROTOCOLPGM("\n");
   }
+  else if (paused) {
+	SERIAL_PROTOCOLLNPGM("SD print paused");
+  }
   else if (saved_printing) {
-	  SERIAL_PROTOCOLLNPGM("Print saved");
+	SERIAL_PROTOCOLLNPGM("Print saved");
   }
   else {
     SERIAL_PROTOCOLLNPGM("Not SD printing");