Merge pull request #7772 from thinkyhead/bf1_user_menu_return

[1.1.x] User menu return-to-status option
master
Scott Lahteine 7 years ago committed by GitHub
commit 3a8923be74

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1265,6 +1265,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1289,6 +1289,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1278,6 +1278,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1278,6 +1278,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1278,6 +1278,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1278,6 +1278,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1283,6 +1283,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1278,6 +1278,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -1276,6 +1276,7 @@
#if ENABLED(CUSTOM_USER_MENUS) #if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done" #define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK #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_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W" #define USER_GCODE_1 "G28\nG29 W"

@ -868,6 +868,9 @@ void kill_screen(const char* lcd_msg) {
#if ENABLED(USER_SCRIPT_AUDIBLE_FEEDBACK) #if ENABLED(USER_SCRIPT_AUDIBLE_FEEDBACK)
lcd_completion_feedback(); lcd_completion_feedback();
#endif #endif
#if ENABLED(USER_SCRIPT_RETURN)
lcd_return_to_status();
#endif
} }
#if defined(USER_DESC_1) && defined(USER_GCODE_1) #if defined(USER_DESC_1) && defined(USER_GCODE_1)
@ -2998,6 +3001,23 @@ void kill_screen(const char* lcd_msg) {
lcd_completion_feedback(); 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() { void lcd_control_menu() {
START_MENU(); START_MENU();
MENU_BACK(MSG_MAIN); MENU_BACK(MSG_MAIN);
@ -3028,7 +3048,7 @@ void kill_screen(const char* lcd_msg) {
#endif #endif
MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings); MENU_ITEM(function, MSG_RESTORE_FAILSAFE, lcd_factory_settings);
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(gcode, MSG_INIT_EEPROM, PSTR("M502\nM500\nM501")); // TODO: Add "Are You Sure?" step MENU_ITEM(submenu, MSG_INIT_EEPROM, lcd_init_eeprom_confirm);
#endif #endif
END_MENU(); END_MENU();

Loading…
Cancel
Save