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