mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Fix companion handling of unknow protocols (#7567)
* Tentative fix * cosmetics
This commit is contained in:
parent
6af47e5488
commit
d8ffd1eada
2 changed files with 1 additions and 8 deletions
|
@ -173,10 +173,7 @@ QString Multiprotocols::protocolToString(int protocol, bool custom)
|
|||
"Bayang RX", "Pelikan", "Tiger", "WK", "XN297 Dump", "FrSky X 2.1", "FrSky R9"
|
||||
});
|
||||
|
||||
if (protocol == MM_RF_CUSTOM_SELECTED || custom)
|
||||
return tr("Custom - proto %1)").arg(protocol);
|
||||
else
|
||||
return strings.value(protocol, CPN_STR_UNKNOWN_ITEM);
|
||||
return strings.value(protocol, CPN_STR_UNKNOWN_ITEM);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue