Skip to content

Commit e3fecd9

Browse files
dakejahlAlexKlimaj
authored andcommitted
dshot: fix scaling (#25001)
1 parent f244b48 commit e3fecd9

File tree

1 file changed

+1
-1
lines changed
  • platforms/nuttx/src/px4/stm/stm32_common/dshot

1 file changed

+1
-1
lines changed

platforms/nuttx/src/px4/stm/stm32_common/dshot/dshot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ void process_capture_results(uint8_t timer_index, uint8_t channel_index)
553553

554554
} else {
555555
// Convert the period to eRPM
556-
_erpms[output_channel] = (1000000 * 60) / period;
556+
_erpms[output_channel] = (1000000 * 60 / 100 + period / 2) / period;
557557
}
558558

559559
// We set it ready anyway, not to hold up other channels when used in round robin.

0 commit comments

Comments
 (0)