Selaa lähdekoodia

Merge pull request #7772 from thinkyhead/bf1_user_menu_return

[1.1.x] User menu return-to-status option
Scott Lahteine 7 vuotta sitten
vanhempi
commit
3a8923be74
30 muutettua tiedostoa jossa 50 lisäystä ja 1 poistoa
  1. 1
    0
      Marlin/Configuration_adv.h
  2. 1
    0
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
  3. 1
    0
      Marlin/example_configurations/Anet/A6/Configuration_adv.h
  4. 1
    0
      Marlin/example_configurations/Anet/A8/Configuration_adv.h
  5. 1
    0
      Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
  6. 1
    0
      Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
  7. 1
    0
      Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h
  8. 1
    0
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  9. 1
    0
      Marlin/example_configurations/Creality/CR-10/Configuration_adv.h
  10. 1
    0
      Marlin/example_configurations/Felix/Configuration_adv.h
  11. 1
    0
      Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h
  12. 1
    0
      Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h
  13. 1
    0
      Marlin/example_configurations/Malyan/M150/Configuration_adv.h
  14. 1
    0
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  15. 1
    0
      Marlin/example_configurations/SCARA/Configuration_adv.h
  16. 1
    0
      Marlin/example_configurations/Sanguinololu/Configuration_adv.h
  17. 1
    0
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  18. 1
    0
      Marlin/example_configurations/Velleman/K8200/Configuration_adv.h
  19. 1
    0
      Marlin/example_configurations/Velleman/K8400/Configuration_adv.h
  20. 1
    0
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  21. 1
    0
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  22. 1
    0
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  23. 1
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  24. 1
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  25. 1
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  26. 1
    0
      Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h
  27. 1
    0
      Marlin/example_configurations/makibox/Configuration_adv.h
  28. 1
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  29. 1
    0
      Marlin/example_configurations/wt150/Configuration_adv.h
  30. 21
    1
      Marlin/ultralcd.cpp

+ 1
- 0
Marlin/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Anet/A6/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Anet/A8/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Creality/CR-10/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Felix/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Malyan/M150/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Sanguinololu/Configuration_adv.h Näytä tiedosto

@@ -1265,6 +1265,7 @@
1265 1265
 #if ENABLED(CUSTOM_USER_MENUS)
1266 1266
   #define USER_SCRIPT_DONE "M117 User Script Done"
1267 1267
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1268
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1268 1269
 
1269 1270
   #define USER_DESC_1 "Home & UBL Info"
1270 1271
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/TinyBoy2/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Velleman/K8200/Configuration_adv.h Näytä tiedosto

@@ -1289,6 +1289,7 @@
1289 1289
 #if ENABLED(CUSTOM_USER_MENUS)
1290 1290
   #define USER_SCRIPT_DONE "M117 User Script Done"
1291 1291
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1292
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1292 1293
 
1293 1294
   #define USER_DESC_1 "Home & UBL Info"
1294 1295
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/Velleman/K8400/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h Näytä tiedosto

@@ -1278,6 +1278,7 @@
1278 1278
 #if ENABLED(CUSTOM_USER_MENUS)
1279 1279
   #define USER_SCRIPT_DONE "M117 User Script Done"
1280 1280
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1281
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1281 1282
 
1282 1283
   #define USER_DESC_1 "Home & UBL Info"
1283 1284
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h Näytä tiedosto

@@ -1278,6 +1278,7 @@
1278 1278
 #if ENABLED(CUSTOM_USER_MENUS)
1279 1279
   #define USER_SCRIPT_DONE "M117 User Script Done"
1280 1280
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1281
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1281 1282
 
1282 1283
   #define USER_DESC_1 "Home & UBL Info"
1283 1284
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h Näytä tiedosto

@@ -1278,6 +1278,7 @@
1278 1278
 #if ENABLED(CUSTOM_USER_MENUS)
1279 1279
   #define USER_SCRIPT_DONE "M117 User Script Done"
1280 1280
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1281
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1281 1282
 
1282 1283
   #define USER_DESC_1 "Home & UBL Info"
1283 1284
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Näytä tiedosto

@@ -1278,6 +1278,7 @@
1278 1278
 #if ENABLED(CUSTOM_USER_MENUS)
1279 1279
   #define USER_SCRIPT_DONE "M117 User Script Done"
1280 1280
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1281
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1281 1282
 
1282 1283
   #define USER_DESC_1 "Home & UBL Info"
1283 1284
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Näytä tiedosto

@@ -1283,6 +1283,7 @@
1283 1283
 #if ENABLED(CUSTOM_USER_MENUS)
1284 1284
   #define USER_SCRIPT_DONE "M117 User Script Done"
1285 1285
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1286
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1286 1287
 
1287 1288
   #define USER_DESC_1 "Home & UBL Info"
1288 1289
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Näytä tiedosto

@@ -1278,6 +1278,7 @@
1278 1278
 #if ENABLED(CUSTOM_USER_MENUS)
1279 1279
   #define USER_SCRIPT_DONE "M117 User Script Done"
1280 1280
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1281
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1281 1282
 
1282 1283
   #define USER_DESC_1 "Home & UBL Info"
1283 1284
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/makibox/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 1
- 0
Marlin/example_configurations/wt150/Configuration_adv.h Näytä tiedosto

@@ -1276,6 +1276,7 @@
1276 1276
 #if ENABLED(CUSTOM_USER_MENUS)
1277 1277
   #define USER_SCRIPT_DONE "M117 User Script Done"
1278 1278
   #define USER_SCRIPT_AUDIBLE_FEEDBACK
1279
+  //#define USER_SCRIPT_RETURN  // Return to status screen after a script
1279 1280
 
1280 1281
   #define USER_DESC_1 "Home & UBL Info"
1281 1282
   #define USER_GCODE_1 "G28\nG29 W"

+ 21
- 1
Marlin/ultralcd.cpp Näytä tiedosto

@@ -868,6 +868,9 @@ void kill_screen(const char* lcd_msg) {
868 868
       #if ENABLED(USER_SCRIPT_AUDIBLE_FEEDBACK)
869 869
         lcd_completion_feedback();
870 870
       #endif
871
+      #if ENABLED(USER_SCRIPT_RETURN)
872
+        lcd_return_to_status();
873
+      #endif
871 874
     }
872 875
 
873 876
     #if defined(USER_DESC_1) && defined(USER_GCODE_1)
@@ -2998,6 +3001,23 @@ void kill_screen(const char* lcd_msg) {
2998 3001
     lcd_completion_feedback();
2999 3002
   }
3000 3003
 
3004
+  #if ENABLED(EEPROM_SETTINGS)
3005
+
3006
+    static void lcd_init_eeprom() {
3007
+      lcd_factory_settings();
3008
+      settings.save();
3009
+      lcd_goto_previous_menu();
3010
+    }
3011
+
3012
+    static void lcd_init_eeprom_confirm() {
3013
+      START_MENU();
3014
+      MENU_BACK(MSG_CONTROL);
3015
+      MENU_ITEM(function, MSG_INIT_EEPROM, lcd_init_eeprom);
3016
+      END_MENU();
3017
+    }
3018
+
3019
+  #endif
3020
+
3001 3021
   void lcd_control_menu() {
3002 3022
     START_MENU();
3003 3023
     MENU_BACK(MSG_MAIN);
@@ -3028,7 +3048,7 @@ void kill_screen(const char* lcd_msg) {
3028 3048
     #endif
3029 3049
     MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings);
3030 3050
     #if ENABLED(EEPROM_SETTINGS)
3031
-      MENU_ITEM(gcode, MSG_INIT_EEPROM, PSTR("M502\nM500\nM501")); // TODO: Add "Are You Sure?" step
3051
+      MENU_ITEM(submenu, MSG_INIT_EEPROM, lcd_init_eeprom_confirm);
3032 3052
     #endif
3033 3053
 
3034 3054
     END_MENU();

Loading…
Peruuta
Tallenna