1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

Remove duplication in motor enable/disable

This commit is contained in:
Martin Budden 2017-07-04 20:44:33 +01:00
parent ea896e5445
commit 3cdbaaf14d
6 changed files with 8 additions and 16 deletions

View file

@ -2231,7 +2231,7 @@ static void cliDshotProg(char *cmdline)
break;
default:
motorControlEnable = false;
pwmDisableMotors();
int command = atoi(pch);
if (command >= 0 && command < DSHOT_MIN_THROTTLE) {
@ -2259,7 +2259,7 @@ static void cliDshotProg(char *cmdline)
pch = strtok_r(NULL, " ", &saveptr);
}
motorControlEnable = true;
pwmEnableMotors();
}
#endif