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

ExtraChannels Capacity removed

This commit is contained in:
bsongis 2014-04-16 07:27:39 +02:00
parent 6823fbdc5a
commit f47cd81108
8 changed files with 8 additions and 17 deletions

View file

@ -1022,7 +1022,6 @@ enum Capability {
RotaryEncoders, RotaryEncoders,
Outputs, Outputs,
ChannelsName, ChannelsName,
ExtraChannels,
ExtraInputs, ExtraInputs,
ExtendedTrims, ExtendedTrims,
NumCurves, NumCurves,

View file

@ -239,8 +239,6 @@ int Er9xInterface::getCapability(const Capability capability)
return 13; return 13;
case Outputs: case Outputs:
return 16; return 16;
case ExtraChannels:
return 0;
case Simulation: case Simulation:
return 1; return 1;
case Telemetry: case Telemetry:

View file

@ -283,8 +283,6 @@ int Ersky9xInterface::getCapability(const Capability capability)
return 13; return 13;
case Outputs: case Outputs:
return ERSKY9X_NUM_CHNOUT_V11; return ERSKY9X_NUM_CHNOUT_V11;
case ExtraChannels:
return 0;
case Simulation: case Simulation:
return 1; return 1;
case Telemetry: case Telemetry:

View file

@ -241,8 +241,6 @@ int Gruvin9xInterface::getCapability(const Capability capability)
return 13; return 13;
case Outputs: case Outputs:
return 16; return 16;
case ExtraChannels:
return 0;
case ExtendedTrims: case ExtendedTrims:
return 500; return 500;
case Simulation: case Simulation:

View file

@ -581,8 +581,6 @@ int OpenTxInterface::getCapability(const Capability capability)
return (IS_ARM(board) ? 23 : 7); return (IS_ARM(board) ? 23 : 7);
case HasSoundMixer: case HasSoundMixer:
return (IS_ARM(board) ? 1 : 0); return (IS_ARM(board) ? 1 : 0);
case ExtraChannels:
return 0;
case ExtraInputs: case ExtraInputs:
return 1; return 1;
case ExtendedTrims: case ExtendedTrims:

View file

@ -159,8 +159,6 @@ int Th9xInterface::getCapability(const Capability capability)
return TH9X_MAX_SWITCHES; return TH9X_MAX_SWITCHES;
case Outputs: case Outputs:
return 8; return 8;
case ExtraChannels:
return 4;
case OffsetWeight: case OffsetWeight:
return 125; return 125;
case Simulation: case Simulation:

View file

@ -604,7 +604,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
if (item == source) b->setCurrentIndex(b->count()-1); if (item == source) b->setCurrentIndex(b->count()-1);
} }
for (int i=0; i<GetEepromInterface()->getCapability(Outputs)+GetEepromInterface()->getCapability(ExtraChannels); i++) { for (int i=0; i<GetEepromInterface()->getCapability(Outputs); i++) {
item = RawSource(SOURCE_TYPE_CH, i); item = RawSource(SOURCE_TYPE_CH, i);
b->addItem(item.toString(), item.toValue()); b->addItem(item.toString(), item.toValue());
if (item == source) b->setCurrentIndex(b->count()-1); if (item == source) b->setCurrentIndex(b->count()-1);

View file

@ -69,10 +69,11 @@ void MixesPanel::update()
unsigned int curDest = 0; unsigned int curDest = 0;
int i; int i;
unsigned int outputs = GetEepromInterface()->getCapability(Outputs); unsigned int outputs = GetEepromInterface()->getCapability(Outputs);
for (i=0; i<GetEepromInterface()->getCapability(Mixes); i++) { for (i=0; i<GetEepromInterface()->getCapability(Mixes); i++) {
MixData *md = &model.mixData[i]; MixData *md = &model.mixData[i];
//qDebug() << "md->destCh: " << md->destCh; // qDebug() << "md->destCh: " << md->destCh;
if ((md->destCh==0) || (md->destCh>outputs+(unsigned int)GetEepromInterface()->getCapability(ExtraChannels))) continue; if (md->destCh==0 || md->destCh>outputs) continue;
QString str = ""; QString str = "";
while (curDest < md->destCh-1) { while (curDest < md->destCh-1) {
curDest++; curDest++;
@ -82,7 +83,8 @@ void MixesPanel::update()
curDest++; curDest++;
} }
} }
while(curDest<outputs+GetEepromInterface()->getCapability(ExtraChannels)) {
while (curDest < outputs) {
curDest++; curDest++;
AddMixerLine(-curDest); AddMixerLine(-curDest);
} }
@ -106,7 +108,7 @@ bool MixesPanel::AddMixerLine(int dest)
#endif #endif
MixerlistWidget->addItem(itm); MixerlistWidget->addItem(itm);
MixerlistWidget->setItemWidget(itm, getMixerWidget(str)); MixerlistWidget->setItemWidget(itm, getMixerWidget(str));
qDebug() << "MixesPanel::AddMixerLine(): " << str; // qDebug() << "MixesPanel::AddMixerLine(): " << str;
return new_ch; return new_ch;
} }
@ -421,7 +423,7 @@ void MixesPanel::mixerHighlight()
dest = model.mixData[idx].destCh; dest = model.mixData[idx].destCh;
} }
highlightedSource = ( (int)highlightedSource == dest) ? 0 : dest; highlightedSource = ( (int)highlightedSource == dest) ? 0 : dest;
qDebug() << "MixesPanel::mixerHighlight(): " << highlightedSource ; // qDebug() << "MixesPanel::mixerHighlight(): " << highlightedSource ;
for(int i=0; i<MixerlistWidget->count(); i++) { for(int i=0; i<MixerlistWidget->count(); i++) {
int t = MixerlistWidget->item(i)->data(Qt::UserRole).toByteArray().at(0); int t = MixerlistWidget->item(i)->data(Qt::UserRole).toByteArray().at(0);
bool dummy; bool dummy;