1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 00:05:17 +03:00

Some refactoring in the new Wizard

This commit is contained in:
bsongis 2014-03-13 08:44:50 +01:00
parent 13e998ec2d
commit e0582cd398
8 changed files with 72 additions and 48 deletions

View file

@ -28,11 +28,33 @@ void Channel::clear()
weight2 = 0;
}
WizMix::WizMix()
WizMix::WizMix(const unsigned int modelId):
complete(false),
modelId(modelId),
vehicle(NOVEHICLE)
{
complete = false;
strcpy(name, " ");
vehicle = NOVEHICLE;
}
WizMix::operator ModelData()
{
ModelData model;
model.used = true;
model.modelId = modelId;
// Safe copy model name
strncpy(model.name, name, WIZ_MODEL_NAME_LENGTH);
model.name[WIZ_MODEL_NAME_LENGTH] = 0;
for (int i=0; i<WIZ_MAX_CHANNELS; i++ ) {
Channel ch = channel[i];
if (ch.sourceDlg > 0) {
//**** INSERT MIXER HERE ****
}
}
return model;
}