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
7681711e7e
1 changed files with 8 additions and 6 deletions
  1. 8
    6
      Marlin/Marlin_main.cpp

+ 8
- 6
Marlin/Marlin_main.cpp View File

1363
       st_synchronize();
1363
       st_synchronize();
1364
       codenum += millis();  // keep track of when we started waiting
1364
       codenum += millis();  // keep track of when we started waiting
1365
       previous_millis_cmd = millis();
1365
       previous_millis_cmd = millis();
1366
-      while(millis()  < codenum ){
1366
+      while(millis() < codenum) {
1367
         manage_heater();
1367
         manage_heater();
1368
         manage_inactivity();
1368
         manage_inactivity();
1369
         lcd_update();
1369
         lcd_update();
1391
       plan_bed_level_matrix.set_to_identity();  //Reset the plane ("erase" all leveling data)
1391
       plan_bed_level_matrix.set_to_identity();  //Reset the plane ("erase" all leveling data)
1392
 #endif //ENABLE_AUTO_BED_LEVELING
1392
 #endif //ENABLE_AUTO_BED_LEVELING
1393
 
1393
 
1394
-
1395
       saved_feedrate = feedrate;
1394
       saved_feedrate = feedrate;
1396
       saved_feedmultiply = feedmultiply;
1395
       saved_feedmultiply = feedmultiply;
1397
       feedmultiply = 100;
1396
       feedmultiply = 100;
1437
 #else // NOT DELTA
1436
 #else // NOT DELTA
1438
 
1437
 
1439
       home_all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS])));
1438
       home_all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS])));
1440
-	  
1439
+
1441
       #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
1440
       #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
1442
       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1441
       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1443
         HOMEAXIS(Z);
1442
         HOMEAXIS(Z);
1852
       if (hasS) codenum = code_value() * 1000; // seconds to wait
1851
       if (hasS) codenum = code_value() * 1000; // seconds to wait
1853
 
1852
 
1854
       if (!hasP && !hasS && *src != '\0') {
1853
       if (!hasP && !hasS && *src != '\0') {
1855
-        while (*src == ' ') ++src;
1856
         starpos = strchr(src, '*');
1854
         starpos = strchr(src, '*');
1857
         if (starpos != NULL) *(starpos) = '\0';
1855
         if (starpos != NULL) *(starpos) = '\0';
1856
+        while (*src == ' ') ++src;
1858
         lcd_setstatus(src);
1857
         lcd_setstatus(src);
1859
       } else {
1858
       } else {
1860
         LCD_MESSAGEPGM(MSG_USERWAIT);
1859
         LCD_MESSAGEPGM(MSG_USERWAIT);
1865
       previous_millis_cmd = millis();
1864
       previous_millis_cmd = millis();
1866
       if (codenum > 0){
1865
       if (codenum > 0){
1867
         codenum += millis();  // keep track of when we started waiting
1866
         codenum += millis();  // keep track of when we started waiting
1868
-        while(millis()  < codenum && !lcd_clicked()){
1867
+        while(millis() < codenum && !lcd_clicked()){
1869
           manage_heater();
1868
           manage_heater();
1870
           manage_inactivity();
1869
           manage_inactivity();
1871
           lcd_update();
1870
           lcd_update();
1878
           lcd_update();
1877
           lcd_update();
1879
         }
1878
         }
1880
       }
1879
       }
1881
-      LCD_MESSAGEPGM(MSG_RESUMING);
1880
+      if (IS_SD_PRINTING)
1881
+        LCD_MESSAGEPGM(MSG_RESUMING);
1882
+      else
1883
+        LCD_MESSAGEPGM(WELCOME_MSG);
1882
     }
1884
     }
1883
     break;
1885
     break;
1884
 #endif
1886
 #endif

Loading…
Cancel
Save