1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Further better use of pwmAreMotorsEnabled

This commit is contained in:
Martin Budden 2017-07-05 06:21:36 +01:00
parent 3cdbaaf14d
commit 87ae1616d6
5 changed files with 7 additions and 12 deletions

View file

@ -45,8 +45,8 @@ static pwmOutputPort_t beeperPwm;
static uint16_t freqBeep = 0;
#endif
bool pwmMotorsEnabled = false;
bool isDshot = false;
static bool pwmMotorsEnabled = false;
static bool isDshot = false;
static void pwmOCConfig(TIM_TypeDef *tim, uint8_t channel, uint16_t value, uint8_t output)
{
@ -395,7 +395,9 @@ void pwmWriteDshotCommand(uint8_t index, uint8_t command)
for (; repeats; repeats--) {
motor->requestTelemetry = true;
pwmWriteDshotInt(index, command);
pwmCompleteMotorUpdate(0);
if (pwmMotorsEnabled) {
pwmCompleteDshotMotorUpdate(0);
}
delay(1);
}