Skip to content

Commit 876f996

Browse files
cbagwellthinkyhead
authored andcommitted
🔧 Fix SHAPING_MIN_FREQ check (#25358)
1 parent dba521a commit 876f996

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Marlin/src/inc/SanityCheck.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4365,13 +4365,13 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
43654365
#endif
43664366
#endif
43674367

4368+
#ifdef SHAPING_MIN_FREQ
4369+
static_assert((SHAPING_MIN_FREQ) > 0, "SHAPING_MIN_FREQ must be > 0.");
4370+
#else
4371+
TERN_(INPUT_SHAPING_X, static_assert((SHAPING_FREQ_X) > 0, "SHAPING_FREQ_X must be > 0 or SHAPING_MIN_FREQ must be set."));
4372+
TERN_(INPUT_SHAPING_Y, static_assert((SHAPING_FREQ_Y) > 0, "SHAPING_FREQ_Y must be > 0 or SHAPING_MIN_FREQ must be set."));
4373+
#endif
43684374
#ifdef __AVR__
4369-
#ifdef SHAPING_MIN_FREQ
4370-
static_assert((SHAPING_MIN_FREQ) > 0, "SHAPING_MIN_FREQ must be > 0.");
4371-
#else
4372-
TERN_(INPUT_SHAPING_X, static_assert((SHAPING_FREQ_X) > 0, "SHAPING_FREQ_X must be > 0 or SHAPING_MIN_FREQ must be set."));
4373-
TERN_(INPUT_SHAPING_Y, static_assert((SHAPING_FREQ_Y) > 0, "SHAPING_FREQ_Y must be > 0 or SHAPING_MIN_FREQ must be set."));
4374-
#endif
43754375
#if ENABLED(INPUT_SHAPING_X)
43764376
#if F_CPU > 16000000
43774377
static_assert((SHAPING_FREQ_X) == 0 || (SHAPING_FREQ_X) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_X is below the minimum (20) for AVR 20MHz.");

0 commit comments

Comments
 (0)