Issue #767 - Extra Pot (S3) support

This commit is contained in:
bsongis
2014-03-01 18:54:08 +01:00
parent f9e6819b37
commit 3215346a1b
26 changed files with 180 additions and 164 deletions
+1 -1
View File
@@ -162,7 +162,6 @@ enum HeliSwashTypes {
#define BOARD_X9D_NUM_POTS 4
#define C9X_NUM_POTS 4
#define NUM_CAL_PPM 4
#define NUM_PPM(board) (IS_ARM(board) ? 16 : 8)
#define NUM_CYC 3
#define C9X_NUM_SWITCHES 10
#define C9X_NUM_KEYS 6
@@ -1063,6 +1062,7 @@ enum Capability {
GetThrSwitch,
HasDisplayText,
VirtualInputs,
TrainerInputs,
LuaInputs,
LimitsPer1000,
EnhancedCurves,
@@ -671,6 +671,8 @@ int OpenTxInterface::getCapability(const Capability capability)
case HasDisplayText:
case VirtualInputs:
return IS_TARANIS(board) ? 32 : 0;
case TrainerInputs:
return IS_ARM(board) ? 16 : 8;
case LuaInputs:
case LimitsPer1000:
case EnhancedCurves:
+1 -1
View File
@@ -599,7 +599,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
if (item == source) b->setCurrentIndex(b->count()-1);
}
for (int i=0; i<NUM_PPM(GetEepromInterface()->getBoard()); i++) {
for (int i=0; i<GetEepromInterface()->getCapability(TrainerInputs); i++) {
item = RawSource(SOURCE_TYPE_PPM, i);
b->addItem(item.toString(), item.toValue());
if (item == source) b->setCurrentIndex(b->count()-1);