diff --git a/Core/Inc/compute.h b/Core/Inc/compute.h index 2eb1873..e42e823 100644 --- a/Core/Inc/compute.h +++ b/Core/Inc/compute.h @@ -24,6 +24,7 @@ typedef enum { FAN4, FAN5, FAN6, + FANMAX } fan_select_t; /** diff --git a/Core/Src/compute.c b/Core/Src/compute.c index 3b060c4..5433eb6 100644 --- a/Core/Src/compute.c +++ b/Core/Src/compute.c @@ -128,7 +128,7 @@ bool compute_charger_connected() uint8_t compute_set_fan_speed(TIM_HandleTypeDef* pwmhandle, fan_select_t fan_select, uint8_t duty_cycle) { assert(pwmhandle); - assert(fan_select < 6); + assert(fan_select < FANMAX); assert(duty_cycle <= 100); uint32_t CCR_value = 0;