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:
parent
ea896e5445
commit
3cdbaaf14d
6 changed files with 8 additions and 16 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue