From dcbfc9de2d8b420e14e2e2530f49a1c383105ad8 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Thu, 29 Apr 2021 13:52:38 -0700 Subject: [PATCH] io_timer:Fixed imposible logic --- platforms/nuttx/src/px4/stm/stm32_common/io_pins/io_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/nuttx/src/px4/stm/stm32_common/io_pins/io_timer.c b/platforms/nuttx/src/px4/stm/stm32_common/io_pins/io_timer.c index 7cb2ec778a..922029e146 100644 --- a/platforms/nuttx/src/px4/stm/stm32_common/io_pins/io_timer.c +++ b/platforms/nuttx/src/px4/stm/stm32_common/io_pins/io_timer.c @@ -769,7 +769,7 @@ int io_timer_set_rate(unsigned timer, unsigned rate) int changeOneShot = reallocate_channel_resources(channels, IOTimerChanMode_OneShot, IOTimerChanMode_PWMOut); int changeDshot = reallocate_channel_resources(channels, IOTimerChanMode_Dshot, IOTimerChanMode_PWMOut); - if (changeOneShot && changeDshot) { + if (changeOneShot || changeDshot) { io_timer_set_PWM_mode(timer); }