|
@@ -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;
|
|
@@ -1863,20 +1862,39 @@ void process_commands()
|
1863
|
1862
|
case 0: // M0 - Unconditional stop - Wait for user button press on LCD
|
1864
|
1863
|
case 1: // M1 - Conditional stop - Wait for user button press on LCD
|
1865
|
1864
|
{
|
1866
|
|
- LCD_MESSAGEPGM(MSG_USERWAIT);
|
|
1865
|
+ char *src = strchr_pointer + 2;
|
|
1866
|
+
|
1867
|
1867
|
codenum = 0;
|
1868
|
|
- if(code_seen('P')) codenum = code_value(); // milliseconds to wait
|
1869
|
|
- if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
|
1870
|
1868
|
|
|
1869
|
+ bool hasP = false, hasS = false;
|
|
1870
|
+ if (code_seen('P')) {
|
|
1871
|
+ codenum = code_value(); // milliseconds to wait
|
|
1872
|
+ hasP = codenum > 0;
|
|
1873
|
+ }
|
|
1874
|
+ if (code_seen('S')) {
|
|
1875
|
+ codenum = code_value() * 1000; // seconds to wait
|
|
1876
|
+ hasS = codenum > 0;
|
|
1877
|
+ }
|
|
1878
|
+ if (!hasP && !hasS && *src != '\0') {
|
|
1879
|
+ starpos = strchr(src, '*');
|
|
1880
|
+ if (starpos != NULL) *(starpos) = '\0';
|
|
1881
|
+ while (*src == ' ') ++src;
|
|
1882
|
+ lcd_setstatus(src);
|
|
1883
|
+ } else {
|
|
1884
|
+ LCD_MESSAGEPGM(MSG_USERWAIT);
|
|
1885
|
+ }
|
|
1886
|
+
|
|
1887
|
+ lcd_ignore_click();
|
1871
|
1888
|
st_synchronize();
|
1872
|
1889
|
previous_millis_cmd = millis();
|
1873
|
1890
|
if (codenum > 0){
|
1874
|
1891
|
codenum += millis(); // keep track of when we started waiting
|
1875
|
|
- while(millis() < codenum && !lcd_clicked()){
|
|
1892
|
+ while(millis() < codenum && !lcd_clicked()){
|
1876
|
1893
|
manage_heater();
|
1877
|
1894
|
manage_inactivity();
|
1878
|
1895
|
lcd_update();
|
1879
|
1896
|
}
|
|
1897
|
+ lcd_ignore_click(false);
|
1880
|
1898
|
}else{
|
1881
|
1899
|
while(!lcd_clicked()){
|
1882
|
1900
|
manage_heater();
|
|
@@ -1884,7 +1902,10 @@ void process_commands()
|
1884
|
1902
|
lcd_update();
|
1885
|
1903
|
}
|
1886
|
1904
|
}
|
1887
|
|
- LCD_MESSAGEPGM(MSG_RESUMING);
|
|
1905
|
+ if (IS_SD_PRINTING)
|
|
1906
|
+ LCD_MESSAGEPGM(MSG_RESUMING);
|
|
1907
|
+ else
|
|
1908
|
+ LCD_MESSAGEPGM(WELCOME_MSG);
|
1888
|
1909
|
}
|
1889
|
1910
|
break;
|
1890
|
1911
|
#endif
|