From e3fecd96d59ca737f8fb240a37cfbeaae458621f Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Tue, 10 Jun 2025 00:26:17 -0800 Subject: [PATCH] dshot: fix scaling (#25001) --- platforms/nuttx/src/px4/stm/stm32_common/dshot/dshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/nuttx/src/px4/stm/stm32_common/dshot/dshot.c b/platforms/nuttx/src/px4/stm/stm32_common/dshot/dshot.c index 22e9fda161..48e12dd8f7 100644 --- a/platforms/nuttx/src/px4/stm/stm32_common/dshot/dshot.c +++ b/platforms/nuttx/src/px4/stm/stm32_common/dshot/dshot.c @@ -553,7 +553,7 @@ void process_capture_results(uint8_t timer_index, uint8_t channel_index) } else { // Convert the period to eRPM - _erpms[output_channel] = (1000000 * 60) / period; + _erpms[output_channel] = (1000000 * 60 / 100 + period / 2) / period; } // We set it ready anyway, not to hold up other channels when used in round robin.