🔧 Input Shaping sanity checks

This commit is contained in:
Scott Lahteine
2023-01-11 20:31:46 -06:00
parent 3d0b11a373
commit 80dc7b290b

View File

@@ -4369,8 +4369,29 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#error "BINARY_FILE_TRANSFER and CUSTOM_FIRMWARE_UPLOAD are required for custom upload."
#endif
// Check requirements for Input Shaping
#if HAS_SHAPING && defined(__AVR__)
/**
* Input Shaping requirements
*/
#if HAS_SHAPING
#if ENABLED(DELTA)
#error "Input Shaping is not compatible with DELTA kinematics."
#elif ENABLED(SCARA)
#error "Input Shaping is not compatible with SCARA kinematics."
#elif ENABLED(TPARA)
#error "Input Shaping is not compatible with TPARA kinematics."
#elif ENABLED(POLAR)
#error "Input Shaping is not compatible with POLAR kinematics."
#elif ENABLED(POLARGRAPH)
#error "Input Shaping is not compatible with POLARGRAPH kinematics."
#elif ENABLED(DIRECT_STEPPING)
#error "Input Shaping is not compatible with DIRECT_STEPPING."
#elif ENABLED(INPUT_SHAPING_X) && ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, MARKFORGED_YX)
#error "INPUT_SHAPING_X is not supported with COREXY, COREYX, COREXZ, COREZX, or MARKFORGED_*."
#elif ENABLED(INPUT_SHAPING_Y) && ANY(CORE_IS_XY, CORE_IS_YZ, MARKFORGED_XY, MARKFORGED_YX)
#error "INPUT_SHAPING_Y is not supported with COREXY, COREYX, COREYZ, COREZY, or MARKFORGED_*."
#endif
#ifdef __AVR__
#ifdef SHAPING_MIN_FREQ
static_assert((SHAPING_MIN_FREQ) > 0, "SHAPING_MIN_FREQ must be > 0.");
#else
@@ -4391,10 +4412,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
static_assert((SHAPING_FREQ_Y) == 0 || (SHAPING_FREQ_Y) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_Y is below the minimum (16) for AVR 16MHz.");
#endif
#endif
#endif
#if BOTH(HAS_SHAPING, DIRECT_STEPPING)
#error "INPUT_SHAPING_[XY] cannot currently be used with DIRECT_STEPPING."
#endif
#endif
// Misc. Cleanup