1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Preparation for conversion to parameter groups 12

This commit is contained in:
Martin Budden 2017-02-17 17:24:13 +00:00
parent 14a7c805c1
commit 2c667376fa
8 changed files with 118 additions and 145 deletions

View file

@ -230,8 +230,6 @@ const mixer_t mixers[] = {
};
#endif
static const motorMixer_t *customMixers;
static uint16_t disarmMotorOutput, deadbandMotor3dHigh, deadbandMotor3dLow;
uint16_t motorOutputHigh, motorOutputLow;
static float rcCommandThrottleRange, rcCommandThrottleRange3dLow, rcCommandThrottleRange3dHigh;
@ -289,12 +287,10 @@ void initEscEndpoints(void) {
rcCommandThrottleRange3dHigh = PWM_RANGE_MAX - rxConfig()->midrc - flight3DConfig()->deadband3d_throttle;
}
void mixerInit(mixerMode_e mixerMode, const motorMixer_t *initialCustomMixers)
void mixerInit(mixerMode_e mixerMode)
{
currentMixerMode = mixerMode;
customMixers = initialCustomMixers;
initEscEndpoints();
}
@ -308,9 +304,9 @@ void mixerConfigureOutput(void)
// load custom mixer into currentMixer
for (int i = 0; i < MAX_SUPPORTED_MOTORS; i++) {
// check if done
if (customMixers[i].throttle == 0.0f)
if (customMotorMixer(i)->throttle == 0.0f)
break;
currentMixer[i] = customMixers[i];
currentMixer[i] = *customMotorMixer(i);
motorCount++;
}
} else {