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:
parent
3cdbaaf14d
commit
87ae1616d6
5 changed files with 7 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue