Merge pull request #3306 from brianlbalogh/betaflight-pwmWriteDshotCommand-fix

Fix pwmWriteDshotCommand repeats
This commit is contained in:
Michael Keller 2017-06-18 15:43:12 +12:00 committed by GitHub
commit f37847bdda
1 changed files with 1 additions and 1 deletions

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;