Skip to content

Commit 7707cbf

Browse files
authored
🔧 Fix SHAPING_MIN_FREQ check (#25358)
1 parent 03bb28c commit 7707cbf

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
@@ -4008,13 +4008,13 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
40084008
#endif
40094009
#endif
40104010

4011+
#ifdef SHAPING_MIN_FREQ
4012+
static_assert((SHAPING_MIN_FREQ) > 0, "SHAPING_MIN_FREQ must be > 0.");
4013+
#else
4014+
TERN_(INPUT_SHAPING_X, static_assert((SHAPING_FREQ_X) > 0, "SHAPING_FREQ_X must be > 0 or SHAPING_MIN_FREQ must be set."));
4015+
TERN_(INPUT_SHAPING_Y, static_assert((SHAPING_FREQ_Y) > 0, "SHAPING_FREQ_Y must be > 0 or SHAPING_MIN_FREQ must be set."));
4016+
#endif
40114017
#ifdef __AVR__
4012-
#ifdef SHAPING_MIN_FREQ
4013-
static_assert((SHAPING_MIN_FREQ) > 0, "SHAPING_MIN_FREQ must be > 0.");
4014-
#else
4015-
TERN_(INPUT_SHAPING_X, static_assert((SHAPING_FREQ_X) > 0, "SHAPING_FREQ_X must be > 0 or SHAPING_MIN_FREQ must be set."));
4016-
TERN_(INPUT_SHAPING_Y, static_assert((SHAPING_FREQ_Y) > 0, "SHAPING_FREQ_Y must be > 0 or SHAPING_MIN_FREQ must be set."));
4017-
#endif
40184018
#if ENABLED(INPUT_SHAPING_X)
40194019
#if F_CPU > 16000000
40204020
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)