From 75ea830c3fc34ade87a0a95703fae0d8ccbb13a9 Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 16:24:07 -0700 Subject: [PATCH 1/9] Update Configuration_adv.h Add custom menu options for 'Configuration Menu', renamed User Menu to distinguish between two. --- Marlin/Configuration_adv.h | 59 +++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 17 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index ec6cb27ec4..05e3ed58eb 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3059,29 +3059,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 /** From 3779388b6ea13d3408dbdfa03ee8e3a6c0feea68 Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 16:30:38 -0700 Subject: [PATCH 2/9] Update language_en.h Add custom menus msg for custom menu option in 'Configuration Menus'. Rename 'custom menu' msg. --- Marlin/src/lcd/language/language_en.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index b8013bf16c..0d4cef5f99 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -116,7 +116,8 @@ 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_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_POINT = _UxGT("M48 Point"); PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Deviation"); From a349b25b65e047c1bd34475fe9a710370fa7ee08 Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 16:39:14 -0700 Subject: [PATCH 3/9] Update menu_main.cpp Rename custom main menus to distinguish between custom 'Configuration Menus'. --- Marlin/src/lcd/menu/menu_main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 6cc20b2fa1..2b67161309 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -55,8 +55,8 @@ void menu_motion(); void menu_temperature(); void menu_configuration(); -#if ENABLED(CUSTOM_USER_MENUS) - void menu_user(); +#if ENABLED(CUSTOM_MENUS_MAIN) + void custom_menus_main(); #endif #if ENABLED(ADVANCED_PAUSE_FEATURE) @@ -166,11 +166,11 @@ void menu_main() { SUBMENU(MSG_CONFIGURATION, menu_configuration); - #if ENABLED(CUSTOM_USER_MENUS) - #ifdef CUSTOM_USER_MENU_TITLE - SUBMENU_P(PSTR(CUSTOM_USER_MENU_TITLE), menu_user); + #if ENABLED(CUSTOM_MENUS_MAIN) + #ifdef CUSTOM_MENUS_MAIN_TITLE + SUBMENU_P(PSTR(CUSTOM_MENUS_MAIN_TITLE), custom_menus_main); #else - SUBMENU(MSG_USER_MENU, menu_user); + SUBMENU(MSG_CUSTOM_MENUS_MAIN, custom_menus_main); #endif #endif From ba5a62a838bbe5284f691393a80455656db6996e Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 16:48:51 -0700 Subject: [PATCH 4/9] Update menu_configuration.cpp Add custom menus to 'Configuration Menu'. --- Marlin/src/lcd/menu/menu_configuration.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index da6b3ea1cb..3208ed8b51 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -349,6 +349,10 @@ 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 // @@ -356,6 +360,14 @@ void menu_configuration() { 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_MENUS_CONFIGURATION, custom_menus_configuration); + #endif + #endif + SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) From d0853ef4ad0e85c057eee4afbf10e8029ad75d8d Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 17:02:35 -0700 Subject: [PATCH 5/9] Update menu_custom.cpp Add custom menu option to 'Configuration Menu'. --- Marlin/src/lcd/menu/menu_custom.cpp | 225 ++++++++++++++++++++-------- 1 file changed, 164 insertions(+), 61 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_custom.cpp b/Marlin/src/lcd/menu/menu_custom.cpp index 1ba781197f..6e8ac6c4e8 100644 --- a/Marlin/src/lcd/menu/menu_custom.cpp +++ b/Marlin/src/lcd/menu/menu_custom.cpp @@ -21,109 +21,212 @@ */ // -// Custom User Menu +// Custom Menus // #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.h" #include "../../gcode/queue.h" -#ifdef USER_SCRIPT_DONE - #define _DONE_SCRIPT "\n" USER_SCRIPT_DONE +#ifdef CUSTOM_MENU_MAIN_SCRIPT_DONE + #define _DONE_SCRIPT "\n" CUSTOM_MENU_MAIN_SCRIPT_DONE #else #define _DONE_SCRIPT "" #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); - TERN_(USER_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback()); - TERN_(USER_SCRIPT_RETURN, ui.return_to_status()); + #if ENABLED(CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK) && HAS_BUZZER + 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(); BACK_ITEM(MSG_MAIN); - #define HAS_USER_ITEM(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N)) - #define USER_ITEM(N) ACTION_ITEM_P(PSTR(USER_DESC_##N), []{ _lcd_user_gcode(PSTR(USER_GCODE_##N _DONE_SCRIPT)); }); - #if HAS_USER_ITEM(1) - USER_ITEM(1); + #define HAS_CUSTOM_MENU_ITEM(N) (defined(CUSTOM_MENU_MAIN_DESC_##N) && defined(CUSTOM_MENU_MAIN_GCODE_##N)) + #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_CUSTOM_MENU_ITEM(1) + CUSTOM_MENU_ITEM(1); #endif - #if HAS_USER_ITEM(2) - USER_ITEM(2); + #if HAS_CUSTOM_MENU_ITEM(2) + CUSTOM_MENU_ITEM(2); #endif - #if HAS_USER_ITEM(3) - USER_ITEM(3); + #if HAS_CUSTOM_MENU_ITEM(3) + CUSTOM_MENU_ITEM(3); #endif - #if HAS_USER_ITEM(4) - USER_ITEM(4); + #if HAS_CUSTOM_MENU_ITEM(4) + CUSTOM_MENU_ITEM(4); #endif - #if HAS_USER_ITEM(5) - USER_ITEM(5); + #if HAS_CUSTOM_MENU_ITEM(5) + CUSTOM_MENU_ITEM(5); #endif - #if HAS_USER_ITEM(6) - USER_ITEM(6); + #if HAS_CUSTOM_MENU_ITEM(6) + CUSTOM_MENU_ITEM(6); #endif - #if HAS_USER_ITEM(7) - USER_ITEM(7); + #if HAS_CUSTOM_MENU_ITEM(7) + CUSTOM_MENU_ITEM(7); #endif - #if HAS_USER_ITEM(8) - USER_ITEM(8); + #if HAS_CUSTOM_MENU_ITEM(8) + CUSTOM_MENU_ITEM(8); #endif - #if HAS_USER_ITEM(9) - USER_ITEM(9); + #if HAS_CUSTOM_MENU_ITEM(9) + CUSTOM_MENU_ITEM(9); #endif - #if HAS_USER_ITEM(10) - USER_ITEM(10); + #if HAS_CUSTOM_MENU_ITEM(10) + CUSTOM_MENU_ITEM(10); #endif - #if HAS_USER_ITEM(11) - USER_ITEM(11); + #if HAS_CUSTOM_MENU_ITEM(11) + CUSTOM_MENU_ITEM(11); #endif - #if HAS_USER_ITEM(12) - USER_ITEM(12); + #if HAS_CUSTOM_MENU_ITEM(12) + CUSTOM_MENU_ITEM(12); #endif - #if HAS_USER_ITEM(13) - USER_ITEM(13); + #if HAS_CUSTOM_MENU_ITEM(13) + CUSTOM_MENU_ITEM(13); #endif - #if HAS_USER_ITEM(14) - USER_ITEM(14); + #if HAS_CUSTOM_MENU_ITEM(14) + CUSTOM_MENU_ITEM(14); #endif - #if HAS_USER_ITEM(15) - USER_ITEM(15); + #if HAS_CUSTOM_MENU_ITEM(15) + CUSTOM_MENU_ITEM(15); #endif - #if HAS_USER_ITEM(16) - USER_ITEM(16); + #if HAS_CUSTOM_MENU_ITEM(16) + CUSTOM_MENU_ITEM(16); #endif - #if HAS_USER_ITEM(17) - USER_ITEM(17); + #if HAS_CUSTOM_MENU_ITEM(17) + CUSTOM_MENU_ITEM(17); #endif - #if HAS_USER_ITEM(18) - USER_ITEM(18); + #if HAS_CUSTOM_MENU_ITEM(18) + CUSTOM_MENU_ITEM(18); #endif - #if HAS_USER_ITEM(19) - USER_ITEM(19); + #if HAS_CUSTOM_MENU_ITEM(19) + CUSTOM_MENU_ITEM(19); #endif - #if HAS_USER_ITEM(20) - USER_ITEM(20); + #if HAS_CUSTOM_MENU_ITEM(20) + CUSTOM_MENU_ITEM(20); #endif - #if HAS_USER_ITEM(21) - USER_ITEM(21); + #if HAS_CUSTOM_MENU_ITEM(21) + CUSTOM_MENU_ITEM(21); #endif - #if HAS_USER_ITEM(22) - USER_ITEM(22); + #if HAS_CUSTOM_MENU_ITEM(22) + CUSTOM_MENU_ITEM(22); #endif - #if HAS_USER_ITEM(23) - USER_ITEM(23); + #if HAS_CUSTOM_MENU_ITEM(23) + CUSTOM_MENU_ITEM(23); #endif - #if HAS_USER_ITEM(24) - USER_ITEM(24); + #if HAS_CUSTOM_MENU_ITEM(24) + CUSTOM_MENU_ITEM(24); #endif - #if HAS_USER_ITEM(25) - USER_ITEM(25); + #if HAS_CUSTOM_MENU_ITEM(25) + CUSTOM_MENU_ITEM(25); #endif 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 ) From 0c434cb49b255a11ad7ebabf8718ba9651d5b06c Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 17:12:06 -0700 Subject: [PATCH 6/9] Update SanityCheck.h Add sanity checks for custom g-code menus (Main and Configuration Menus). --- Marlin/src/inc/SanityCheck.h | 255 ++++++++++++++++++++++++----------- 1 file changed, 179 insertions(+), 76 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 905bcc0bd7..98b2ddf39d 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2616,106 +2616,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." #endif -#if ENABLED(CUSTOM_USER_MENUS) - #ifdef USER_GCODE_1 - constexpr char _chr1 = USER_GCODE_1[strlen(USER_GCODE_1) - 1]; - static_assert(_chr1 != '\n' && _chr1 != '\r', "USER_GCODE_1 cannot have a newline at the end. Please remove it."); +#if ENABLED(CUSTOM_MENUS_MAIN) + #ifdef CUSTOM_MENU_MAIN_GCODE_1 + constexpr char _chr1 = CUSTOM_MENU_MAIN_GCODE_1[strlen(CUSTOM_MENU_MAIN_GCODE_1) - 1]; + static_assert(_chr1 != '\n' && _chr1 != '\r', "CUSTOM_MENU_MAIN_GCODE_1 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_2 - constexpr char _chr2 = USER_GCODE_2[strlen(USER_GCODE_2) - 1]; - static_assert(_chr2 != '\n' && _chr2 != '\r', "USER_GCODE_2 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_2 + constexpr char _chr2 = CUSTOM_MENU_MAIN_GCODE_2[strlen(CUSTOM_MENU_MAIN_GCODE_2) - 1]; + static_assert(_chr2 != '\n' && _chr2 != '\r', "CUSTOM_MENU_MAIN_GCODE_2 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_3 - constexpr char _chr3 = USER_GCODE_3[strlen(USER_GCODE_3) - 1]; - static_assert(_chr3 != '\n' && _chr3 != '\r', "USER_GCODE_3 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_3 + constexpr char _chr3 = CUSTOM_MENU_MAIN_GCODE_3[strlen(CUSTOM_MENU_MAIN_GCODE_3) - 1]; + static_assert(_chr3 != '\n' && _chr3 != '\r', "CUSTOM_MENU_MAIN_GCODE_3 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_4 - constexpr char _chr4 = USER_GCODE_4[strlen(USER_GCODE_4) - 1]; - static_assert(_chr4 != '\n' && _chr4 != '\r', "USER_GCODE_4 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_4 + constexpr char _chr4 = CUSTOM_MENU_MAIN_GCODE_4[strlen(CUSTOM_MENU_MAIN_GCODE_4) - 1]; + static_assert(_chr4 != '\n' && _chr4 != '\r', "CUSTOM_MENU_MAIN_GCODE_4 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_5 - constexpr char _chr5 = USER_GCODE_5[strlen(USER_GCODE_5) - 1]; - static_assert(_chr5 != '\n' && _chr5 != '\r', "USER_GCODE_5 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_5 + constexpr char _chr5 = CUSTOM_MENU_MAIN_GCODE_5[strlen(CUSTOM_MENU_MAIN_GCODE_5) - 1]; + static_assert(_chr5 != '\n' && _chr5 != '\r', "CUSTOM_MENU_MAIN_GCODE_5 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_6 - constexpr char _chr6 = USER_GCODE_6[strlen(USER_GCODE_6) - 1]; - static_assert(_chr6 != '\n' && _chr6 != '\r', "USER_GCODE_6 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_6 + constexpr char _chr6 = CUSTOM_MENU_MAIN_GCODE_6[strlen(CUSTOM_MENU_MAIN_GCODE_6) - 1]; + static_assert(_chr6 != '\n' && _chr6 != '\r', "CUSTOM_MENU_MAIN_GCODE_6 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_7 - constexpr char _chr7 = USER_GCODE_7[strlen(USER_GCODE_7) - 1]; - static_assert(_chr7 != '\n' && _chr7 != '\r', "USER_GCODE_7 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_7 + constexpr char _chr7 = CUSTOM_MENU_MAIN_GCODE_7[strlen(CUSTOM_MENU_MAIN_GCODE_7) - 1]; + static_assert(_chr7 != '\n' && _chr7 != '\r', "CUSTOM_MENU_MAIN_GCODE_7 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_8 - constexpr char _chr8 = USER_GCODE_8[strlen(USER_GCODE_8) - 1]; - static_assert(_chr8 != '\n' && _chr8 != '\r', "USER_GCODE_8 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_8 + constexpr char _chr8 = CUSTOM_MENU_MAIN_GCODE_8[strlen(CUSTOM_MENU_MAIN_GCODE_8) - 1]; + static_assert(_chr8 != '\n' && _chr8 != '\r', "CUSTOM_MENU_MAIN_GCODE_8 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_9 - constexpr char _chr9 = USER_GCODE_9[strlen(USER_GCODE_9) - 1]; - static_assert(_chr9 != '\n' && _chr9 != '\r', "USER_GCODE_9 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_9 + constexpr char _chr9 = CUSTOM_MENU_MAIN_GCODE_9[strlen(CUSTOM_MENU_MAIN_GCODE_9) - 1]; + static_assert(_chr9 != '\n' && _chr9 != '\r', "CUSTOM_MENU_MAIN_GCODE_9 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_10 - constexpr char _chr10 = USER_GCODE_10[strlen(USER_GCODE_10) - 1]; - static_assert(_chr10 != '\n' && _chr10 != '\r', "USER_GCODE_10 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_10 + constexpr char _chr10 = CUSTOM_MENU_MAIN_GCODE_10[strlen(CUSTOM_MENU_MAIN_GCODE_10) - 1]; + static_assert(_chr10 != '\n' && _chr10 != '\r', "CUSTOM_MENU_MAIN_GCODE_10 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_11 - constexpr char _chr11 = USER_GCODE_11[strlen(USER_GCODE_11) - 1]; - static_assert(_chr11 != '\n' && _chr11 != '\r', "USER_GCODE_11 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_11 + constexpr char _chr11 = CUSTOM_MENU_MAIN_GCODE_11[strlen(CUSTOM_MENU_MAIN_GCODE_11) - 1]; + static_assert(_chr11 != '\n' && _chr11 != '\r', "CUSTOM_MENU_MAIN_GCODE_11 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_12 - constexpr char _chr12 = USER_GCODE_12[strlen(USER_GCODE_12) - 1]; - static_assert(_chr12 != '\n' && _chr12 != '\r', "USER_GCODE_12 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_12 + constexpr char _chr12 = CUSTOM_MENU_MAIN_GCODE_12[strlen(CUSTOM_MENU_MAIN_GCODE_12) - 1]; + static_assert(_chr12 != '\n' && _chr12 != '\r', "CUSTOM_MENU_MAIN_GCODE_12 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_13 - constexpr char _chr13 = USER_GCODE_13[strlen(USER_GCODE_13) - 1]; - static_assert(_chr13 != '\n' && _chr13 != '\r', "USER_GCODE_13 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_13 + constexpr char _chr13 = CUSTOM_MENU_MAIN_GCODE_13[strlen(CUSTOM_MENU_MAIN_GCODE_13) - 1]; + static_assert(_chr13 != '\n' && _chr13 != '\r', "CUSTOM_MENU_MAIN_GCODE_13 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_14 - constexpr char _chr14 = USER_GCODE_14[strlen(USER_GCODE_14) - 1]; - static_assert(_chr14 != '\n' && _chr14 != '\r', "USER_GCODE_14 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_14 + constexpr char _chr14 = CUSTOM_MENU_MAIN_GCODE_14[strlen(CUSTOM_MENU_MAIN_GCODE_14) - 1]; + static_assert(_chr14 != '\n' && _chr14 != '\r', "CUSTOM_MENU_MAIN_GCODE_14 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_15 - constexpr char _chr15 = USER_GCODE_15[strlen(USER_GCODE_15) - 1]; - static_assert(_chr15 != '\n' && _chr15 != '\r', "USER_GCODE_15 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_15 + constexpr char _chr15 = CUSTOM_MENU_MAIN_GCODE_15[strlen(CUSTOM_MENU_MAIN_GCODE_15) - 1]; + static_assert(_chr15 != '\n' && _chr15 != '\r', "CUSTOM_MENU_MAIN_GCODE_15 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_16 - constexpr char _chr16 = USER_GCODE_16[strlen(USER_GCODE_16) - 1]; - static_assert(_chr16 != '\n' && _chr16 != '\r', "USER_GCODE_16 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_16 + constexpr char _chr16 = CUSTOM_MENU_MAIN_GCODE_16[strlen(CUSTOM_MENU_MAIN_GCODE_16) - 1]; + static_assert(_chr16 != '\n' && _chr16 != '\r', "CUSTOM_MENU_MAIN_GCODE_16 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_17 - constexpr char _chr17 = USER_GCODE_17[strlen(USER_GCODE_17) - 1]; - static_assert(_chr17 != '\n' && _chr17 != '\r', "USER_GCODE_17 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_17 + constexpr char _chr17 = CUSTOM_MENU_MAIN_GCODE_17[strlen(CUSTOM_MENU_MAIN_GCODE_17) - 1]; + static_assert(_chr17 != '\n' && _chr17 != '\r', "CUSTOM_MENU_MAIN_GCODE_17 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_18 - constexpr char _chr18 = USER_GCODE_18[strlen(USER_GCODE_18) - 1]; - static_assert(_chr18 != '\n' && _chr18 != '\r', "USER_GCODE_18 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_18 + constexpr char _chr18 = CUSTOM_MENU_MAIN_GCODE_18[strlen(CUSTOM_MENU_MAIN_GCODE_18) - 1]; + static_assert(_chr18 != '\n' && _chr18 != '\r', "CUSTOM_MENU_MAIN_GCODE_18 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_19 - constexpr char _chr19 = USER_GCODE_19[strlen(USER_GCODE_19) - 1]; - static_assert(_chr19 != '\n' && _chr19 != '\r', "USER_GCODE_19 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_19 + constexpr char _chr19 = CUSTOM_MENU_MAIN_GCODE_19[strlen(CUSTOM_MENU_MAIN_GCODE_19) - 1]; + static_assert(_chr19 != '\n' && _chr19 != '\r', "CUSTOM_MENU_MAIN_GCODE_19 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_20 - constexpr char _chr20 = USER_GCODE_20[strlen(USER_GCODE_20) - 1]; - static_assert(_chr20 != '\n' && _chr20 != '\r', "USER_GCODE_20 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_20 + constexpr char _chr20 = CUSTOM_MENU_MAIN_GCODE_20[strlen(CUSTOM_MENU_MAIN_GCODE_20) - 1]; + static_assert(_chr20 != '\n' && _chr20 != '\r', "CUSTOM_MENU_MAIN_GCODE_20 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_21 - constexpr char _chr21 = USER_GCODE_21[strlen(USER_GCODE_21) - 1]; - static_assert(_chr21 != '\n' && _chr21 != '\r', "USER_GCODE_21 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_21 + constexpr char _chr21 = CUSTOM_MENU_MAIN_GCODE_21[strlen(CUSTOM_MENU_MAIN_GCODE_21) - 1]; + static_assert(_chr21 != '\n' && _chr21 != '\r', "CUSTOM_MENU_MAIN_GCODE_21 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_22 - constexpr char _chr22 = USER_GCODE_22[strlen(USER_GCODE_22) - 1]; - static_assert(_chr22 != '\n' && _chr22 != '\r', "USER_GCODE_22 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_22 + constexpr char _chr22 = CUSTOM_MENU_MAIN_GCODE_22[strlen(CUSTOM_MENU_MAIN_GCODE_22) - 1]; + static_assert(_chr22 != '\n' && _chr22 != '\r', "CUSTOM_MENU_MAIN_GCODE_22 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_23 - constexpr char _chr23 = USER_GCODE_23[strlen(USER_GCODE_23) - 1]; - static_assert(_chr23 != '\n' && _chr23 != '\r', "USER_GCODE_23 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_23 + constexpr char _chr23 = CUSTOM_MENU_MAIN_GCODE_23[strlen(CUSTOM_MENU_MAIN_GCODE_23) - 1]; + static_assert(_chr23 != '\n' && _chr23 != '\r', "CUSTOM_MENU_MAIN_GCODE_23 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_24 - constexpr char _chr24 = USER_GCODE_24[strlen(USER_GCODE_24) - 1]; - static_assert(_chr24 != '\n' && _chr24 != '\r', "USER_GCODE_24 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_24 + constexpr char _chr24 = CUSTOM_MENU_MAIN_GCODE_24[strlen(CUSTOM_MENU_MAIN_GCODE_24) - 1]; + static_assert(_chr24 != '\n' && _chr24 != '\r', "CUSTOM_MENU_MAIN_GCODE_24 cannot have a newline at the end. Please remove it."); #endif - #ifdef USER_GCODE_25 - constexpr char _chr25 = USER_GCODE_25[strlen(USER_GCODE_25) - 1]; - static_assert(_chr25 != '\n' && _chr25 != '\r', "USER_GCODE_25 cannot have a newline at the end. Please remove it."); + #ifdef CUSTOM_MENU_MAIN_GCODE_25 + constexpr char _chr25 = CUSTOM_MENU_MAIN_GCODE_25[strlen(CUSTOM_MENU_MAIN_GCODE_25) - 1]; + 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 From f5981596fe091aee55e64584e5f9ddbaf6c78c63 Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 20:26:00 -0700 Subject: [PATCH 7/9] Update SanityCheck.h rename '_charX' to eliminate duplicate variable names. --- Marlin/src/inc/SanityCheck.h | 102 +++++++++++++++++------------------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 98b2ddf39d..9c2f2165ae 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2618,104 +2618,104 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #if ENABLED(CUSTOM_MENUS_MAIN) #ifdef CUSTOM_MENU_MAIN_GCODE_1 - constexpr char _chr1 = CUSTOM_MENU_MAIN_GCODE_1[strlen(CUSTOM_MENU_MAIN_GCODE_1) - 1]; - static_assert(_chr1 != '\n' && _chr1 != '\r', "CUSTOM_MENU_MAIN_GCODE_1 cannot have a newline at the end. Please remove it."); + constexpr char chr1 = CUSTOM_MENU_MAIN_GCODE_1[strlen(CUSTOM_MENU_MAIN_GCODE_1) - 1]; + static_assert(chr1 != '\n' && chr1 != '\r', "CUSTOM_MENU_MAIN_GCODE_1 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_2 - constexpr char _chr2 = CUSTOM_MENU_MAIN_GCODE_2[strlen(CUSTOM_MENU_MAIN_GCODE_2) - 1]; - static_assert(_chr2 != '\n' && _chr2 != '\r', "CUSTOM_MENU_MAIN_GCODE_2 cannot have a newline at the end. Please remove it."); + constexpr char chr2 = CUSTOM_MENU_MAIN_GCODE_2[strlen(CUSTOM_MENU_MAIN_GCODE_2) - 1]; + static_assert(chr2 != '\n' && chr2 != '\r', "CUSTOM_MENU_MAIN_GCODE_2 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_3 - constexpr char _chr3 = CUSTOM_MENU_MAIN_GCODE_3[strlen(CUSTOM_MENU_MAIN_GCODE_3) - 1]; - static_assert(_chr3 != '\n' && _chr3 != '\r', "CUSTOM_MENU_MAIN_GCODE_3 cannot have a newline at the end. Please remove it."); + constexpr char chr3 = CUSTOM_MENU_MAIN_GCODE_3[strlen(CUSTOM_MENU_MAIN_GCODE_3) - 1]; + static_assert(chr3 != '\n' && chr3 != '\r', "CUSTOM_MENU_MAIN_GCODE_3 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_4 - constexpr char _chr4 = CUSTOM_MENU_MAIN_GCODE_4[strlen(CUSTOM_MENU_MAIN_GCODE_4) - 1]; - static_assert(_chr4 != '\n' && _chr4 != '\r', "CUSTOM_MENU_MAIN_GCODE_4 cannot have a newline at the end. Please remove it."); + constexpr char chr4 = CUSTOM_MENU_MAIN_GCODE_4[strlen(CUSTOM_MENU_MAIN_GCODE_4) - 1]; + static_assert(chr4 != '\n' && chr4 != '\r', "CUSTOM_MENU_MAIN_GCODE_4 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_5 - constexpr char _chr5 = CUSTOM_MENU_MAIN_GCODE_5[strlen(CUSTOM_MENU_MAIN_GCODE_5) - 1]; - static_assert(_chr5 != '\n' && _chr5 != '\r', "CUSTOM_MENU_MAIN_GCODE_5 cannot have a newline at the end. Please remove it."); + constexpr char chr5 = CUSTOM_MENU_MAIN_GCODE_5[strlen(CUSTOM_MENU_MAIN_GCODE_5) - 1]; + static_assert(chr5 != '\n' && chr5 != '\r', "CUSTOM_MENU_MAIN_GCODE_5 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_6 - constexpr char _chr6 = CUSTOM_MENU_MAIN_GCODE_6[strlen(CUSTOM_MENU_MAIN_GCODE_6) - 1]; - static_assert(_chr6 != '\n' && _chr6 != '\r', "CUSTOM_MENU_MAIN_GCODE_6 cannot have a newline at the end. Please remove it."); + constexpr char chr6 = CUSTOM_MENU_MAIN_GCODE_6[strlen(CUSTOM_MENU_MAIN_GCODE_6) - 1]; + static_assert(chr6 != '\n' && chr6 != '\r', "CUSTOM_MENU_MAIN_GCODE_6 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_7 - constexpr char _chr7 = CUSTOM_MENU_MAIN_GCODE_7[strlen(CUSTOM_MENU_MAIN_GCODE_7) - 1]; - static_assert(_chr7 != '\n' && _chr7 != '\r', "CUSTOM_MENU_MAIN_GCODE_7 cannot have a newline at the end. Please remove it."); + constexpr char chr7 = CUSTOM_MENU_MAIN_GCODE_7[strlen(CUSTOM_MENU_MAIN_GCODE_7) - 1]; + static_assert(chr7 != '\n' && chr7 != '\r', "CUSTOM_MENU_MAIN_GCODE_7 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_8 - constexpr char _chr8 = CUSTOM_MENU_MAIN_GCODE_8[strlen(CUSTOM_MENU_MAIN_GCODE_8) - 1]; - static_assert(_chr8 != '\n' && _chr8 != '\r', "CUSTOM_MENU_MAIN_GCODE_8 cannot have a newline at the end. Please remove it."); + constexpr char chr8 = CUSTOM_MENU_MAIN_GCODE_8[strlen(CUSTOM_MENU_MAIN_GCODE_8) - 1]; + static_assert(chr8 != '\n' && chr8 != '\r', "CUSTOM_MENU_MAIN_GCODE_8 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_9 - constexpr char _chr9 = CUSTOM_MENU_MAIN_GCODE_9[strlen(CUSTOM_MENU_MAIN_GCODE_9) - 1]; - static_assert(_chr9 != '\n' && _chr9 != '\r', "CUSTOM_MENU_MAIN_GCODE_9 cannot have a newline at the end. Please remove it."); + constexpr char chr9 = CUSTOM_MENU_MAIN_GCODE_9[strlen(CUSTOM_MENU_MAIN_GCODE_9) - 1]; + static_assert(chr9 != '\n' && chr9 != '\r', "CUSTOM_MENU_MAIN_GCODE_9 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_10 - constexpr char _chr10 = CUSTOM_MENU_MAIN_GCODE_10[strlen(CUSTOM_MENU_MAIN_GCODE_10) - 1]; - static_assert(_chr10 != '\n' && _chr10 != '\r', "CUSTOM_MENU_MAIN_GCODE_10 cannot have a newline at the end. Please remove it."); + constexpr char chr10 = CUSTOM_MENU_MAIN_GCODE_10[strlen(CUSTOM_MENU_MAIN_GCODE_10) - 1]; + static_assert(chr10 != '\n' && chr10 != '\r', "CUSTOM_MENU_MAIN_GCODE_10 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_11 - constexpr char _chr11 = CUSTOM_MENU_MAIN_GCODE_11[strlen(CUSTOM_MENU_MAIN_GCODE_11) - 1]; - static_assert(_chr11 != '\n' && _chr11 != '\r', "CUSTOM_MENU_MAIN_GCODE_11 cannot have a newline at the end. Please remove it."); + constexpr char chr11 = CUSTOM_MENU_MAIN_GCODE_11[strlen(CUSTOM_MENU_MAIN_GCODE_11) - 1]; + static_assert(chr11 != '\n' && chr11 != '\r', "CUSTOM_MENU_MAIN_GCODE_11 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_12 - constexpr char _chr12 = CUSTOM_MENU_MAIN_GCODE_12[strlen(CUSTOM_MENU_MAIN_GCODE_12) - 1]; - static_assert(_chr12 != '\n' && _chr12 != '\r', "CUSTOM_MENU_MAIN_GCODE_12 cannot have a newline at the end. Please remove it."); + constexpr char chr12 = CUSTOM_MENU_MAIN_GCODE_12[strlen(CUSTOM_MENU_MAIN_GCODE_12) - 1]; + static_assert(chr12 != '\n' && chr12 != '\r', "CUSTOM_MENU_MAIN_GCODE_12 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_13 - constexpr char _chr13 = CUSTOM_MENU_MAIN_GCODE_13[strlen(CUSTOM_MENU_MAIN_GCODE_13) - 1]; - static_assert(_chr13 != '\n' && _chr13 != '\r', "CUSTOM_MENU_MAIN_GCODE_13 cannot have a newline at the end. Please remove it."); + constexpr char chr13 = CUSTOM_MENU_MAIN_GCODE_13[strlen(CUSTOM_MENU_MAIN_GCODE_13) - 1]; + static_assert(chr13 != '\n' && chr13 != '\r', "CUSTOM_MENU_MAIN_GCODE_13 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_14 - constexpr char _chr14 = CUSTOM_MENU_MAIN_GCODE_14[strlen(CUSTOM_MENU_MAIN_GCODE_14) - 1]; - static_assert(_chr14 != '\n' && _chr14 != '\r', "CUSTOM_MENU_MAIN_GCODE_14 cannot have a newline at the end. Please remove it."); + constexpr char chr14 = CUSTOM_MENU_MAIN_GCODE_14[strlen(CUSTOM_MENU_MAIN_GCODE_14) - 1]; + static_assert(chr14 != '\n' && chr14 != '\r', "CUSTOM_MENU_MAIN_GCODE_14 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_15 - constexpr char _chr15 = CUSTOM_MENU_MAIN_GCODE_15[strlen(CUSTOM_MENU_MAIN_GCODE_15) - 1]; - static_assert(_chr15 != '\n' && _chr15 != '\r', "CUSTOM_MENU_MAIN_GCODE_15 cannot have a newline at the end. Please remove it."); + constexpr char chr15 = CUSTOM_MENU_MAIN_GCODE_15[strlen(CUSTOM_MENU_MAIN_GCODE_15) - 1]; + static_assert(chr15 != '\n' && chr15 != '\r', "CUSTOM_MENU_MAIN_GCODE_15 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_16 - constexpr char _chr16 = CUSTOM_MENU_MAIN_GCODE_16[strlen(CUSTOM_MENU_MAIN_GCODE_16) - 1]; - static_assert(_chr16 != '\n' && _chr16 != '\r', "CUSTOM_MENU_MAIN_GCODE_16 cannot have a newline at the end. Please remove it."); + constexpr char chr16 = CUSTOM_MENU_MAIN_GCODE_16[strlen(CUSTOM_MENU_MAIN_GCODE_16) - 1]; + static_assert(chr16 != '\n' && chr16 != '\r', "CUSTOM_MENU_MAIN_GCODE_16 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_17 - constexpr char _chr17 = CUSTOM_MENU_MAIN_GCODE_17[strlen(CUSTOM_MENU_MAIN_GCODE_17) - 1]; - static_assert(_chr17 != '\n' && _chr17 != '\r', "CUSTOM_MENU_MAIN_GCODE_17 cannot have a newline at the end. Please remove it."); + constexpr char chr17 = CUSTOM_MENU_MAIN_GCODE_17[strlen(CUSTOM_MENU_MAIN_GCODE_17) - 1]; + static_assert(chr17 != '\n' && chr17 != '\r', "CUSTOM_MENU_MAIN_GCODE_17 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_18 - constexpr char _chr18 = CUSTOM_MENU_MAIN_GCODE_18[strlen(CUSTOM_MENU_MAIN_GCODE_18) - 1]; - static_assert(_chr18 != '\n' && _chr18 != '\r', "CUSTOM_MENU_MAIN_GCODE_18 cannot have a newline at the end. Please remove it."); + constexpr char chr18 = CUSTOM_MENU_MAIN_GCODE_18[strlen(CUSTOM_MENU_MAIN_GCODE_18) - 1]; + static_assert(chr18 != '\n' && chr18 != '\r', "CUSTOM_MENU_MAIN_GCODE_18 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_19 - constexpr char _chr19 = CUSTOM_MENU_MAIN_GCODE_19[strlen(CUSTOM_MENU_MAIN_GCODE_19) - 1]; - static_assert(_chr19 != '\n' && _chr19 != '\r', "CUSTOM_MENU_MAIN_GCODE_19 cannot have a newline at the end. Please remove it."); + constexpr char chr19 = CUSTOM_MENU_MAIN_GCODE_19[strlen(CUSTOM_MENU_MAIN_GCODE_19) - 1]; + static_assert(chr19 != '\n' && chr19 != '\r', "CUSTOM_MENU_MAIN_GCODE_19 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_20 - constexpr char _chr20 = CUSTOM_MENU_MAIN_GCODE_20[strlen(CUSTOM_MENU_MAIN_GCODE_20) - 1]; - static_assert(_chr20 != '\n' && _chr20 != '\r', "CUSTOM_MENU_MAIN_GCODE_20 cannot have a newline at the end. Please remove it."); + constexpr char chr20 = CUSTOM_MENU_MAIN_GCODE_20[strlen(CUSTOM_MENU_MAIN_GCODE_20) - 1]; + static_assert(chr20 != '\n' && _chr20 != '\r', "CUSTOM_MENU_MAIN_GCODE_20 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_21 - constexpr char _chr21 = CUSTOM_MENU_MAIN_GCODE_21[strlen(CUSTOM_MENU_MAIN_GCODE_21) - 1]; - static_assert(_chr21 != '\n' && _chr21 != '\r', "CUSTOM_MENU_MAIN_GCODE_21 cannot have a newline at the end. Please remove it."); + constexpr char chr21 = CUSTOM_MENU_MAIN_GCODE_21[strlen(CUSTOM_MENU_MAIN_GCODE_21) - 1]; + static_assert(chr21 != '\n' && chr21 != '\r', "CUSTOM_MENU_MAIN_GCODE_21 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_22 - constexpr char _chr22 = CUSTOM_MENU_MAIN_GCODE_22[strlen(CUSTOM_MENU_MAIN_GCODE_22) - 1]; - static_assert(_chr22 != '\n' && _chr22 != '\r', "CUSTOM_MENU_MAIN_GCODE_22 cannot have a newline at the end. Please remove it."); + constexpr char chr22 = CUSTOM_MENU_MAIN_GCODE_22[strlen(CUSTOM_MENU_MAIN_GCODE_22) - 1]; + static_assert(chr22 != '\n' && chr22 != '\r', "CUSTOM_MENU_MAIN_GCODE_22 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_23 - constexpr char _chr23 = CUSTOM_MENU_MAIN_GCODE_23[strlen(CUSTOM_MENU_MAIN_GCODE_23) - 1]; - static_assert(_chr23 != '\n' && _chr23 != '\r', "CUSTOM_MENU_MAIN_GCODE_23 cannot have a newline at the end. Please remove it."); + constexpr char chr23 = CUSTOM_MENU_MAIN_GCODE_23[strlen(CUSTOM_MENU_MAIN_GCODE_23) - 1]; + static_assert(chr23 != '\n' && chr23 != '\r', "CUSTOM_MENU_MAIN_GCODE_23 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_24 - constexpr char _chr24 = CUSTOM_MENU_MAIN_GCODE_24[strlen(CUSTOM_MENU_MAIN_GCODE_24) - 1]; - static_assert(_chr24 != '\n' && _chr24 != '\r', "CUSTOM_MENU_MAIN_GCODE_24 cannot have a newline at the end. Please remove it."); + constexpr char chr24 = CUSTOM_MENU_MAIN_GCODE_24[strlen(CUSTOM_MENU_MAIN_GCODE_24) - 1]; + static_assert(chr24 != '\n' && chr24 != '\r', "CUSTOM_MENU_MAIN_GCODE_24 cannot have a newline at the end. Please remove it."); #endif #ifdef CUSTOM_MENU_MAIN_GCODE_25 - constexpr char _chr25 = CUSTOM_MENU_MAIN_GCODE_25[strlen(CUSTOM_MENU_MAIN_GCODE_25) - 1]; - static_assert(_chr25 != '\n' && _chr25 != '\r', "CUSTOM_MENU_MAIN_GCODE_25 cannot have a newline at the end. Please remove it."); + constexpr char chr25 = CUSTOM_MENU_MAIN_GCODE_25[strlen(CUSTOM_MENU_MAIN_GCODE_25) - 1]; + static_assert(chr25 != '\n' && chr25 != '\r', "CUSTOM_MENU_MAIN_GCODE_25 cannot have a newline at the end. Please remove it."); #endif #endif @@ -2770,7 +2770,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #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."); + static_assert(_chr_13 != '\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]; From b7d019b1189d318dda8247edd002b07deee182c6 Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 20:29:39 -0700 Subject: [PATCH 8/9] Update SanityCheck.h fix typo character. --- Marlin/src/inc/SanityCheck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 9c2f2165ae..8cad1a96a2 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2770,7 +2770,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #ifdef CUSTOM_MENU_CONFIGURATION_GCODE_13 constexpr char _chr13 = CUSTOM_MENU_CONFIGURATION_GCODE_13[strlen(CUSTOM_MENU_CONFIGURATION_GCODE_13) - 1]; - static_assert(_chr_13 != '\n' && _chr13 != '\r', "CUSTOM_MENU_CONFIGURATION_GCODE_13 cannot have a newline at the end. Please remove it."); + 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]; From 2947dc344480537e31a79f912a55d39abcdbddd5 Mon Sep 17 00:00:00 2001 From: borland1 Date: Mon, 1 Jun 2020 20:34:29 -0700 Subject: [PATCH 9/9] Update SanityCheck.h fix typo in variable name. --- Marlin/src/inc/SanityCheck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 8cad1a96a2..3569d56d3c 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2695,7 +2695,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #ifdef CUSTOM_MENU_MAIN_GCODE_20 constexpr char chr20 = CUSTOM_MENU_MAIN_GCODE_20[strlen(CUSTOM_MENU_MAIN_GCODE_20) - 1]; - static_assert(chr20 != '\n' && _chr20 != '\r', "CUSTOM_MENU_MAIN_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 #ifdef CUSTOM_MENU_MAIN_GCODE_21 constexpr char chr21 = CUSTOM_MENU_MAIN_GCODE_21[strlen(CUSTOM_MENU_MAIN_GCODE_21) - 1];