mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Ensure mixer is configured so that PWM initialisation is correct.
The isMixerUsingServos() was returing the wrong value in 9a7de3cf3c
This commit is contained in:
parent
cd73c25352
commit
02166a4fd0
1 changed files with 4 additions and 4 deletions
|
@ -178,6 +178,8 @@ void init(void)
|
||||||
|
|
||||||
timerInit(); // timer must be initialized before any channel is allocated
|
timerInit(); // timer must be initialized before any channel is allocated
|
||||||
|
|
||||||
|
mixerInit(masterConfig.mixerMode, masterConfig.customMixer);
|
||||||
|
|
||||||
memset(&pwm_params, 0, sizeof(pwm_params));
|
memset(&pwm_params, 0, sizeof(pwm_params));
|
||||||
// when using airplane/wing mixer, servo/motor outputs are remapped
|
// when using airplane/wing mixer, servo/motor outputs are remapped
|
||||||
if (masterConfig.mixerMode == MIXER_AIRPLANE || masterConfig.mixerMode == MIXER_FLYING_WING)
|
if (masterConfig.mixerMode == MIXER_AIRPLANE || masterConfig.mixerMode == MIXER_FLYING_WING)
|
||||||
|
@ -314,15 +316,13 @@ void init(void)
|
||||||
LED0_OFF;
|
LED0_OFF;
|
||||||
LED1_OFF;
|
LED1_OFF;
|
||||||
|
|
||||||
|
|
||||||
imuInit();
|
|
||||||
mixerInit(masterConfig.mixerMode, masterConfig.customMixer);
|
|
||||||
|
|
||||||
#ifdef MAG
|
#ifdef MAG
|
||||||
if (sensors(SENSOR_MAG))
|
if (sensors(SENSOR_MAG))
|
||||||
compassInit();
|
compassInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
imuInit();
|
||||||
|
|
||||||
serialInit(&masterConfig.serialConfig);
|
serialInit(&masterConfig.serialConfig);
|
||||||
|
|
||||||
failsafe = failsafeInit(&masterConfig.rxConfig);
|
failsafe = failsafeInit(&masterConfig.rxConfig);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue