NUM_REDUNDANT_FANS (#25808)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Vert
2023-05-13 17:51:12 -04:00
committed by GitHub
parent 40aa398285
commit 5859ff0280
9 changed files with 53 additions and 32 deletions

View File

@@ -1843,8 +1843,10 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#ifdef REDUNDANT_PART_COOLING_FAN
#if FAN_COUNT < 2
#error "REDUNDANT_PART_COOLING_FAN requires a board with at least two PWM fans."
#else
static_assert(WITHIN(REDUNDANT_PART_COOLING_FAN, 1, FAN_COUNT - 1), "REDUNDANT_PART_COOLING_FAN must be between 1 and " STRINGIFY(DECREMENT(FAN_COUNT)) ".");
#elif !WITHIN(REDUNDANT_PART_COOLING_FAN, 1, FAN_COUNT - 1)
static_assert(false, "REDUNDANT_PART_COOLING_FAN must be between 1 and " STRINGIFY(DECREMENT(FAN_COUNT)) ".");
#elif !WITHIN(REDUNDANT_PART_COOLING_FAN + NUM_REDUNDANT_FANS - 1, 1, FAN_COUNT - 1)
#error "Not enough fans available for NUM_REDUNDANT_FANS."
#endif
#endif