From d4544f11f5f14f09ea7cc69dc905fe1fb9614eb8 Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 11 Jul 2015 10:37:55 +0200 Subject: [PATCH] Fixes #2425 --- companion/src/eeprominterface.h | 1 + companion/src/firmwares/opentx/opentxeeprom.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/companion/src/eeprominterface.h b/companion/src/eeprominterface.h index ed13efde5..907f75076 100644 --- a/companion/src/eeprominterface.h +++ b/companion/src/eeprominterface.h @@ -835,6 +835,7 @@ class ModuleData { ModuleData() { clear(); } unsigned int modelId; int protocol; + int subprotocol; unsigned int channelsStart; int channelsCount; // 0=8 channels unsigned int failsafeMode; diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 530d744a3..a963f47f5 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -584,7 +584,6 @@ class SourceField: public ConversionField< UnsignedField > { virtual void beforeExport() { - if (source.type == SOURCE_TYPE_TELEMETRY) qDebug() << source.type << source.index; _source = source.toValue(); ConversionField< UnsignedField >::beforeExport(); } @@ -3225,6 +3224,10 @@ void OpenTxModelData::afterImport() } } + if (IS_TARANIS(board) && modelData.moduleData[0].protocol == 0) { + modelData.moduleData[0].protocol = PXX_XJT_X16; + } + for (int module=0; module<3; module++) { if (modelData.moduleData[module].protocol == PXX_XJT_X16 || modelData.moduleData[module].protocol == LP45) { if (subprotocols[module] >= 0)