mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Re-added use_unsyncPwm
This commit is contained in:
parent
3e72bb5e3b
commit
af2ddeeffd
5 changed files with 63 additions and 63 deletions
|
@ -66,6 +66,7 @@ static flight3DConfig_t *flight3DConfig;
|
|||
static escAndServoConfig_t *escAndServoConfig;
|
||||
static airplaneConfig_t *airplaneConfig;
|
||||
static rxConfig_t *rxConfig;
|
||||
static bool syncPwm = false;
|
||||
|
||||
static mixerMode_e currentMixerMode;
|
||||
static motorMixer_t currentMixer[MAX_SUPPORTED_MOTORS];
|
||||
|
@ -420,13 +421,15 @@ void mixerInit(mixerMode_e mixerMode, motorMixer_t *initialCustomMotorMixers, se
|
|||
}
|
||||
}
|
||||
|
||||
void mixerUsePWMOutputConfiguration(pwmOutputConfiguration_t *pwmOutputConfiguration)
|
||||
void mixerUsePWMOutputConfiguration(pwmOutputConfiguration_t *pwmOutputConfiguration, bool use_unsyncedPwm)
|
||||
{
|
||||
int i;
|
||||
|
||||
motorCount = 0;
|
||||
servoCount = pwmOutputConfiguration->servoCount;
|
||||
|
||||
|
||||
syncPwm = use_unsyncedPwm;
|
||||
|
||||
if (currentMixerMode == MIXER_CUSTOM || currentMixerMode == MIXER_CUSTOM_TRI || currentMixerMode == MIXER_CUSTOM_AIRPLANE) {
|
||||
// load custom mixer into currentMixer
|
||||
for (i = 0; i < MAX_SUPPORTED_MOTORS; i++) {
|
||||
|
@ -635,13 +638,6 @@ void writeServos(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static bool syncPwm = false;
|
||||
|
||||
void syncMotors(bool enabled)
|
||||
{
|
||||
syncPwm = enabled;
|
||||
}
|
||||
|
||||
void writeMotors(void)
|
||||
{
|
||||
uint8_t i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue