Fixes #959
This commit is contained in:
@@ -39,8 +39,10 @@ WizMix::WizMix(const GeneralSettings & settings, const unsigned int modelId):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WizMix::maxMixSwitch(MixData &mix, int channel, int sw, int weight)
|
void WizMix::maxMixSwitch(char *name, MixData &mix, int channel, int sw, int weight)
|
||||||
{
|
{
|
||||||
|
strncpy(mix.name, name, sizeof(mix.name));
|
||||||
|
mix.name[sizeof(mix.name)]=0;
|
||||||
mix.destCh = channel;
|
mix.destCh = channel;
|
||||||
mix.srcRaw = RawSource(SOURCE_TYPE_MAX);
|
mix.srcRaw = RawSource(SOURCE_TYPE_MAX);
|
||||||
mix.swtch = RawSwitch(SWITCH_TYPE_SWITCH, sw);
|
mix.swtch = RawSwitch(SWITCH_TYPE_SWITCH, sw);
|
||||||
@@ -65,12 +67,13 @@ void WizMix::addMix(ModelData &model, Input input, int weight, int channel, int
|
|||||||
}
|
}
|
||||||
else if (input==FLAPS_INPUT){
|
else if (input==FLAPS_INPUT){
|
||||||
// There ought to be some kind of constants for switches somewhere...
|
// There ought to be some kind of constants for switches somewhere...
|
||||||
maxMixSwitch( model.mixData[mixIndex++], channel+1, isTaranis ? 1 :-3 , weight); //SA-UP or ELE-UP
|
maxMixSwitch( "Flaps Up", model.mixData[mixIndex++], channel+1, isTaranis ? 1 :-3 , weight); //SA-UP or ELE-UP
|
||||||
maxMixSwitch( model.mixData[mixIndex++], channel+1, isTaranis ? 3 : 3 , weight); //SA-DOWN or ELE-DOWN
|
maxMixSwitch( "Flaps Down", model.mixData[mixIndex++], channel+1, isTaranis ? 3 : 3 , -weight); //SA-DOWN or ELE-DOWN
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (input==AIRBRAKES_INPUT){
|
else if (input==AIRBRAKES_INPUT){
|
||||||
maxMixSwitch( model.mixData[mixIndex++], channel+1, isTaranis ? 13 :-2 , weight); //SE-UP or RUD-UP
|
maxMixSwitch( "Airbrk Off", model.mixData[mixIndex++], channel+1, isTaranis ? 13 :-2 , -weight); //SE-UP or RUD-UP
|
||||||
maxMixSwitch( model.mixData[mixIndex++], channel+1, isTaranis ? 15 : 2 , weight); //SE-DOWN or RUD-DOWN
|
maxMixSwitch( "Airbrk On", model.mixData[mixIndex++], channel+1, isTaranis ? 15 : 2 , weight); //SE-DOWN or RUD-DOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class WizMix
|
|||||||
private:
|
private:
|
||||||
WizMix();
|
WizMix();
|
||||||
void addMix(ModelData & model, Input input, int weight, int channel, int & mixerIndex);
|
void addMix(ModelData & model, Input input, int weight, int channel, int & mixerIndex);
|
||||||
void maxMixSwitch(MixData &mix, int destCh, int sw, int weight);
|
void maxMixSwitch(char *name, MixData &mix, int destCh, int sw, int weight);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user