Main / Config Custom Submenus (#18177)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -536,7 +536,7 @@
|
||||
(defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == (N)) || \
|
||||
(defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N))
|
||||
|
||||
#if ENABLED(CUSTOM_USER_MENUS)
|
||||
#if BOTH(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN)
|
||||
#define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N))
|
||||
#define HAS_USER_ITEM(V...) DO(HAS,||,V)
|
||||
#else
|
||||
|
@@ -553,6 +553,8 @@
|
||||
#error "Z_AFTER_DEACTIVATE is replaced by Z_IDLE_HEIGHT."
|
||||
#elif defined(MEATPACK)
|
||||
#error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc."
|
||||
#elif defined(CUSTOM_USER_MENUS)
|
||||
#error "CUSTOM_USER_MENUS has been replaced by CUSTOM_MENU_MAIN and CUSTOM_MENU_CONFIG."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2986,109 +2988,6 @@ 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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#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.");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(BACKLASH_COMPENSATION)
|
||||
#ifndef BACKLASH_DISTANCE_MM
|
||||
#error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM."
|
||||
|
Reference in New Issue
Block a user