|
@ -2233,27 +2233,63 @@ constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT, |
|
|
|
|
|
|
|
|
#define _ARR_TEST(N,I) (sanity_arr_##N[_MIN(I,int(COUNT(sanity_arr_##N))-1)] > 0) |
|
|
#define _ARR_TEST(N,I) (sanity_arr_##N[_MIN(I,int(COUNT(sanity_arr_##N))-1)] > 0) |
|
|
|
|
|
|
|
|
static_assert(COUNT(sanity_arr_1) >= XYZE, "DEFAULT_AXIS_STEPS_PER_UNIT requires X, Y, Z and E elements."); |
|
|
static_assert(COUNT(sanity_arr_1) >= XYZE, "DEFAULT_AXIS_STEPS_PER_UNIT requires X, Y, Z and E elements."); |
|
|
static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); |
|
|
static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); |
|
|
static_assert( _ARR_TEST(1,0) && _ARR_TEST(1,1) && _ARR_TEST(1,2) |
|
|
static_assert( _ARR_TEST(1,0) && _ARR_TEST(1,1) && _ARR_TEST(1,2) |
|
|
&& _ARR_TEST(1,3) && _ARR_TEST(1,4) && _ARR_TEST(1,5) |
|
|
&& _ARR_TEST(1,3) && _ARR_TEST(1,4) && _ARR_TEST(1,5) |
|
|
&& _ARR_TEST(1,6) && _ARR_TEST(1,7) && _ARR_TEST(1,8), |
|
|
&& _ARR_TEST(1,6) && _ARR_TEST(1,7) && _ARR_TEST(1,8), |
|
|
"DEFAULT_AXIS_STEPS_PER_UNIT values must be positive."); |
|
|
"DEFAULT_AXIS_STEPS_PER_UNIT values must be positive."); |
|
|
|
|
|
|
|
|
static_assert(COUNT(sanity_arr_2) >= XYZE, "DEFAULT_MAX_FEEDRATE requires X, Y, Z and E elements."); |
|
|
static_assert(COUNT(sanity_arr_2) >= XYZE, "DEFAULT_MAX_FEEDRATE requires X, Y, Z and E elements."); |
|
|
static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); |
|
|
static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); |
|
|
static_assert( _ARR_TEST(2,0) && _ARR_TEST(2,1) && _ARR_TEST(2,2) |
|
|
static_assert( _ARR_TEST(2,0) && _ARR_TEST(2,1) && _ARR_TEST(2,2) |
|
|
&& _ARR_TEST(2,3) && _ARR_TEST(2,4) && _ARR_TEST(2,5) |
|
|
&& _ARR_TEST(2,3) && _ARR_TEST(2,4) && _ARR_TEST(2,5) |
|
|
&& _ARR_TEST(2,6) && _ARR_TEST(2,7) && _ARR_TEST(2,8), |
|
|
&& _ARR_TEST(2,6) && _ARR_TEST(2,7) && _ARR_TEST(2,8), |
|
|
"DEFAULT_MAX_FEEDRATE values must be positive."); |
|
|
"DEFAULT_MAX_FEEDRATE values must be positive."); |
|
|
|
|
|
|
|
|
static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires X, Y, Z and E elements."); |
|
|
static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires X, Y, Z and E elements."); |
|
|
static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); |
|
|
static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); |
|
|
static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) |
|
|
static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) |
|
|
&& _ARR_TEST(3,3) && _ARR_TEST(3,4) && _ARR_TEST(3,5) |
|
|
&& _ARR_TEST(3,3) && _ARR_TEST(3,4) && _ARR_TEST(3,5) |
|
|
&& _ARR_TEST(3,6) && _ARR_TEST(3,7) && _ARR_TEST(3,8), |
|
|
&& _ARR_TEST(3,6) && _ARR_TEST(3,7) && _ARR_TEST(3,8), |
|
|
"DEFAULT_MAX_ACCELERATION values must be positive."); |
|
|
"DEFAULT_MAX_ACCELERATION values must be positive."); |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(LIMITED_MAX_ACCEL_EDITING) |
|
|
|
|
|
#ifdef MAX_ACCEL_EDIT_VALUES |
|
|
|
|
|
constexpr float sanity_arr_4[] = MAX_ACCEL_EDIT_VALUES; |
|
|
|
|
|
static_assert(COUNT(sanity_arr_4) >= XYZE, "MAX_ACCEL_EDIT_VALUES requires X, Y, Z and E elements."); |
|
|
|
|
|
static_assert(COUNT(sanity_arr_4) <= XYZE, "MAX_ACCEL_EDIT_VALUES has too many elements. X, Y, Z and E elements only."); |
|
|
|
|
|
static_assert( _ARR_TEST(4,0) && _ARR_TEST(4,1) && _ARR_TEST(4,2) |
|
|
|
|
|
&& _ARR_TEST(4,3) && _ARR_TEST(4,4) && _ARR_TEST(4,5) |
|
|
|
|
|
&& _ARR_TEST(4,6) && _ARR_TEST(4,7) && _ARR_TEST(4,8), |
|
|
|
|
|
"MAX_ACCEL_EDIT_VALUES values must be positive."); |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(LIMITED_MAX_FR_EDITING) |
|
|
|
|
|
#ifdef MAX_FEEDRATE_EDIT_VALUES |
|
|
|
|
|
constexpr float sanity_arr_5[] = MAX_FEEDRATE_EDIT_VALUES; |
|
|
|
|
|
static_assert(COUNT(sanity_arr_5) >= XYZE, "MAX_FEEDRATE_EDIT_VALUES requires X, Y, Z and E elements."); |
|
|
|
|
|
static_assert(COUNT(sanity_arr_5) <= XYZE, "MAX_FEEDRATE_EDIT_VALUES has too many elements. X, Y, Z and E elements only."); |
|
|
|
|
|
static_assert( _ARR_TEST(5,0) && _ARR_TEST(5,1) && _ARR_TEST(5,2) |
|
|
|
|
|
&& _ARR_TEST(5,3) && _ARR_TEST(5,4) && _ARR_TEST(5,5) |
|
|
|
|
|
&& _ARR_TEST(5,6) && _ARR_TEST(5,7) && _ARR_TEST(5,8), |
|
|
|
|
|
"MAX_FEEDRATE_EDIT_VALUES values must be positive."); |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(LIMITED_JERK_EDITING) |
|
|
|
|
|
#ifdef MAX_JERK_EDIT_VALUES |
|
|
|
|
|
constexpr float sanity_arr_6[] = MAX_JERK_EDIT_VALUES; |
|
|
|
|
|
static_assert(COUNT(sanity_arr_6) >= XYZE, "MAX_JERK_EDIT_VALUES requires X, Y, Z and E elements."); |
|
|
|
|
|
static_assert(COUNT(sanity_arr_6) <= XYZE, "MAX_JERK_EDIT_VALUES has too many elements. X, Y, Z and E elements only."); |
|
|
|
|
|
static_assert( _ARR_TEST(6,0) && _ARR_TEST(6,1) && _ARR_TEST(6,2) |
|
|
|
|
|
&& _ARR_TEST(6,3) && _ARR_TEST(6,4) && _ARR_TEST(6,5) |
|
|
|
|
|
&& _ARR_TEST(6,6) && _ARR_TEST(6,7) && _ARR_TEST(6,8), |
|
|
|
|
|
"MAX_JERK_EDIT_VALUES values must be positive."); |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#undef _ARR_TEST |
|
|
#undef _ARR_TEST |
|
|
|
|
|
|
|
|
#if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS) |
|
|
#if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS) |
|
|