Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More custom user menu items #18177

Merged
merged 25 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
75ea830
Update Configuration_adv.h
borland1 Jun 1, 2020
3779388
Update language_en.h
borland1 Jun 1, 2020
a349b25
Update menu_main.cpp
borland1 Jun 1, 2020
ba5a62a
Update menu_configuration.cpp
borland1 Jun 1, 2020
d0853ef
Update menu_custom.cpp
borland1 Jun 2, 2020
0c434cb
Update SanityCheck.h
borland1 Jun 2, 2020
f598159
Update SanityCheck.h
borland1 Jun 2, 2020
b7d019b
Update SanityCheck.h
borland1 Jun 2, 2020
2947dc3
Update SanityCheck.h
borland1 Jun 2, 2020
3a8fc56
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18177
thinkyhead Dec 15, 2020
5b5a0b9
Fix tests
thinkyhead Dec 15, 2020
e08edfe
General cleanup
thinkyhead Dec 15, 2020
47032d4
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18177
thinkyhead Dec 16, 2020
933ddfe
Shrink sanity checks
thinkyhead Dec 22, 2020
1dd5408
Update other languages
thinkyhead Dec 22, 2020
4f6279d
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18177
thinkyhead Dec 22, 2020
d1fe1f6
Update main_menu.cpp
thinkyhead Dec 22, 2020
c84ea0d
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18177
thinkyhead Mar 23, 2021
c17bcd6
clean up, fix name sorting
thinkyhead Mar 23, 2021
58a9d6d
update confirm items
thinkyhead Mar 23, 2021
e7a540e
Basic FTDI EVE compatibility
thinkyhead Mar 23, 2021
6c5e8f7
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18177
thinkyhead Mar 23, 2021
8fa1403
fixes and cleanup
thinkyhead Mar 23, 2021
b3fcf9c
last touch
thinkyhead Mar 23, 2021
0c77247
better-ish
thinkyhead Mar 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 42 additions & 17 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -3293,29 +3293,54 @@
#endif

/**
* User-defined menu items that execute custom GCode
* Custom Main and Configuration Menu items that execute user-defined G-Code
*/
//#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
//#define CUSTOM_USER_MENU_TITLE "Custom Commands"
#define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK
//#define USER_SCRIPT_RETURN // Return to status screen after a script
// Custom Menus, Main Menu
//#define CUSTOM_MENUS_MAIN
#if ENABLED(CUSTOM_MENUS_MAIN)
//#define CUSTOM_MENUS_MAIN_TITLE "Custom Commands"
#define CUSTOM_MENUS_MAIN_SCRIPT_DONE "M117 User Script Done"
#define CUSTOM_MENUS_MAIN_SCRIPT_AUDIBLE_FEEDBACK
//#define CUSTOM_MENUS_MAIN_SCRIPT_RETURN // Return to status screen after a script

#define USER_DESC_1 "Home & UBL Info"
#define USER_GCODE_1 "G28\nG29 W"
#define CUSTOM_MENU_MAIN_DESC_1 "Home & UBL Info"
#define CUSTOM_MENU_MAIN_GCODE_1 "G28\nG29 W"

#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
#define CUSTOM_MENU_MAIN_DESC_2 "Preheat for " PREHEAT_1_LABEL
#define CUSTOM_MENU_MAIN_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)

#define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
//#define CUSTOM_MENU_MAIN_DESC_3 "Preheat for " PREHEAT_2_LABEL
//#define CUSTOM_MENU_MAIN_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)

#define USER_DESC_4 "Heat Bed/Home/Level"
#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
//#define CUSTOM_MENU_MAIN_DESC_4 "Heat Bed/Home/Level"
//#define CUSTOM_MENU_MAIN_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"

#define USER_DESC_5 "Home & Info"
#define USER_GCODE_5 "G28\nM503"
//#define CUSTOM_MENU_MAIN_DESC_5 "Home & Info"
//#define CUSTOM_MENU_MAIN_GCODE_5 "G28\nM503"
#endif

// Custom Menus, Configuration Menu
//#define CUSTOM_MENUS_CONFIGURATION
#if ENABLED(CUSTOM_MENUS_CONFIGURATION)
//#define CUSTOM_MENUS_CONFIGURATION_TITLE "Custom Commands"
#define CUSTOM_MENUS_CONFIGURATION_SCRIPT_DONE "M117 Wireless Script Done"
#define CUSTOM_MENUS_CONFIGURATION_SCRIPT_AUDIBLE_FEEDBACK
//#define CUSTOM_MENUS_CONFIGURATION_SCRIPT_RETURN // Return to status screen after a script

#define CUSTOM_MENU_CONFIGURATION_DESC_1 "Wifi ON"
#define CUSTOM_MENU_CONFIGURATION_GCODE_1 "M118 [ESP110] WIFI-STA pwd=12345678"

#define CUSTOM_MENU_CONFIGURATION_DESC_2 "Bluetooth ON"
#define CUSTOM_MENU_CONFIGURATION_GCODE_2 "M118 [ESP110] BT pwd=12345678"

//#define CUSTOM_MENU_CONFIGURATION_DESC_3 "Radio OFF"
//#define CUSTOM_MENU_CONFIGURATION_GCODE_3 "M118 [ESP110] OFF pwd=12345678"

//#define CUSTOM_MENU_CONFIGURATION_DESC_4 "Wifi ????"
//#define CUSTOM_MENU_CONFIGURATION_GCODE_4 "M118 ????"

//#define CUSTOM_MENU_CONFIGURATION_DESC_5 "Wifi ????"
//#define CUSTOM_MENU_CONFIGURATION_GCODE_5 "M118 ????"
#endif

/**
Expand Down
303 changes: 203 additions & 100 deletions Marlin/src/inc/SanityCheck.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Marlin/src/lcd/language/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace Language_en {
PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X");
PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y");
PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Value");
PROGMEM Language_Str MSG_USER_MENU = _UxGT("Custom Commands");
PROGMEM Language_Str MSG_CUSTOM_COMMANDS = _UxGT("Custom Commands");
PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe Test");
PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Point");
PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Probe out of bounds");
Expand Down
12 changes: 12 additions & 0 deletions Marlin/src/lcd/menu/menu_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,25 @@ void menu_configuration() {
START_MENU();
BACK_ITEM(MSG_MAIN);

#if ENABLED(CUSTOM_MENUS_CONFIGURATION)
void custom_menus_configuration();
#endif

//
// Debug Menu when certain options are enabled
//
#if HAS_DEBUG_MENU
SUBMENU(MSG_DEBUG_MENU, menu_debug);
#endif

#if ENABLED(CUSTOM_MENUS_CONFIGURATION)
#ifdef CUSTOM_MENUS_CONFIGURATION_TITLE
SUBMENU_P(PSTR(CUSTOM_MENUS_CONFIGURATION_TITLE), custom_menus_configuration);
#else
SUBMENU(MSG_CUSTOM_COMMANDS, custom_menus_configuration);
#endif
#endif

SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings);

#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
Expand Down
Loading