1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

Fix pwmWriteDshotCommand repeats

This commit is contained in:
Brian Balogh 2017-06-17 22:44:48 -04:00
parent 1388c3ee82
commit f17c46038b

View file

@ -338,7 +338,7 @@ void pwmWriteDshotCommand(uint8_t index, uint8_t command)
motorDmaOutput_t *const motor = getMotorDmaOutput(index);
unsigned repeats;
if ((DSHOT_CMD_SPIN_ONE_WAY >= 7 && DSHOT_CMD_3D_MODE_ON <= 10) || DSHOT_CMD_SAVE_SETTINGS == 12 || (DSHOT_CMD_ROTATE_NORMAL >= 20 && DSHOT_CMD_ROTATE_REVERSE <= 21) ) {
if ((command >= DSHOT_CMD_SPIN_ONE_WAY && command <= DSHOT_CMD_3D_MODE_ON ) || command == DSHOT_CMD_SAVE_SETTINGS || (command >= DSHOT_CMD_ROTATE_NORMAL && command <= DSHOT_CMD_ROTATE_REVERSE) ) {
repeats = 10;
} else {
repeats = 1;