From c869dc97452ed78c6fcf4f877a40afc8eaa49c45 Mon Sep 17 00:00:00 2001 From: Tannoo Date: Tue, 26 Sep 2017 23:49:34 -0600 Subject: [PATCH 1/2] User script return-to-status option --- Marlin/Configuration_adv.h | 1 + Marlin/src/config/default/Configuration_adv.h | 1 + .../config/examples/AlephObjects/TAZ4/Configuration_adv.h | 1 + Marlin/src/config/examples/Anet/A6/Configuration_adv.h | 1 + Marlin/src/config/examples/Anet/A8/Configuration_adv.h | 1 + Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h | 1 + .../src/config/examples/BQ/Hephestos_2/Configuration_adv.h | 1 + Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h | 1 + Marlin/src/config/examples/Cartesio/Configuration_adv.h | 1 + Marlin/src/config/examples/Felix/Configuration_adv.h | 1 + .../config/examples/Folger Tech/i3-2020/Configuration_adv.h | 1 + .../src/config/examples/Infitary/i3-M508/Configuration_adv.h | 1 + Marlin/src/config/examples/Malyan/M150/Configuration_adv.h | 1 + Marlin/src/config/examples/RigidBot/Configuration_adv.h | 1 + Marlin/src/config/examples/SCARA/Configuration_adv.h | 1 + Marlin/src/config/examples/Sanguinololu/Configuration_adv.h | 1 + Marlin/src/config/examples/TinyBoy2/Configuration_adv.h | 1 + .../src/config/examples/Velleman/K8200/Configuration_adv.h | 1 + .../src/config/examples/Velleman/K8400/Configuration_adv.h | 1 + .../examples/delta/FLSUN/auto_calibrate/Configuration_adv.h | 1 + .../examples/delta/FLSUN/kossel_mini/Configuration_adv.h | 1 + Marlin/src/config/examples/delta/generic/Configuration_adv.h | 1 + .../config/examples/delta/kossel_mini/Configuration_adv.h | 1 + .../src/config/examples/delta/kossel_pro/Configuration_adv.h | 1 + .../src/config/examples/delta/kossel_xl/Configuration_adv.h | 1 + .../src/config/examples/gCreate/gMax1.5+/Configuration_adv.h | 1 + Marlin/src/config/examples/makibox/Configuration_adv.h | 1 + Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h | 1 + Marlin/src/config/examples/wt150/Configuration_adv.h | 1 + Marlin/src/lcd/ultralcd.cpp | 5 ++++- 30 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 4d34003f0..fbab9b819 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 4d34003f0..fbab9b819 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 1d4d4574f..af3f5498d 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 6c29078b7..ede7377a1 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 30c9f1cdf..bfabeddd8 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index a6f11a4b3..b923555d3 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 503492c5a..96f241d78 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index a6f11a4b3..b923555d3 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 63a3323e1..89253893c 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index e1810d7b5..03388ec5e 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h index 263754b24..91756afeb 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 56e28dda7..8bc5dec84 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 869dc7abe..6e1b1dbdf 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 88670a6b0..3eaddb264 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index ce6cc2ab8..040a72b83 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 77b47a76e..2b265c02c 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -1261,6 +1261,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index def52b0da..c4b98fcd1 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index be1669eee..b4b5125f7 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -1285,6 +1285,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 7ff9f5e61..ba146b30f 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 1b0fb0d58..66084ad79 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -1274,6 +1274,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 9b33e1061..c8b8e6e9b 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -1274,6 +1274,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 9b33e1061..c8b8e6e9b 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -1274,6 +1274,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 9b33e1061..c8b8e6e9b 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -1274,6 +1274,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index b1b8019d0..872875b7e 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -1279,6 +1279,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index 2665192bc..750f06e86 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -1274,6 +1274,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 26e8b4e9d..6b6bde353 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 0184511a1..5bc751058 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index fd3d9cabd..3102decf0 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 3e6bed313..0d472ff69 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -1272,6 +1272,7 @@ #if ENABLED(CUSTOM_USER_MENUS) #define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script #define USER_DESC_1 "Home & UBL Info" #define USER_GCODE_1 "G28\nG29 W" diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 34384b6e0..b5dee03b4 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -871,6 +871,9 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(USER_SCRIPT_AUDIBLE_FEEDBACK) lcd_completion_feedback(); #endif + #if ENABLED(USER_SCRIPT_RETURN) + lcd_return_to_status(); + #endif } #if defined(USER_DESC_1) && defined(USER_GCODE_1) @@ -3031,7 +3034,7 @@ void kill_screen(const char* lcd_msg) { #endif MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings); #if ENABLED(EEPROM_SETTINGS) - MENU_ITEM(gcode, MSG_INIT_EEPROM, PSTR("M502\nM500")); // TODO: Add "Are You Sure?" step + MENU_ITEM(gcode, MSG_INIT_EEPROM, PSTR("M502\nM500")); #endif END_MENU(); From 604b804125571782a11ff819b29a062b23879ba0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Sep 2017 11:07:51 -0500 Subject: [PATCH 2/2] Add confirmation step to Init EEPROM --- Marlin/src/lcd/ultralcd.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index b5dee03b4..7c83a977a 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -3004,6 +3004,23 @@ void kill_screen(const char* lcd_msg) { lcd_completion_feedback(); } + #if ENABLED(EEPROM_SETTINGS) + + static void lcd_init_eeprom() { + lcd_factory_settings(); + settings.save(); + lcd_goto_previous_menu(); + } + + static void lcd_init_eeprom_confirm() { + START_MENU(); + MENU_BACK(MSG_CONTROL); + MENU_ITEM(function, MSG_INIT_EEPROM, lcd_init_eeprom); + END_MENU(); + } + + #endif + void lcd_control_menu() { START_MENU(); MENU_BACK(MSG_MAIN); @@ -3034,7 +3051,7 @@ void kill_screen(const char* lcd_msg) { #endif MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings); #if ENABLED(EEPROM_SETTINGS) - MENU_ITEM(gcode, MSG_INIT_EEPROM, PSTR("M502\nM500")); + MENU_ITEM(submenu, MSG_INIT_EEPROM, lcd_init_eeprom_confirm); #endif END_MENU();