From ce2a278862a37fed97d45e3326c02e27c3ae2cad Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Wed, 18 Mar 2015 20:14:27 +0400 Subject: [PATCH] GVAR names not available for 9x in companion (Fix #2150) --- companion/src/firmwares/opentx/opentxinterface.cpp | 2 +- companion/src/modeledit/flightmodes.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp index 6d506ca1e..dae14d582 100644 --- a/companion/src/firmwares/opentx/opentxinterface.cpp +++ b/companion/src/firmwares/opentx/opentxinterface.cpp @@ -551,7 +551,7 @@ int OpenTxFirmware::getCapability(const Capability capability) case FlightModesName: return (IS_TARANIS(board) ? 10 : 6); case GvarsName: - return 6; + return (IS_9X(board) ? 0 : 6); case HasChNames: return (IS_TARANIS(board) ? 1 : 0); case GvarsInCS: diff --git a/companion/src/modeledit/flightmodes.cpp b/companion/src/modeledit/flightmodes.cpp index 3218b6105..3fba520c5 100644 --- a/companion/src/modeledit/flightmodes.cpp +++ b/companion/src/modeledit/flightmodes.cpp @@ -209,7 +209,9 @@ void FlightModePanel::update() if (ui->gvGB->isVisible()) { for (int i=0; isetText(model->gvars_names[i]); + if (firmware->getCapability(GvarsName) > 0) { + gvNames[i]->setText(model->gvars_names[i]); + } gvValues[i]->setDisabled(model->isGVarLinked(phaseIdx, i)); gvValues[i]->setValue(model->getGVarValue(phaseIdx, i)); if (IS_TARANIS(GetEepromInterface()->getBoard()) && phaseIdx == 0) {