Procházet zdrojové kódy

Clear LCD to welcome_msg if not printing

The welcome message is more appropriate than “resuming print” if
nothing is printing.
Scott Lahteine před 10 roky
rodič
revize
d12b24758a
1 změnil soubory, kde provedl 7 přidání a 5 odebrání
  1. 7
    5
      Marlin/Marlin_main.cpp

+ 7
- 5
Marlin/Marlin_main.cpp Zobrazit soubor

@@ -1385,7 +1385,7 @@ void process_commands()
1385 1385
       st_synchronize();
1386 1386
       codenum += millis();  // keep track of when we started waiting
1387 1387
       previous_millis_cmd = millis();
1388
-      while(millis()  < codenum ){
1388
+      while(millis() < codenum) {
1389 1389
         manage_heater();
1390 1390
         manage_inactivity();
1391 1391
         lcd_update();
@@ -1413,7 +1413,6 @@ void process_commands()
1413 1413
       plan_bed_level_matrix.set_to_identity();  //Reset the plane ("erase" all leveling data)
1414 1414
 #endif //ENABLE_AUTO_BED_LEVELING
1415 1415
 
1416
-
1417 1416
       saved_feedrate = feedrate;
1418 1417
       saved_feedmultiply = feedmultiply;
1419 1418
       feedmultiply = 100;
@@ -1874,9 +1873,9 @@ void process_commands()
1874 1873
       if (hasS) codenum = code_value() * 1000; // seconds to wait
1875 1874
 
1876 1875
       if (!hasP && !hasS && *src != '\0') {
1877
-        while (*src == ' ') ++src;
1878 1876
         starpos = strchr(src, '*');
1879 1877
         if (starpos != NULL) *(starpos) = '\0';
1878
+        while (*src == ' ') ++src;
1880 1879
         lcd_setstatus(src);
1881 1880
       } else {
1882 1881
         LCD_MESSAGEPGM(MSG_USERWAIT);
@@ -1887,7 +1886,7 @@ void process_commands()
1887 1886
       previous_millis_cmd = millis();
1888 1887
       if (codenum > 0){
1889 1888
         codenum += millis();  // keep track of when we started waiting
1890
-        while(millis()  < codenum && !lcd_clicked()){
1889
+        while(millis() < codenum && !lcd_clicked()){
1891 1890
           manage_heater();
1892 1891
           manage_inactivity();
1893 1892
           lcd_update();
@@ -1900,7 +1899,10 @@ void process_commands()
1900 1899
           lcd_update();
1901 1900
         }
1902 1901
       }
1903
-      LCD_MESSAGEPGM(MSG_RESUMING);
1902
+      if (IS_SD_PRINTING)
1903
+        LCD_MESSAGEPGM(MSG_RESUMING);
1904
+      else
1905
+        LCD_MESSAGEPGM(WELCOME_MSG);
1904 1906
     }
1905 1907
     break;
1906 1908
 #endif

Loading…
Zrušit
Uložit