|
@@ -107,6 +107,7 @@
|
107
|
107
|
// M302 - Allow cold extrudes
|
108
|
108
|
// M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
|
109
|
109
|
// M400 - Finish all moves
|
|
110
|
+// M401 - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
|
110
|
111
|
// M500 - stores paramters in EEPROM
|
111
|
112
|
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
112
|
113
|
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
|
@@ -596,6 +597,7 @@ void process_commands()
|
596
|
597
|
while(millis() < codenum ){
|
597
|
598
|
manage_heater();
|
598
|
599
|
manage_inactivity(1);
|
|
600
|
+ LCD_STATUS;
|
599
|
601
|
}
|
600
|
602
|
break;
|
601
|
603
|
case 28: //G28 Home all Axis one at a time
|
|
@@ -1259,11 +1261,37 @@ void process_commands()
|
1259
|
1261
|
PID_autotune(temp);
|
1260
|
1262
|
}
|
1261
|
1263
|
break;
|
1262
|
|
- case 400: // finish all moves
|
|
1264
|
+ case 400: // M400 finish all moves
|
1263
|
1265
|
{
|
1264
|
1266
|
st_synchronize();
|
1265
|
1267
|
}
|
1266
|
1268
|
break;
|
|
1269
|
+#ifdef ULTRA_LCD
|
|
1270
|
+ case 401: // M401 - Wait for user button press on LCD
|
|
1271
|
+ {
|
|
1272
|
+ LCD_MESSAGEPGM(MSG_USERWAIT);
|
|
1273
|
+ codenum = 0;
|
|
1274
|
+ if(code_seen('P')) codenum = code_value(); // milliseconds to wait
|
|
1275
|
+ if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
|
|
1276
|
+
|
|
1277
|
+ st_synchronize();
|
|
1278
|
+ previous_millis_cmd = millis();
|
|
1279
|
+ if (codenum > 0)
|
|
1280
|
+ {
|
|
1281
|
+ codenum += millis(); // keep track of when we started waiting
|
|
1282
|
+ while(millis() < codenum && buttons == 0){
|
|
1283
|
+ manage_heater();
|
|
1284
|
+ manage_inactivity(1);
|
|
1285
|
+ }
|
|
1286
|
+ }else{
|
|
1287
|
+ while(buttons == 0) {
|
|
1288
|
+ manage_heater();
|
|
1289
|
+ manage_inactivity(1);
|
|
1290
|
+ }
|
|
1291
|
+ }
|
|
1292
|
+ }
|
|
1293
|
+ break;
|
|
1294
|
+#endif
|
1267
|
1295
|
case 500: // Store settings in EEPROM
|
1268
|
1296
|
{
|
1269
|
1297
|
EEPROM_StoreSettings();
|