From 71834e204bf8b0b7d88531fc49103ac6eb37c38b Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 9 Aug 2025 07:08:48 +1200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Sanity=20check=20PID=5FMAX,=20MA?= =?UTF-8?q?X=5FBED=5FPOWER=20(#27979)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 60b328ea67..1ff1e2b641 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1028,6 +1028,9 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #undef MPC_AUTOTUNE_MENU #undef MPC_PTC #endif +#if !WITHIN(PID_MAX, 0, 255) + #error "PID_MAX must be an integer from 0 to 255." +#endif #if ENABLED(MPC_INCLUDE_FAN) #if !HAS_FAN @@ -1048,6 +1051,9 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #if ALL(PIDTEMPBED, BED_LIMIT_SWITCHING) #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED." #endif +#if !WITHIN(MAX_BED_POWER, 0, 255) + #error "MAX_BED_POWER must be an integer from 0 to 255." +#endif // Fan Kickstart power #if FAN_KICKSTART_TIME