Sanity check USER_GCODE formatting
This commit is contained in:
parent
d97bb4c41c
commit
10d855cb21
1 changed files with 23 additions and 0 deletions
|
@ -2024,6 +2024,29 @@ static_assert(sanity_arr_3[0] > 0 && sanity_arr_3[1] > 0 && sanity_arr_3[2] > 0
|
||||||
#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)
|
||||||
|
#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
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BACKLASH_COMPENSATION) && IS_CORE
|
#if ENABLED(BACKLASH_COMPENSATION) && IS_CORE
|
||||||
#error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
|
#error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
|
||||||
#endif
|
#endif
|
||||||
|
|
Reference in a new issue