Browse Source

Clear LCD to welcome_msg if not printing

The welcome message is more appropriate than “resuming print” if
nothing is printing.
Scott Lahteine 10 years ago
parent
commit
d12b24758a
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      Marlin/Marlin_main.cpp

+ 7
- 5
Marlin/Marlin_main.cpp View File

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

Loading…
Cancel
Save