New protocol and telemetry: FlySky AFHDS2A (#3948)
* New protocol for multimode FlySky AFHDS2A * Also add AFHDS2A protocol to companion * fix compile error
This commit is contained in:
committed by
Bertrand Songis
parent
d218b33609
commit
92dde79dec
@@ -1859,7 +1859,6 @@ SimulatorInterface *GetCurrentFirmwareSimulator()
|
||||
unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
|
||||
switch (type) {
|
||||
case MM_RF_PROTO_HISKY:
|
||||
case MM_RF_PROTO_DSM2:
|
||||
case MM_RF_PROTO_SYMAX:
|
||||
case MM_RF_PROTO_KN:
|
||||
return 2;
|
||||
@@ -1870,6 +1869,8 @@ unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
|
||||
|
||||
case MM_RF_PROTO_FRSKY:
|
||||
case MM_RF_PROTO_FLYSKY:
|
||||
case MM_RF_PROTO_DSM2:
|
||||
case MM_RF_PROTO_AFHDS2A:
|
||||
return 4;
|
||||
|
||||
case MM_RF_PROTO_MJXQ:
|
||||
|
||||
@@ -873,7 +873,8 @@ enum MultiModuleRFProtocols {
|
||||
MM_RF_PROTO_ASSAN,
|
||||
MM_RF_PROTO_HONTAI,
|
||||
MM_RF_PROTO_OLRS,
|
||||
MM_RF_PROTO_LAST= MM_RF_PROTO_OLRS
|
||||
MM_RF_PROTO_AFHDS2A,
|
||||
MM_RF_PROTO_LAST= MM_RF_PROTO_AFHDS2A
|
||||
};
|
||||
|
||||
unsigned int getNumSubtypes(MultiModuleRFProtocols type);
|
||||
|
||||
@@ -611,7 +611,7 @@
|
||||
<item row="4" column="4">
|
||||
<widget class="QCheckBox" name="cb_autoBind">
|
||||
<property name="text">
|
||||
<string>Autobind</string>
|
||||
<string>Bind on startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -109,7 +109,7 @@ QString ModelPrinter::printMultiRfProtocol(int rfProtocol, bool custom)
|
||||
{
|
||||
static const char *strings[] = {
|
||||
"FlySky", "Hubsan", "FrSky", "Hisky", "V2x2", "DSM", "Devo", "YD717", "KN", "SymaX", "SLT", "CX10", "CG023",
|
||||
"Bayang", "ESky", "MT99XX", "MJXQ", "Shenqi", "FY326", "SFHSS", "J6 PRO","FQ777","Assan","Hontai","OLRS","Custom"
|
||||
"Bayang", "ESky", "MT99XX", "MJXQ", "Shenqi", "FY326", "SFHSS", "J6 PRO","FQ777","Assan","Hontai","OLRS","FlySky AFHDS2A"
|
||||
};
|
||||
if (custom)
|
||||
return "Custom - proto " + QString::number(rfProtocol);
|
||||
@@ -132,6 +132,7 @@ QString ModelPrinter::printMultiSubType(int rfProtocol, bool custom, int subType
|
||||
static const char *mt99_strings[] = {"MT99","H7","YZ"};
|
||||
static const char *mjxq_strings[] = {"WLH08", "X600", "X800", "H26D", "E010"};
|
||||
static const char *hontai_strings[] = {"Standard","JJRC X1","X5C1 Clone"};
|
||||
static const char *afhds2a_strings[] = {"PWM and IBUS", "PPM and IBUS", "PWM and SBUS", "PPM and SBUS"};
|
||||
|
||||
if (custom)
|
||||
return CHECK_IN_ARRAY(custom_subtype_strings, subType);
|
||||
@@ -161,6 +162,8 @@ QString ModelPrinter::printMultiSubType(int rfProtocol, bool custom, int subType
|
||||
return CHECK_IN_ARRAY(mjxq_strings, subType);
|
||||
case MM_RF_PROTO_HONTAI:
|
||||
return CHECK_IN_ARRAY(hontai_strings, subType);
|
||||
case MM_RF_PROTO_AFHDS2A:
|
||||
return CHECK_IN_ARRAY(afhds2a_strings, subType);
|
||||
default:
|
||||
return "DEFAULT";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user