From 0136c5a54ccc5ab076728806c687f2d5629d263e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?hamza=20=C3=B6zkan?= Date: Tue, 13 May 2025 21:30:14 +0300 Subject: [PATCH] Update pwm_output_hw.c (#14385) --- src/platform/STM32/pwm_output_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/STM32/pwm_output_hw.c b/src/platform/STM32/pwm_output_hw.c index ae8c6a21af..8824e16320 100644 --- a/src/platform/STM32/pwm_output_hw.c +++ b/src/platform/STM32/pwm_output_hw.c @@ -116,7 +116,7 @@ static void pwmWriteStandard(uint8_t index, float value) static void pwmShutdownPulsesForAllMotors(void) { - for (int index = 0; pwmMotorCount; index++) { + for (int index = 0; index < pwmMotorCount; index++) { // Set the compare register to 0, which stops the output pulsing if the timer overflows if (pwmMotors[index].channel.ccr) { *pwmMotors[index].channel.ccr = 0; @@ -135,7 +135,7 @@ static void pwmCompleteMotorUpdate(void) return; } - for (int index = 0; pwmMotorCount; index++) { + for (int index = 0; index < pwmMotorCount; index++) { if (pwmMotors[index].forceOverflow) { timerForceOverflow(pwmMotors[index].channel.tim); }