Telemetry on MULTI default to FrSky Hub telemetry, not smartport

This commit is contained in:
Arne Schwabe
2016-09-05 15:47:11 +02:00
parent e1a60b801a
commit 17adab3177
4 changed files with 49 additions and 10 deletions
+6 -1
View File
@@ -532,7 +532,12 @@ enum MultiModuleRFProtocols {
MM_RF_PROTO_LAST= MM_RF_PROTO_CUSTOM
};
#define MM_RF_DSM2_22MS_6CH_OPTION 2
#define MM_RF_DSM2_22MS_6CH_OPTION 2
#define MM_RF_FRSKY_SUBTYPE_D16 0
#define MM_RF_FRSKY_SUBTYPE_D8 1
#define MM_RF_FRSKY_SUBTYPE_D16_8CH 2
#define MM_RF_FRSKY_SUBTYPE_V8 3
#define HAS_RF_PROTOCOL_FAILSAFE(rf) ((rf) == RF_PROTO_X16)
#define HAS_RF_PROTOCOL_MODELINDEX(rf) (((rf) == RF_PROTO_X16) || ((rf) == RF_PROTO_LR12))
+4 -4
View File
@@ -136,17 +136,17 @@ void setupPulsesMultimodule(uint8_t port)
type = type + 1;
if (g_model.moduleData[port].multi.rfProtocol == MM_RF_PROTO_FRSKY) {
if(subtype == 1) {
if(subtype == MM_RF_FRSKY_SUBTYPE_D8) {
//D8
type = 3;
subtype = 0;
} else if (subtype == 3) {
//LR12
} else if (subtype == MM_RF_FRSKY_SUBTYPE_V8) {
//V8
type = 25;
subtype = 0;
} else {
type = 15;
if (subtype == 2) // D16 8ch
if (subtype == MM_RF_FRSKY_SUBTYPE_D16_8CH) // D16 8ch
subtype = 1;
else
subtype = 0; // D16
+4 -4
View File
@@ -153,11 +153,11 @@ inline uint8_t modelTelemetryProtocol()
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
if (g_model.moduleData[EXTERNAL_MODULE].multi.rfProtocol == MM_RF_PROTO_DSM2)
return PROTOCOL_SPEKTRUM;
else if ((g_model.moduleData[EXTERNAL_MODULE].multi.rfProtocol == MM_RF_PROTO_FRSKY) && (g_model.moduleData[EXTERNAL_MODULE].subType == 1))
// D8
return PROTOCOL_FRSKY_D;
else
else if ((g_model.moduleData[EXTERNAL_MODULE].multi.rfProtocol == MM_RF_PROTO_FRSKY) &&
(g_model.moduleData[EXTERNAL_MODULE].subType == MM_RF_FRSKY_SUBTYPE_D16 || g_model.moduleData[EXTERNAL_MODULE].subType == MM_RF_FRSKY_SUBTYPE_D16_8CH))
return PROTOCOL_FRSKY_SPORT;
else
return PROTOCOL_FRSKY_D;
}
#endif