Merge 2947dc3444 into 3b68e44d9a
This commit is contained in:
commit
2316dc76ac
6 changed files with 405 additions and 161 deletions
|
|
@ -3272,29 +3272,54 @@
|
||||||
#endif
|
#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
|
// Custom Menus, Main Menu
|
||||||
#if ENABLED(CUSTOM_USER_MENUS)
|
//#define CUSTOM_MENUS_MAIN
|
||||||
//#define CUSTOM_USER_MENU_TITLE "Custom Commands"
|
#if ENABLED(CUSTOM_MENUS_MAIN)
|
||||||
#define USER_SCRIPT_DONE "M117 User Script Done"
|
//#define CUSTOM_MENUS_MAIN_TITLE "Custom Commands"
|
||||||
#define USER_SCRIPT_AUDIBLE_FEEDBACK
|
#define CUSTOM_MENUS_MAIN_SCRIPT_DONE "M117 User Script Done"
|
||||||
//#define USER_SCRIPT_RETURN // Return to status screen after a script
|
#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 CUSTOM_MENU_MAIN_DESC_1 "Home & UBL Info"
|
||||||
#define USER_GCODE_1 "G28\nG29 W"
|
#define CUSTOM_MENU_MAIN_GCODE_1 "G28\nG29 W"
|
||||||
|
|
||||||
#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
|
#define CUSTOM_MENU_MAIN_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_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 CUSTOM_MENU_MAIN_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_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 CUSTOM_MENU_MAIN_DESC_4 "Heat Bed/Home/Level"
|
||||||
#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
|
//#define CUSTOM_MENU_MAIN_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
|
||||||
|
|
||||||
#define USER_DESC_5 "Home & Info"
|
//#define CUSTOM_MENU_MAIN_DESC_5 "Home & Info"
|
||||||
#define USER_GCODE_5 "G28\nM503"
|
//#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
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2825,106 +2825,209 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
||||||
#error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
|
#error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(CUSTOM_USER_MENUS)
|
#if ENABLED(CUSTOM_MENUS_MAIN)
|
||||||
#ifdef USER_GCODE_1
|
#ifdef CUSTOM_MENU_MAIN_GCODE_1
|
||||||
constexpr char _chr1 = USER_GCODE_1[strlen(USER_GCODE_1) - 1];
|
constexpr char chr1 = CUSTOM_MENU_MAIN_GCODE_1[strlen(CUSTOM_MENU_MAIN_GCODE_1) - 1];
|
||||||
static_assert(_chr1 != '\n' && _chr1 != '\r', "USER_GCODE_1 cannot have a newline at the end. Please remove it.");
|
static_assert(chr1 != '\n' && chr1 != '\r', "CUSTOM_MENU_MAIN_GCODE_1 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_2
|
#ifdef CUSTOM_MENU_MAIN_GCODE_2
|
||||||
constexpr char _chr2 = USER_GCODE_2[strlen(USER_GCODE_2) - 1];
|
constexpr char chr2 = CUSTOM_MENU_MAIN_GCODE_2[strlen(CUSTOM_MENU_MAIN_GCODE_2) - 1];
|
||||||
static_assert(_chr2 != '\n' && _chr2 != '\r', "USER_GCODE_2 cannot have a newline at the end. Please remove it.");
|
static_assert(chr2 != '\n' && chr2 != '\r', "CUSTOM_MENU_MAIN_GCODE_2 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_3
|
#ifdef CUSTOM_MENU_MAIN_GCODE_3
|
||||||
constexpr char _chr3 = USER_GCODE_3[strlen(USER_GCODE_3) - 1];
|
constexpr char chr3 = CUSTOM_MENU_MAIN_GCODE_3[strlen(CUSTOM_MENU_MAIN_GCODE_3) - 1];
|
||||||
static_assert(_chr3 != '\n' && _chr3 != '\r', "USER_GCODE_3 cannot have a newline at the end. Please remove it.");
|
static_assert(chr3 != '\n' && chr3 != '\r', "CUSTOM_MENU_MAIN_GCODE_3 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_4
|
#ifdef CUSTOM_MENU_MAIN_GCODE_4
|
||||||
constexpr char _chr4 = USER_GCODE_4[strlen(USER_GCODE_4) - 1];
|
constexpr char chr4 = CUSTOM_MENU_MAIN_GCODE_4[strlen(CUSTOM_MENU_MAIN_GCODE_4) - 1];
|
||||||
static_assert(_chr4 != '\n' && _chr4 != '\r', "USER_GCODE_4 cannot have a newline at the end. Please remove it.");
|
static_assert(chr4 != '\n' && chr4 != '\r', "CUSTOM_MENU_MAIN_GCODE_4 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_5
|
#ifdef CUSTOM_MENU_MAIN_GCODE_5
|
||||||
constexpr char _chr5 = USER_GCODE_5[strlen(USER_GCODE_5) - 1];
|
constexpr char chr5 = CUSTOM_MENU_MAIN_GCODE_5[strlen(CUSTOM_MENU_MAIN_GCODE_5) - 1];
|
||||||
static_assert(_chr5 != '\n' && _chr5 != '\r', "USER_GCODE_5 cannot have a newline at the end. Please remove it.");
|
static_assert(chr5 != '\n' && chr5 != '\r', "CUSTOM_MENU_MAIN_GCODE_5 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_6
|
#ifdef CUSTOM_MENU_MAIN_GCODE_6
|
||||||
constexpr char _chr6 = USER_GCODE_6[strlen(USER_GCODE_6) - 1];
|
constexpr char chr6 = CUSTOM_MENU_MAIN_GCODE_6[strlen(CUSTOM_MENU_MAIN_GCODE_6) - 1];
|
||||||
static_assert(_chr6 != '\n' && _chr6 != '\r', "USER_GCODE_6 cannot have a newline at the end. Please remove it.");
|
static_assert(chr6 != '\n' && chr6 != '\r', "CUSTOM_MENU_MAIN_GCODE_6 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_7
|
#ifdef CUSTOM_MENU_MAIN_GCODE_7
|
||||||
constexpr char _chr7 = USER_GCODE_7[strlen(USER_GCODE_7) - 1];
|
constexpr char chr7 = CUSTOM_MENU_MAIN_GCODE_7[strlen(CUSTOM_MENU_MAIN_GCODE_7) - 1];
|
||||||
static_assert(_chr7 != '\n' && _chr7 != '\r', "USER_GCODE_7 cannot have a newline at the end. Please remove it.");
|
static_assert(chr7 != '\n' && chr7 != '\r', "CUSTOM_MENU_MAIN_GCODE_7 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_8
|
#ifdef CUSTOM_MENU_MAIN_GCODE_8
|
||||||
constexpr char _chr8 = USER_GCODE_8[strlen(USER_GCODE_8) - 1];
|
constexpr char chr8 = CUSTOM_MENU_MAIN_GCODE_8[strlen(CUSTOM_MENU_MAIN_GCODE_8) - 1];
|
||||||
static_assert(_chr8 != '\n' && _chr8 != '\r', "USER_GCODE_8 cannot have a newline at the end. Please remove it.");
|
static_assert(chr8 != '\n' && chr8 != '\r', "CUSTOM_MENU_MAIN_GCODE_8 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_9
|
#ifdef CUSTOM_MENU_MAIN_GCODE_9
|
||||||
constexpr char _chr9 = USER_GCODE_9[strlen(USER_GCODE_9) - 1];
|
constexpr char chr9 = CUSTOM_MENU_MAIN_GCODE_9[strlen(CUSTOM_MENU_MAIN_GCODE_9) - 1];
|
||||||
static_assert(_chr9 != '\n' && _chr9 != '\r', "USER_GCODE_9 cannot have a newline at the end. Please remove it.");
|
static_assert(chr9 != '\n' && chr9 != '\r', "CUSTOM_MENU_MAIN_GCODE_9 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_10
|
#ifdef CUSTOM_MENU_MAIN_GCODE_10
|
||||||
constexpr char _chr10 = USER_GCODE_10[strlen(USER_GCODE_10) - 1];
|
constexpr char chr10 = CUSTOM_MENU_MAIN_GCODE_10[strlen(CUSTOM_MENU_MAIN_GCODE_10) - 1];
|
||||||
static_assert(_chr10 != '\n' && _chr10 != '\r', "USER_GCODE_10 cannot have a newline at the end. Please remove it.");
|
static_assert(chr10 != '\n' && chr10 != '\r', "CUSTOM_MENU_MAIN_GCODE_10 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_11
|
#ifdef CUSTOM_MENU_MAIN_GCODE_11
|
||||||
constexpr char _chr11 = USER_GCODE_11[strlen(USER_GCODE_11) - 1];
|
constexpr char chr11 = CUSTOM_MENU_MAIN_GCODE_11[strlen(CUSTOM_MENU_MAIN_GCODE_11) - 1];
|
||||||
static_assert(_chr11 != '\n' && _chr11 != '\r', "USER_GCODE_11 cannot have a newline at the end. Please remove it.");
|
static_assert(chr11 != '\n' && chr11 != '\r', "CUSTOM_MENU_MAIN_GCODE_11 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_12
|
#ifdef CUSTOM_MENU_MAIN_GCODE_12
|
||||||
constexpr char _chr12 = USER_GCODE_12[strlen(USER_GCODE_12) - 1];
|
constexpr char chr12 = CUSTOM_MENU_MAIN_GCODE_12[strlen(CUSTOM_MENU_MAIN_GCODE_12) - 1];
|
||||||
static_assert(_chr12 != '\n' && _chr12 != '\r', "USER_GCODE_12 cannot have a newline at the end. Please remove it.");
|
static_assert(chr12 != '\n' && chr12 != '\r', "CUSTOM_MENU_MAIN_GCODE_12 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_13
|
#ifdef CUSTOM_MENU_MAIN_GCODE_13
|
||||||
constexpr char _chr13 = USER_GCODE_13[strlen(USER_GCODE_13) - 1];
|
constexpr char chr13 = CUSTOM_MENU_MAIN_GCODE_13[strlen(CUSTOM_MENU_MAIN_GCODE_13) - 1];
|
||||||
static_assert(_chr13 != '\n' && _chr13 != '\r', "USER_GCODE_13 cannot have a newline at the end. Please remove it.");
|
static_assert(chr13 != '\n' && chr13 != '\r', "CUSTOM_MENU_MAIN_GCODE_13 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_14
|
#ifdef CUSTOM_MENU_MAIN_GCODE_14
|
||||||
constexpr char _chr14 = USER_GCODE_14[strlen(USER_GCODE_14) - 1];
|
constexpr char chr14 = CUSTOM_MENU_MAIN_GCODE_14[strlen(CUSTOM_MENU_MAIN_GCODE_14) - 1];
|
||||||
static_assert(_chr14 != '\n' && _chr14 != '\r', "USER_GCODE_14 cannot have a newline at the end. Please remove it.");
|
static_assert(chr14 != '\n' && chr14 != '\r', "CUSTOM_MENU_MAIN_GCODE_14 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_15
|
#ifdef CUSTOM_MENU_MAIN_GCODE_15
|
||||||
constexpr char _chr15 = USER_GCODE_15[strlen(USER_GCODE_15) - 1];
|
constexpr char chr15 = CUSTOM_MENU_MAIN_GCODE_15[strlen(CUSTOM_MENU_MAIN_GCODE_15) - 1];
|
||||||
static_assert(_chr15 != '\n' && _chr15 != '\r', "USER_GCODE_15 cannot have a newline at the end. Please remove it.");
|
static_assert(chr15 != '\n' && chr15 != '\r', "CUSTOM_MENU_MAIN_GCODE_15 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_16
|
#ifdef CUSTOM_MENU_MAIN_GCODE_16
|
||||||
constexpr char _chr16 = USER_GCODE_16[strlen(USER_GCODE_16) - 1];
|
constexpr char chr16 = CUSTOM_MENU_MAIN_GCODE_16[strlen(CUSTOM_MENU_MAIN_GCODE_16) - 1];
|
||||||
static_assert(_chr16 != '\n' && _chr16 != '\r', "USER_GCODE_16 cannot have a newline at the end. Please remove it.");
|
static_assert(chr16 != '\n' && chr16 != '\r', "CUSTOM_MENU_MAIN_GCODE_16 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_17
|
#ifdef CUSTOM_MENU_MAIN_GCODE_17
|
||||||
constexpr char _chr17 = USER_GCODE_17[strlen(USER_GCODE_17) - 1];
|
constexpr char chr17 = CUSTOM_MENU_MAIN_GCODE_17[strlen(CUSTOM_MENU_MAIN_GCODE_17) - 1];
|
||||||
static_assert(_chr17 != '\n' && _chr17 != '\r', "USER_GCODE_17 cannot have a newline at the end. Please remove it.");
|
static_assert(chr17 != '\n' && chr17 != '\r', "CUSTOM_MENU_MAIN_GCODE_17 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_18
|
#ifdef CUSTOM_MENU_MAIN_GCODE_18
|
||||||
constexpr char _chr18 = USER_GCODE_18[strlen(USER_GCODE_18) - 1];
|
constexpr char chr18 = CUSTOM_MENU_MAIN_GCODE_18[strlen(CUSTOM_MENU_MAIN_GCODE_18) - 1];
|
||||||
static_assert(_chr18 != '\n' && _chr18 != '\r', "USER_GCODE_18 cannot have a newline at the end. Please remove it.");
|
static_assert(chr18 != '\n' && chr18 != '\r', "CUSTOM_MENU_MAIN_GCODE_18 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_19
|
#ifdef CUSTOM_MENU_MAIN_GCODE_19
|
||||||
constexpr char _chr19 = USER_GCODE_19[strlen(USER_GCODE_19) - 1];
|
constexpr char chr19 = CUSTOM_MENU_MAIN_GCODE_19[strlen(CUSTOM_MENU_MAIN_GCODE_19) - 1];
|
||||||
static_assert(_chr19 != '\n' && _chr19 != '\r', "USER_GCODE_19 cannot have a newline at the end. Please remove it.");
|
static_assert(chr19 != '\n' && chr19 != '\r', "CUSTOM_MENU_MAIN_GCODE_19 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_20
|
#ifdef CUSTOM_MENU_MAIN_GCODE_20
|
||||||
constexpr char _chr20 = USER_GCODE_20[strlen(USER_GCODE_20) - 1];
|
constexpr char chr20 = CUSTOM_MENU_MAIN_GCODE_20[strlen(CUSTOM_MENU_MAIN_GCODE_20) - 1];
|
||||||
static_assert(_chr20 != '\n' && _chr20 != '\r', "USER_GCODE_20 cannot have a newline at the end. Please remove it.");
|
static_assert(chr20 != '\n' && chr20 != '\r', "CUSTOM_MENU_MAIN_GCODE_20 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_21
|
#ifdef CUSTOM_MENU_MAIN_GCODE_21
|
||||||
constexpr char _chr21 = USER_GCODE_21[strlen(USER_GCODE_21) - 1];
|
constexpr char chr21 = CUSTOM_MENU_MAIN_GCODE_21[strlen(CUSTOM_MENU_MAIN_GCODE_21) - 1];
|
||||||
static_assert(_chr21 != '\n' && _chr21 != '\r', "USER_GCODE_21 cannot have a newline at the end. Please remove it.");
|
static_assert(chr21 != '\n' && chr21 != '\r', "CUSTOM_MENU_MAIN_GCODE_21 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_22
|
#ifdef CUSTOM_MENU_MAIN_GCODE_22
|
||||||
constexpr char _chr22 = USER_GCODE_22[strlen(USER_GCODE_22) - 1];
|
constexpr char chr22 = CUSTOM_MENU_MAIN_GCODE_22[strlen(CUSTOM_MENU_MAIN_GCODE_22) - 1];
|
||||||
static_assert(_chr22 != '\n' && _chr22 != '\r', "USER_GCODE_22 cannot have a newline at the end. Please remove it.");
|
static_assert(chr22 != '\n' && chr22 != '\r', "CUSTOM_MENU_MAIN_GCODE_22 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_23
|
#ifdef CUSTOM_MENU_MAIN_GCODE_23
|
||||||
constexpr char _chr23 = USER_GCODE_23[strlen(USER_GCODE_23) - 1];
|
constexpr char chr23 = CUSTOM_MENU_MAIN_GCODE_23[strlen(CUSTOM_MENU_MAIN_GCODE_23) - 1];
|
||||||
static_assert(_chr23 != '\n' && _chr23 != '\r', "USER_GCODE_23 cannot have a newline at the end. Please remove it.");
|
static_assert(chr23 != '\n' && chr23 != '\r', "CUSTOM_MENU_MAIN_GCODE_23 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_24
|
#ifdef CUSTOM_MENU_MAIN_GCODE_24
|
||||||
constexpr char _chr24 = USER_GCODE_24[strlen(USER_GCODE_24) - 1];
|
constexpr char chr24 = CUSTOM_MENU_MAIN_GCODE_24[strlen(CUSTOM_MENU_MAIN_GCODE_24) - 1];
|
||||||
static_assert(_chr24 != '\n' && _chr24 != '\r', "USER_GCODE_24 cannot have a newline at the end. Please remove it.");
|
static_assert(chr24 != '\n' && chr24 != '\r', "CUSTOM_MENU_MAIN_GCODE_24 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_GCODE_25
|
#ifdef CUSTOM_MENU_MAIN_GCODE_25
|
||||||
constexpr char _chr25 = USER_GCODE_25[strlen(USER_GCODE_25) - 1];
|
constexpr char chr25 = CUSTOM_MENU_MAIN_GCODE_25[strlen(CUSTOM_MENU_MAIN_GCODE_25) - 1];
|
||||||
static_assert(_chr25 != '\n' && _chr25 != '\r', "USER_GCODE_25 cannot have a newline at the end. Please remove it.");
|
static_assert(chr25 != '\n' && chr25 != '\r', "CUSTOM_MENU_MAIN_GCODE_25 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(CUSTOM_MENUS_CONFIGURATION)
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_1
|
||||||
|
constexpr char _chr1 = CUSTOM_MENU_CONFIGURATION_GCODE_1[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_1) - 1];
|
||||||
|
static_assert(_chr1 != '\n' && _chr1 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_1 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_2
|
||||||
|
constexpr char _chr2 = CUSTOM_MENU_CONFIGURATION_GCODE_2[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_2) - 1];
|
||||||
|
static_assert(_chr2 != '\n' && _chr2 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_2 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_3
|
||||||
|
constexpr char _chr3 = CUSTOM_MENU_CONFIGURATION_GCODE_3[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_3) - 1];
|
||||||
|
static_assert(_chr3 != '\n' && _chr3 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_3 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_4
|
||||||
|
constexpr char _chr4 = CUSTOM_MENU_CONFIGURATION_GCODE_4[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_4) - 1];
|
||||||
|
static_assert(_chr4 != '\n' && _chr4 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_4 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_5
|
||||||
|
constexpr char _chr5 = CUSTOM_MENU_CONFIGURATION_GCODE_5[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_5) - 1];
|
||||||
|
static_assert(_chr5 != '\n' && _chr5 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_5 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_6
|
||||||
|
constexpr char _chr6 = CUSTOM_MENU_CONFIGURATION_GCODE_6[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_6) - 1];
|
||||||
|
static_assert(_chr6 != '\n' && _chr6 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_6 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_7
|
||||||
|
constexpr char _chr7 = CUSTOM_MENU_CONFIGURATION_GCODE_7[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_7) - 1];
|
||||||
|
static_assert(_chr7 != '\n' && _chr7 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_7 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_8
|
||||||
|
constexpr char _chr8 = CUSTOM_MENU_CONFIGURATION_GCODE_8[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_8) - 1];
|
||||||
|
static_assert(_chr8 != '\n' && _chr8 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_8 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_9
|
||||||
|
constexpr char _chr9 = CUSTOM_MENU_CONFIGURATION_GCODE_9[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_9) - 1];
|
||||||
|
static_assert(_chr9 != '\n' && _chr9 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_9 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_10
|
||||||
|
constexpr char _chr10 = CUSTOM_MENU_CONFIGURATION_GCODE_10[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_10) - 1];
|
||||||
|
static_assert(_chr10 != '\n' && _chr10 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_10 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_11
|
||||||
|
constexpr char _chr11 = CUSTOM_MENU_CONFIGURATION_GCODE_11[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_11) - 1];
|
||||||
|
static_assert(_chr11 != '\n' && _chr11 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_11 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_12
|
||||||
|
constexpr char _chr12 = CUSTOM_MENU_CONFIGURATION_GCODE_12[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_12) - 1];
|
||||||
|
static_assert(_chr12 != '\n' && _chr12 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_12 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_13
|
||||||
|
constexpr char _chr13 = CUSTOM_MENU_CONFIGURATION_GCODE_13[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_13) - 1];
|
||||||
|
static_assert(_chr13 != '\n' && _chr13 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_13 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_14
|
||||||
|
constexpr char _chr14 = CUSTOM_MENU_CONFIGURATION_GCODE_14[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_14) - 1];
|
||||||
|
static_assert(_chr14 != '\n' && _chr14 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_14 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_15
|
||||||
|
constexpr char _chr15 = CUSTOM_MENU_CONFIGURATION_GCODE_15[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_15) - 1];
|
||||||
|
static_assert(_chr15 != '\n' && _chr15 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_15 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_16
|
||||||
|
constexpr char _chr16 = CUSTOM_MENU_CONFIGURATION_GCODE_16[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_16) - 1];
|
||||||
|
static_assert(_chr16 != '\n' && _chr16 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_16 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_17
|
||||||
|
constexpr char _chr17 = CUSTOM_MENU_CONFIGURATION_GCODE_17[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_17) - 1];
|
||||||
|
static_assert(_chr17 != '\n' && _chr17 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_17 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_18
|
||||||
|
constexpr char _chr18 = CUSTOM_MENU_CONFIGURATION_GCODE_18[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_18) - 1];
|
||||||
|
static_assert(_chr18 != '\n' && _chr18 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_18 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_19
|
||||||
|
constexpr char _chr19 = CUSTOM_MENU_CONFIGURATION_GCODE_19[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_19) - 1];
|
||||||
|
static_assert(_chr19 != '\n' && _chr19 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_19 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_20
|
||||||
|
constexpr char _chr20 = CUSTOM_MENU_CONFIGURATION_GCODE_20[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_20) - 1];
|
||||||
|
static_assert(_chr20 != '\n' && _chr20 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_20 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_21
|
||||||
|
constexpr char _chr21 = CUSTOM_MENU_CONFIGURATION_GCODE_21[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_21) - 1];
|
||||||
|
static_assert(_chr21 != '\n' && _chr21 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_21 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_22
|
||||||
|
constexpr char _chr22 = CUSTOM_MENU_CONFIGURATION_GCODE_22[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_22) - 1];
|
||||||
|
static_assert(_chr22 != '\n' && _chr22 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_22 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_23
|
||||||
|
constexpr char _chr23 = CUSTOM_MENU_CONFIGURATION_GCODE_23[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_23) - 1];
|
||||||
|
static_assert(_chr23 != '\n' && _chr23 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_23 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_24
|
||||||
|
constexpr char _chr24 = CUSTOM_MENU_CONFIGURATION_GCODE_24[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_24) - 1];
|
||||||
|
static_assert(_chr24 != '\n' && _chr24 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_24 cannot have a newline at the end. Please remove it.");
|
||||||
|
#endif
|
||||||
|
#ifdef CUSTOM_MENU_CONFIGURATION_GCODE_25
|
||||||
|
constexpr char _chr25 = CUSTOM_MENU_CONFIGURATION_GCODE_25[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_25) - 1];
|
||||||
|
static_assert(_chr25 != '\n' && _chr25 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_25 cannot have a newline at the end. Please remove it.");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,8 @@ namespace Language_en {
|
||||||
PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X");
|
PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X");
|
||||||
PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y");
|
PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y");
|
||||||
PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Value");
|
PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Value");
|
||||||
PROGMEM Language_Str MSG_USER_MENU = _UxGT("Custom Commands");
|
PROGMEM Language_Str MSG_CUSTOM_MENUS_MAIN = _UxGT("Custom Commands");
|
||||||
|
PROGMEM Language_Str MSG_CUSTOM_MENUS_CONFIGURATION = _UxGT("Custom Commands");
|
||||||
PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe Test");
|
PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe Test");
|
||||||
PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Point");
|
PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Point");
|
||||||
PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Probe out of bounds");
|
PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Probe out of bounds");
|
||||||
|
|
|
||||||
|
|
@ -341,6 +341,10 @@ void menu_configuration() {
|
||||||
START_MENU();
|
START_MENU();
|
||||||
BACK_ITEM(MSG_MAIN);
|
BACK_ITEM(MSG_MAIN);
|
||||||
|
|
||||||
|
#if ENABLED(CUSTOM_MENUS_CONFIGURATION)
|
||||||
|
void custom_menus_configuration();
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Debug Menu when certain options are enabled
|
// Debug Menu when certain options are enabled
|
||||||
//
|
//
|
||||||
|
|
@ -348,6 +352,14 @@ void menu_configuration() {
|
||||||
SUBMENU(MSG_DEBUG_MENU, menu_debug);
|
SUBMENU(MSG_DEBUG_MENU, menu_debug);
|
||||||
#endif
|
#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_MENUS_CONFIGURATION, custom_menus_configuration);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings);
|
SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings);
|
||||||
|
|
||||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||||
|
|
|
||||||
|
|
@ -21,109 +21,212 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//
|
//
|
||||||
// Custom User Menu
|
// Custom Menus
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if BOTH(HAS_LCD_MENU, CUSTOM_USER_MENUS)
|
#if HAS_LCD_MENU && ( ENABLED(CUSTOM_MENUS_MAIN) || ENABLED(CUSTOM_MENUS_CONFIGURATION) )
|
||||||
|
|
||||||
#include "menu_item.h"
|
#include "menu_item.h"
|
||||||
#include "../../gcode/queue.h"
|
#include "../../gcode/queue.h"
|
||||||
|
|
||||||
#ifdef USER_SCRIPT_DONE
|
#ifdef CUSTOM_MENU_MAIN_SCRIPT_DONE
|
||||||
#define _DONE_SCRIPT "\n" USER_SCRIPT_DONE
|
#define _DONE_SCRIPT "\n" CUSTOM_MENU_MAIN_SCRIPT_DONE
|
||||||
#else
|
#else
|
||||||
#define _DONE_SCRIPT ""
|
#define _DONE_SCRIPT ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void _lcd_user_gcode(PGM_P const cmd) {
|
#ifdef CUSTOM_MENUS_CONFIGURATION_SCRIPT_DONE
|
||||||
|
#define _DONE_SCRIPT "\n" CUSTOM_MENUS_CONFIGURATION_SCRIPT_DONE
|
||||||
|
#else
|
||||||
|
#define _DONE_SCRIPT ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void _lcd_custom_menu_main_gcode(PGM_P const cmd) {
|
||||||
queue.inject_P(cmd);
|
queue.inject_P(cmd);
|
||||||
TERN_(USER_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
|
#if ENABLED(CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK) && HAS_BUZZER
|
||||||
TERN_(USER_SCRIPT_RETURN, ui.return_to_status());
|
ui.completion_feedback();
|
||||||
|
#endif
|
||||||
|
#if ENABLED(CUSTOM_MENU_MAIN_SCRIPT_RETURN)
|
||||||
|
ui.return_to_status();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_user() {
|
void _lcd_custom_menus_configuration_gcode(PGM_P const cmd) {
|
||||||
|
queue.inject_P(cmd);
|
||||||
|
#if ENABLED(CUSTOM_MENUS_CONFIGURATION_SCRIPT_AUDIBLE_FEEDBACK) && HAS_BUZZER
|
||||||
|
ui.completion_feedback();
|
||||||
|
#endif
|
||||||
|
#if ENABLED(CUSTOM_MENUS_CONFIGURATION_SCRIPT_RETURN)
|
||||||
|
ui.return_to_status();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void custom_menus_main() {
|
||||||
START_MENU();
|
START_MENU();
|
||||||
BACK_ITEM(MSG_MAIN);
|
BACK_ITEM(MSG_MAIN);
|
||||||
#define HAS_USER_ITEM(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N))
|
#define HAS_CUSTOM_MENU_ITEM(N) (defined(CUSTOM_MENU_MAIN_DESC_##N) && defined(CUSTOM_MENU_MAIN_GCODE_##N))
|
||||||
#define USER_ITEM(N) ACTION_ITEM_P(PSTR(USER_DESC_##N), []{ _lcd_user_gcode(PSTR(USER_GCODE_##N _DONE_SCRIPT)); });
|
#define CUSTOM_MENU_ITEM(N) ACTION_ITEM_P(PSTR(CUSTOM_MENU_MAIN_DESC_##N), []{ _lcd_custom_menu_main_gcode(PSTR(CUSTOM_MENU_MAIN_GCODE_##N _DONE_SCRIPT)); });
|
||||||
#if HAS_USER_ITEM(1)
|
#if HAS_CUSTOM_MENU_ITEM(1)
|
||||||
USER_ITEM(1);
|
CUSTOM_MENU_ITEM(1);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(2)
|
#if HAS_CUSTOM_MENU_ITEM(2)
|
||||||
USER_ITEM(2);
|
CUSTOM_MENU_ITEM(2);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(3)
|
#if HAS_CUSTOM_MENU_ITEM(3)
|
||||||
USER_ITEM(3);
|
CUSTOM_MENU_ITEM(3);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(4)
|
#if HAS_CUSTOM_MENU_ITEM(4)
|
||||||
USER_ITEM(4);
|
CUSTOM_MENU_ITEM(4);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(5)
|
#if HAS_CUSTOM_MENU_ITEM(5)
|
||||||
USER_ITEM(5);
|
CUSTOM_MENU_ITEM(5);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(6)
|
#if HAS_CUSTOM_MENU_ITEM(6)
|
||||||
USER_ITEM(6);
|
CUSTOM_MENU_ITEM(6);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(7)
|
#if HAS_CUSTOM_MENU_ITEM(7)
|
||||||
USER_ITEM(7);
|
CUSTOM_MENU_ITEM(7);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(8)
|
#if HAS_CUSTOM_MENU_ITEM(8)
|
||||||
USER_ITEM(8);
|
CUSTOM_MENU_ITEM(8);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(9)
|
#if HAS_CUSTOM_MENU_ITEM(9)
|
||||||
USER_ITEM(9);
|
CUSTOM_MENU_ITEM(9);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(10)
|
#if HAS_CUSTOM_MENU_ITEM(10)
|
||||||
USER_ITEM(10);
|
CUSTOM_MENU_ITEM(10);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(11)
|
#if HAS_CUSTOM_MENU_ITEM(11)
|
||||||
USER_ITEM(11);
|
CUSTOM_MENU_ITEM(11);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(12)
|
#if HAS_CUSTOM_MENU_ITEM(12)
|
||||||
USER_ITEM(12);
|
CUSTOM_MENU_ITEM(12);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(13)
|
#if HAS_CUSTOM_MENU_ITEM(13)
|
||||||
USER_ITEM(13);
|
CUSTOM_MENU_ITEM(13);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(14)
|
#if HAS_CUSTOM_MENU_ITEM(14)
|
||||||
USER_ITEM(14);
|
CUSTOM_MENU_ITEM(14);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(15)
|
#if HAS_CUSTOM_MENU_ITEM(15)
|
||||||
USER_ITEM(15);
|
CUSTOM_MENU_ITEM(15);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(16)
|
#if HAS_CUSTOM_MENU_ITEM(16)
|
||||||
USER_ITEM(16);
|
CUSTOM_MENU_ITEM(16);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(17)
|
#if HAS_CUSTOM_MENU_ITEM(17)
|
||||||
USER_ITEM(17);
|
CUSTOM_MENU_ITEM(17);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(18)
|
#if HAS_CUSTOM_MENU_ITEM(18)
|
||||||
USER_ITEM(18);
|
CUSTOM_MENU_ITEM(18);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(19)
|
#if HAS_CUSTOM_MENU_ITEM(19)
|
||||||
USER_ITEM(19);
|
CUSTOM_MENU_ITEM(19);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(20)
|
#if HAS_CUSTOM_MENU_ITEM(20)
|
||||||
USER_ITEM(20);
|
CUSTOM_MENU_ITEM(20);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(21)
|
#if HAS_CUSTOM_MENU_ITEM(21)
|
||||||
USER_ITEM(21);
|
CUSTOM_MENU_ITEM(21);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(22)
|
#if HAS_CUSTOM_MENU_ITEM(22)
|
||||||
USER_ITEM(22);
|
CUSTOM_MENU_ITEM(22);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(23)
|
#if HAS_CUSTOM_MENU_ITEM(23)
|
||||||
USER_ITEM(23);
|
CUSTOM_MENU_ITEM(23);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(24)
|
#if HAS_CUSTOM_MENU_ITEM(24)
|
||||||
USER_ITEM(24);
|
CUSTOM_MENU_ITEM(24);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_USER_ITEM(25)
|
#if HAS_CUSTOM_MENU_ITEM(25)
|
||||||
USER_ITEM(25);
|
CUSTOM_MENU_ITEM(25);
|
||||||
#endif
|
#endif
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_LCD_MENU && CUSTOM_USER_MENUS
|
void custom_menus_configuration() {
|
||||||
|
START_MENU();
|
||||||
|
BACK_ITEM(MSG_MAIN);
|
||||||
|
#define HAS_CUSTOM_MENU_ITEM(N) (defined(CUSTOM_MENU_CONFIGURATION_DESC_##N) && defined(CUSTOM_MENU_CONFIGURATION_GCODE_##N))
|
||||||
|
#define CUSTOM_MENU_ITEM(N) ACTION_ITEM_P(PSTR(CUSTOM_MENU_CONFIGURATION_DESC_##N), []{ _lcd_custom_menus_configuration_gcode(PSTR(CUSTOM_MENU_CONFIGURATION_GCODE_##N _DONE_SCRIPT)); }); // ***********************
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(1)
|
||||||
|
CUSTOM_MENU_ITEM(1);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(2)
|
||||||
|
CUSTOM_MENU_ITEM(2);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(3)
|
||||||
|
CUSTOM_MENU_ITEM(3);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(4)
|
||||||
|
CUSTOM_MENU_ITEM(4);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(5)
|
||||||
|
CUSTOM_MENU_ITEM(5);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(6)
|
||||||
|
CUSTOM_MENU_ITEM(6);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(7)
|
||||||
|
CUSTOM_MENU_ITEM(7);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(8)
|
||||||
|
CUSTOM_MENU_ITEM(8);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(9)
|
||||||
|
CUSTOM_MENU_ITEM(9);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(10)
|
||||||
|
CUSTOM_MENU_ITEM(10);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(11)
|
||||||
|
CUSTOM_MENU_ITEM(11);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(12)
|
||||||
|
CUSTOM_MENU_ITEM(12);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(13)
|
||||||
|
CUSTOM_MENU_ITEM(13);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(14)
|
||||||
|
CUSTOM_MENU_ITEM(14);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(15)
|
||||||
|
CUSTOM_MENU_ITEM(15);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(16)
|
||||||
|
CUSTOM_MENU_ITEM(16);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(17)
|
||||||
|
CUSTOM_MENU_ITEM(17);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(18)
|
||||||
|
CUSTOM_MENU_ITEM(18);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(19)
|
||||||
|
CUSTOM_MENU_ITEM(19);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(20)
|
||||||
|
CUSTOM_MENU_ITEM(20);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(21)
|
||||||
|
CUSTOM_MENU_ITEM(21);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(22)
|
||||||
|
CUSTOM_MENU_ITEM(22);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(23)
|
||||||
|
CUSTOM_MENU_ITEM(23);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(24)
|
||||||
|
CUSTOM_MENU_ITEM(24);
|
||||||
|
#endif
|
||||||
|
#if HAS_CUSTOM_MENU_ITEM(25)
|
||||||
|
CUSTOM_MENU_ITEM(25);
|
||||||
|
#endif
|
||||||
|
END_MENU();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HAS_LCD_MENU && ( CUSTOM_MENUS_MAIN || CUSTOM_MENUS_CONFIGURATION )
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ void menu_motion();
|
||||||
void menu_temperature();
|
void menu_temperature();
|
||||||
void menu_configuration();
|
void menu_configuration();
|
||||||
|
|
||||||
#if ENABLED(CUSTOM_USER_MENUS)
|
#if ENABLED(CUSTOM_MENUS_MAIN)
|
||||||
void menu_user();
|
void custom_menus_main();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_POWER_MONITOR
|
#if HAS_POWER_MONITOR
|
||||||
|
|
@ -191,11 +191,11 @@ void menu_main() {
|
||||||
|
|
||||||
SUBMENU(MSG_CONFIGURATION, menu_configuration);
|
SUBMENU(MSG_CONFIGURATION, menu_configuration);
|
||||||
|
|
||||||
#if ENABLED(CUSTOM_USER_MENUS)
|
#if ENABLED(CUSTOM_MENUS_MAIN)
|
||||||
#ifdef CUSTOM_USER_MENU_TITLE
|
#ifdef CUSTOM_MENUS_MAIN_TITLE
|
||||||
SUBMENU_P(PSTR(CUSTOM_USER_MENU_TITLE), menu_user);
|
SUBMENU_P(PSTR(CUSTOM_MENUS_MAIN_TITLE), custom_menus_main);
|
||||||
#else
|
#else
|
||||||
SUBMENU(MSG_USER_MENU, menu_user);
|
SUBMENU(MSG_CUSTOM_MENUS_MAIN, custom_menus_main);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue