mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Add and handle USE_PWM_OUTPUT
This commit is contained in:
parent
de1c1d5377
commit
45b7fa8095
7 changed files with 37 additions and 5 deletions
|
@ -516,6 +516,7 @@ void mixerResetDisarmedMotors(void)
|
|||
|
||||
void writeMotors(void)
|
||||
{
|
||||
#ifdef USE_PWM_OUTPUT
|
||||
if (pwmAreMotorsEnabled()) {
|
||||
#if defined(USE_DSHOT) && defined(USE_DSHOT_TELEMETRY)
|
||||
if (!pwmStartMotorUpdate(motorCount)) {
|
||||
|
@ -527,6 +528,7 @@ void writeMotors(void)
|
|||
}
|
||||
pwmCompleteMotorUpdate(motorCount);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void writeAllMotors(int16_t mc)
|
||||
|
@ -546,8 +548,10 @@ void stopMotors(void)
|
|||
|
||||
void stopPwmAllMotors(void)
|
||||
{
|
||||
#ifdef USE_PWM_OUTPUT
|
||||
pwmShutdownPulsesForAllMotors(motorCount);
|
||||
delayMicroseconds(1500);
|
||||
#endif
|
||||
}
|
||||
|
||||
static FAST_RAM_ZERO_INIT float throttle = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue