From a5e7279c57184fc7329e2a623e28ef3e9a326c5e Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Thu, 10 Oct 2019 15:33:48 +0200 Subject: [PATCH] Fixed module data type export (#6919) Fixed module data type export --- .../src/firmwares/opentx/opentxeeprom.cpp | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 0fe94ab70..9e95b63b5 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -2052,7 +2052,6 @@ class ModuleUnionField: public UnionField { void beforeExport() override { - module.rfProtocol = module.multi.rfProtocol & 0xf; rfProtExtra = (module.multi.rfProtocol >> 4) & 0x03; } @@ -2091,13 +2090,6 @@ class ModuleUnionField: public UnionField { attr==PULSES_PXX_R9M_LITE; } - void beforeExport() override - { - if (module.protocol >= PULSES_PXX_XJT_X16 && module.protocol <= PULSES_PXX_XJT_LR12) { - module.subType = module.protocol - PULSES_PXX_XJT_X16; - } - } - void afterImport() override { if (module.protocol == PULSES_PXX_XJT_X16) { @@ -2136,9 +2128,6 @@ class ModuleUnionField: public UnionField { void beforeExport() override { - if (module.protocol == PULSES_ACCST_ISRM_D16 || module.protocol == PULSES_ACCESS_ISRM) { - module.subType = module.protocol - PULSES_ACCESS_ISRM; - } for (int i=0; i= PULSES_LP45 && module.protocol <= PULSES_DSMX) { module.rfProtocol = module.protocol - PULSES_LP45; } + else if (module.protocol == PULSES_ACCST_ISRM_D16 || module.protocol == PULSES_ACCESS_ISRM) { + module.subType = module.protocol - PULSES_ACCESS_ISRM; + } + else if (module.protocol >= PULSES_PXX_XJT_X16 && module.protocol <= PULSES_PXX_XJT_LR12) { + module.subType = module.protocol - PULSES_PXX_XJT_X16; + } + else if (module.protocol == PULSES_MULTIMODULE) { + module.rfProtocol = module.multi.rfProtocol & 0xf; + } } void afterImport() override