Fix companion handling of unknow protocols (#7567)

* Tentative fix

* cosmetics
This commit is contained in:
3djc
2020-05-02 20:03:17 +02:00
committed by GitHub
parent 6af47e5488
commit d8ffd1eada
2 changed files with 1 additions and 8 deletions
@@ -2056,8 +2056,6 @@ class ModuleUnionField: public UnionField<unsigned int> {
void beforeExport() override
{
if (module.multi.rfProtocol > MODULE_SUBTYPE_MULTI_LAST)
module.multi.rfProtocol += 3;
rfProtExtra = (module.multi.rfProtocol & 0x70) >> 4;
module.multi.rfProtocol &= 0x0f;
}
@@ -2065,8 +2063,6 @@ class ModuleUnionField: public UnionField<unsigned int> {
void afterImport() override
{
module.multi.rfProtocol = (rfProtExtra << 4) + (module.rfProtocol & 0xf);
if (module.multi.rfProtocol > MODULE_SUBTYPE_MULTI_LAST)
module.multi.rfProtocol -= 3;
}
private: