🩹 Fix ADVANCE_K + DISTINCT_E_FACTORS sanity check (#25007)

This commit is contained in:
Marcio T 2022-11-26 20:11:14 -07:00 committed by Scott Lahteine
parent 360e03797f
commit 3a28a1fd1d

View File

@ -1353,7 +1353,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if ENABLED(LIN_ADVANCE)
#if DISTINCT_E > 1
constexpr float lak[] = ADVANCE_K;
static_assert(COUNT(lak) < DISTINCT_E, "The ADVANCE_K array has too many elements (i.e., more than " STRINGIFY(DISTINCT_E) ").");
static_assert(COUNT(lak) <= DISTINCT_E, "The ADVANCE_K array has too many elements (i.e., more than " STRINGIFY(DISTINCT_E) ").");
#define _LIN_ASSERT(N) static_assert(N >= COUNT(lak) || WITHIN(lak[N], 0, 10), "ADVANCE_K values must be from 0 to 10 (Changed in LIN_ADVANCE v1.5, Marlin 1.1.9).");
REPEAT(DISTINCT_E, _LIN_ASSERT)
#undef _LIN_ASSERT