Browse Source

SDCard print completion can use "M0"

pull/1/head
Scott Lahteine 8 years ago
parent
commit
1196e3ca59
  1. 5
      Marlin/Marlin_main.cpp
  2. 2
      Marlin/cardreader.cpp

5
Marlin/Marlin_main.cpp

@ -1182,10 +1182,7 @@ inline void get_serial_commands() {
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS); LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
set_led_color(0, 255, 0); // Green set_led_color(0, 255, 0); // Green
#if HAS_RESUME_CONTINUE #if HAS_RESUME_CONTINUE
KEEPALIVE_STATE(PAUSED_FOR_USER); enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue!
wait_for_user = true;
while (wait_for_user) idle();
KEEPALIVE_STATE(IN_HANDLER);
#else #else
safe_delay(1000); safe_delay(1000);
#endif #endif

2
Marlin/cardreader.cpp

@ -552,7 +552,7 @@ void CardReader::checkautostart(bool force) {
bool found = false; bool found = false;
while (root.readDir(p, NULL) > 0) { while (root.readDir(p, NULL) > 0) {
for (int8_t i = 0; i < (int8_t)strlen((char*)p.name); i++) p.name[i] = tolower(p.name[i]); for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) { if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
openAndPrintFile(autoname); openAndPrintFile(autoname);
found = true; found = true;

Loading…
Cancel
Save