mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Multi: Enable D8, D16v1 and D16v2.1 TX clone mode (#7516)
* Clone mode * Switch table from octal to hex * Revert change to octal as requested by 3djc * Changing to Cloned to please 3djc ;-) * Minimum Multi version: 1.3.0.87 * Cosmetics * Cosmetics * Add cloned to X2 Co-authored-by: Pascal Langer <planger@mathworks.com> Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
This commit is contained in:
parent
673fcb9287
commit
5e2fc7f1ae
7 changed files with 23 additions and 13 deletions
BIN
jumpertx-t16-2.3.8.bin
Normal file
BIN
jumpertx-t16-2.3.8.bin
Normal file
Binary file not shown.
|
@ -803,7 +803,7 @@ uint8_t convertMultiProtocol(uint8_t moduleIdx, uint8_t type)
|
|||
|
||||
if (type == MODULE_SUBTYPE_MULTI_FRSKY) {
|
||||
int subtype = g_model.moduleData[moduleIdx].subType;
|
||||
if (subtype == MM_RF_FRSKY_SUBTYPE_D8) {
|
||||
if (subtype == MM_RF_FRSKY_SUBTYPE_D8 || subtype == MM_RF_FRSKY_SUBTYPE_D8_CLONED) {
|
||||
//D8
|
||||
type = 3;
|
||||
}
|
||||
|
@ -831,8 +831,8 @@ uint8_t convertMultiProtocol(uint8_t moduleIdx, uint8_t type)
|
|||
|
||||
const char STR_SUBTYPE_FLYSKY[] = "\004""Std\0""V9x9""V6x6""V912""CX20";
|
||||
const char STR_SUBTYPE_HUBSAN[] = "\004""H107""H301""H501";
|
||||
const char STR_SUBTYPE_FRSKY[] = "\007""D16\0 ""D8\0 ""D16 8ch""V8\0 ""LBT(EU)""LBT 8ch";
|
||||
const char STR_SUBTYPE_FRSKYX2[] = "\007""D16\0 ""D16 8ch""LBT(EU)""LBT 8ch";
|
||||
const char STR_SUBTYPE_FRSKY[] = "\011""D16\0 ""D8\0 ""D16 8ch\0 ""V8\0 ""LBT(EU)\0 ""LBT 8ch\0 ""D8Cloned\0""D16Cloned";
|
||||
const char STR_SUBTYPE_FRSKYX2[] = "\011""D16\0 ""D16 8ch\0 ""LBT(EU)\0 ""LBT 8ch\0 ""D16Cloned";
|
||||
const char STR_SUBTYPE_HISKY[] = "\005""Std\0 ""HK310";
|
||||
const char STR_SUBTYPE_V2X2[] = "\006""Std\0 ""JXD506";
|
||||
const char STR_SUBTYPE_DSM[] = "\006""2 22ms""2 11ms""X 22ms""X 11ms";
|
||||
|
@ -883,7 +883,7 @@ const mm_protocol_definition multi_protocols[] = {
|
|||
// Protocol as defined in pulses\modules_constants.h, number of sub_protocols - 1, Failsafe supported, Disable channel mapping supported, Subtype string, Option type
|
||||
{MODULE_SUBTYPE_MULTI_FLYSKY, 4, false, true, STR_SUBTYPE_FLYSKY, nullptr},
|
||||
{MODULE_SUBTYPE_MULTI_HUBSAN, 2, false, false, STR_SUBTYPE_HUBSAN, STR_MULTI_VIDFREQ},
|
||||
{MODULE_SUBTYPE_MULTI_FRSKY, 5, false, false, STR_SUBTYPE_FRSKY, STR_MULTI_RFTUNE},
|
||||
{MODULE_SUBTYPE_MULTI_FRSKY, 7, false, false, STR_SUBTYPE_FRSKY, STR_MULTI_RFTUNE},
|
||||
{MODULE_SUBTYPE_MULTI_HISKY, 1, false, true, STR_SUBTYPE_HISKY, nullptr},
|
||||
{MODULE_SUBTYPE_MULTI_V2X2, 1, false, false, STR_SUBTYPE_V2X2, nullptr},
|
||||
{MODULE_SUBTYPE_MULTI_DSM2, 3, false, true, STR_SUBTYPE_DSM, STR_MULTI_MAX_THROW},
|
||||
|
@ -924,7 +924,7 @@ const mm_protocol_definition multi_protocols[] = {
|
|||
{MODULE_SUBTYPE_MULTI_ESKY150, 1, false, false, STR_SUBTYPE_ESKY150, nullptr},
|
||||
{MODULE_SUBTYPE_MULTI_FX816, 0, false, false, STR_SUBTYPE_FX816, nullptr},
|
||||
{MODULE_SUBTYPE_MULTI_HOTT, 0, true, false, NO_SUBTYPE, STR_MULTI_RFTUNE},
|
||||
{MODULE_SUBTYPE_MULTI_FRSKYX2, 3, true, false, STR_SUBTYPE_FRSKYX2, STR_MULTI_RFTUNE},
|
||||
{MODULE_SUBTYPE_MULTI_FRSKYX2, 4, true, false, STR_SUBTYPE_FRSKYX2, STR_MULTI_RFTUNE},
|
||||
{MM_RF_CUSTOM_SELECTED, 7, true, true, NO_SUBTYPE, STR_MULTI_OPTION},
|
||||
|
||||
// Sentinel and default for protocols not listed above (MM_RF_CUSTOM is 0xff)
|
||||
|
|
|
@ -182,7 +182,9 @@ enum MMRFrskySubtypes {
|
|||
MM_RF_FRSKY_SUBTYPE_D16_8CH,
|
||||
MM_RF_FRSKY_SUBTYPE_V8,
|
||||
MM_RF_FRSKY_SUBTYPE_D16_LBT,
|
||||
MM_RF_FRSKY_SUBTYPE_D16_LBT_8CH
|
||||
MM_RF_FRSKY_SUBTYPE_D16_LBT_8CH,
|
||||
MM_RF_FRSKY_SUBTYPE_D8_CLONED,
|
||||
MM_RF_FRSKY_SUBTYPE_D16_CLONED
|
||||
};
|
||||
|
||||
enum ModuleSubtypeDSM2 {
|
||||
|
|
|
@ -58,7 +58,7 @@ inline uint8_t getMaxMultiSubtype(uint8_t moduleIdx)
|
|||
const mm_protocol_definition *pdef = getMultiProtocolDefinition(g_model.moduleData[moduleIdx].getMultiProtocol());
|
||||
|
||||
if (g_model.moduleData[moduleIdx].getMultiProtocol() == MODULE_SUBTYPE_MULTI_FRSKY) {
|
||||
return 5;
|
||||
return 7;
|
||||
}
|
||||
|
||||
if (g_model.moduleData[moduleIdx].getMultiProtocol() > MODULE_SUBTYPE_MULTI_LAST) {
|
||||
|
|
|
@ -295,11 +295,18 @@ void sendFrameProtocolHeader(uint8_t moduleIdx, bool failsafe)
|
|||
//D8
|
||||
type = 3;
|
||||
subtype = 0;
|
||||
} else if (subtype == MM_RF_FRSKY_SUBTYPE_V8) {
|
||||
}
|
||||
else if (subtype == MM_RF_FRSKY_SUBTYPE_D8_CLONED) {
|
||||
//D8
|
||||
type = 3;
|
||||
subtype = 1;
|
||||
}
|
||||
else if (subtype == MM_RF_FRSKY_SUBTYPE_V8) {
|
||||
//V8
|
||||
type = 25;
|
||||
subtype = 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
type = 15;
|
||||
if (subtype == MM_RF_FRSKY_SUBTYPE_D16_8CH) // D16 8ch
|
||||
subtype = 1;
|
||||
|
@ -307,8 +314,9 @@ void sendFrameProtocolHeader(uint8_t moduleIdx, bool failsafe)
|
|||
subtype = 0; // D16
|
||||
else if (subtype == MM_RF_FRSKY_SUBTYPE_D16_LBT)
|
||||
subtype = 2;
|
||||
else
|
||||
subtype = 3; // MM_RF_FRSKY_SUBTYPE_D16_LBT_8CH
|
||||
else if (subtype == MM_RF_FRSKY_SUBTYPE_D16_LBT_8CH)
|
||||
subtype = 3;
|
||||
else subtype = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -555,7 +555,7 @@ void MultiModuleStatus::getStatusString(char * statusText) const
|
|||
return;
|
||||
}
|
||||
|
||||
if (major <= 1 && minor <= 3 && revision <= 0 && patch <= 78 && SLOW_BLINK_ON_PHASE) {
|
||||
if (major <= 1 && minor <= 3 && revision <= 0 && patch < 87 && SLOW_BLINK_ON_PHASE) {
|
||||
strcpy(statusText, STR_MODULE_UPGRADE);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -108,7 +108,7 @@ void frskyDSetDefault(int index, uint16_t id);
|
|||
extern uint8_t telemetryProtocol;
|
||||
|
||||
#if defined (MULTIMODULE)
|
||||
#define IS_D16_MULTI(module) (((g_model.moduleData[module].getMultiProtocol() == MODULE_SUBTYPE_MULTI_FRSKY) && (g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16 || g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16_8CH || g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16_LBT || g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16_LBT_8CH)) \
|
||||
#define IS_D16_MULTI(module) (((g_model.moduleData[module].getMultiProtocol() == MODULE_SUBTYPE_MULTI_FRSKY) && (g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16 || g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16_8CH || g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16_LBT || g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16_LBT_8CH || g_model.moduleData[module].subType == MM_RF_FRSKY_SUBTYPE_D16_CLONED)) \
|
||||
|| (g_model.moduleData[module].getMultiProtocol() == MODULE_SUBTYPE_MULTI_FRSKYX2))
|
||||
#define IS_HOTT_MULTI(module) (g_model.moduleData[module].getMultiProtocol() == MODULE_SUBTYPE_MULTI_HOTT)
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue