diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp index eca5bf9ab..c186aef35 100644 --- a/companion/src/firmwares/opentx/opentxinterface.cpp +++ b/companion/src/firmwares/opentx/opentxinterface.cpp @@ -562,7 +562,7 @@ int OpenTxFirmware::getCapability(Capability capability) else if (IS_TARANIS_X9E(board)) return 4; else if (IS_TARANIS(board)) - return 3; //Taranis has only 2 pots but still has a placeholder in settings for 3 pots + return 3; // Taranis has only 2 pots but still has a placeholder in settings for 3 pots else return 3; case Sliders: @@ -908,7 +908,7 @@ bool OpenTxFirmware::isTelemetrySourceAvailable(int source) int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port) { - if (IS_TARANIS(board)) { + if (IS_TARANIS(board) || IS_HORUS(board)) { switch (port) { case 0: switch (proto) { diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index 800c27b93..e38845677 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -148,7 +148,7 @@ void TimerPanel::on_name_editingFinished() #define FAILSAFE_CHANNEL_HOLD 2000 #define FAILSAFE_CHANNEL_NOPULSE 2001 -ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module, GeneralSettings & generalSettings, Firmware * firmware, int moduleIdx): +ModulePanel::ModulePanel(QWidget * parent, ModelData & model, ModuleData & module, GeneralSettings & generalSettings, Firmware * firmware, int moduleIdx): ModelPanel(parent, model, generalSettings, firmware), module(module), moduleIdx(moduleIdx), @@ -174,7 +174,7 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module ui->label_trainerMode->hide(); ui->trainerMode->hide(); if (firmware->getCapability(NumModules) > 1) { - if (IS_TARANIS(firmware->getBoard())) { + if (IS_TARANIS(firmware->getBoard()) || IS_HORUS(firmware->getBoard())) { if (moduleIdx == 0) label = tr("Internal Radio System"); else @@ -294,7 +294,7 @@ void ModulePanel::update() break; } } - else if (IS_TARANIS(firmware->getBoard())) { + else if (IS_TARANIS(firmware->getBoard()) || IS_HORUS(firmware->getBoard())) { if (model->trainerMode == TRAINER_SLAVE_JACK) { mask |= MASK_PPM_FIELDS | MASK_CHANNELS_RANGE | MASK_CHANNELS_COUNT; } @@ -851,40 +851,16 @@ void SetupPanel::on_image_currentIndexChanged(int index) void SetupPanel::populateThrottleSourceCB() { - const QString pots9x[] = { QObject::tr("P1"), QObject::tr("P2"), QObject::tr("P3")}; - const QString potsTaranis[] = { QObject::tr("S1"), QObject::tr("S2"), QObject::tr("S3"), QObject::tr("LS"), QObject::tr("RS")}; - const QString potsTaranisX9E[] = { QObject::tr("F1"), QObject::tr("F2"), QObject::tr("F3"), QObject::tr("F4"), QObject::tr("S1"), QObject::tr("S2"), QObject::tr("LS"), QObject::tr("RS")}; - - unsigned int i; - lock = true; - ui->throttleSource->clear(); ui->throttleSource->addItem(QObject::tr("THR")); - - if (IS_TARANIS_X9E(GetEepromInterface()->getBoard())) { - for (i=0; i<8; i++) { - ui->throttleSource->addItem(potsTaranisX9E[i], i); - } + for (int i=0; igetCapability(Pots)+firmware->getCapability(Sliders); i++) { + ui->throttleSource->addItem(firmware->getAnalogInputName(4+i), i); } - else if (IS_TARANIS(GetEepromInterface()->getBoard())) { - for (i=0; i<5; i++) { - ui->throttleSource->addItem(potsTaranis[i], i); - } - } - else { - for (i=0; i<3; i++) { - ui->throttleSource->addItem(pots9x[i], i); - } - } - - int channels = (IS_ARM(GetEepromInterface()->getBoard()) ? 32 : 16); - for (int i=0; igetCapability(Outputs); i++) { ui->throttleSource->addItem(ModelPrinter::printChannelName(i)); } - ui->throttleSource->setCurrentIndex(model->thrTraceSrc); - lock = false; } @@ -895,8 +871,6 @@ void SetupPanel::update() ui->throttleReverse->setChecked(model->throttleReversed); populateThrottleSourceCB(); ui->throttleWarning->setChecked(!model->disableThrottleWarning); - - //trim inc, thro trim, thro expo, instatrim ui->trimIncrement->setCurrentIndex(model->trimInc+2); ui->throttleTrim->setChecked(model->thrTrim); ui->extendedLimits->setChecked(model->extendedLimits); @@ -911,12 +885,15 @@ void SetupPanel::update() updatePotWarnings(); } - for (int i=0; igetCapability(Timers); i++) + for (int i=0; igetCapability(Timers); i++) { timers[i]->update(); + } - for (int i=0; iupdate(); + } + } } void SetupPanel::updateBeepCenter()