mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 21:58:10 +00:00
Send current protocol and sub protocol name
This commit is contained in:
parent
caf145c38a
commit
948ce9e8b8
297
Multiprotocol/Multi_Names.ino
Normal file
297
Multiprotocol/Multi_Names.ino
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
/*
|
||||||
|
This project is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Multiprotocol is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(MULTI_NAMES)
|
||||||
|
|
||||||
|
const char STR_FLYSKY[] ="FlySky";
|
||||||
|
const char STR_HUBSAN[] ="Hubsan";
|
||||||
|
const char STR_FRSKYD[] ="FrSky D";
|
||||||
|
const char STR_HISKY[] ="Hisky";
|
||||||
|
const char STR_V2X2[] ="V2x2";
|
||||||
|
const char STR_DSM[] ="DSM";
|
||||||
|
const char STR_DEVO[] ="Devo";
|
||||||
|
const char STR_YD717[] ="YD717";
|
||||||
|
const char STR_KN[] ="KN";
|
||||||
|
const char STR_SYMAX[] ="SymaX";
|
||||||
|
const char STR_SLT[] ="SLT";
|
||||||
|
const char STR_CX10[] ="CX10";
|
||||||
|
const char STR_CG023[] ="CG023";
|
||||||
|
const char STR_BAYANG[] ="Bayang";
|
||||||
|
const char STR_FRSKYX[] ="FrSky X";
|
||||||
|
const char STR_ESKY[] ="ESky";
|
||||||
|
const char STR_MT99XX[] ="MT99XX";
|
||||||
|
const char STR_MJXQ[] ="MJXq";
|
||||||
|
const char STR_SHENQI[] ="Shenqi";
|
||||||
|
const char STR_FY326[] ="FY326";
|
||||||
|
const char STR_SFHSS[] ="SFHSS";
|
||||||
|
const char STR_J6PRO[] ="J6 Pro";
|
||||||
|
const char STR_FQ777[] ="FQ777";
|
||||||
|
const char STR_ASSAN[] ="Assan";
|
||||||
|
const char STR_FRSKYV[] ="FrSky V";
|
||||||
|
const char STR_HONTAI[] ="Hontai";
|
||||||
|
const char STR_AFHDS2A[] ="FSky 2A";
|
||||||
|
const char STR_Q2X2[] ="Q2x2";
|
||||||
|
const char STR_WK2x01[] ="Walkera";
|
||||||
|
const char STR_Q303[] ="Q303";
|
||||||
|
const char STR_GW008[] ="GW008";
|
||||||
|
const char STR_DM002[] ="DM002";
|
||||||
|
const char STR_CABELL[] ="Cabell";
|
||||||
|
const char STR_ESKY150[] ="Esky150";
|
||||||
|
const char STR_H8_3D[] ="H8 3D";
|
||||||
|
const char STR_CORONA[] ="Corona";
|
||||||
|
const char STR_CFLIE[] ="CFlie";
|
||||||
|
const char STR_HITEC[] ="Hitec";
|
||||||
|
const char STR_WFLY[] ="WFly";
|
||||||
|
const char STR_BUGS[] ="Bugs";
|
||||||
|
const char STR_BUGSMINI[] ="BugMini";
|
||||||
|
const char STR_TRAXXAS[] ="Traxxas";
|
||||||
|
const char STR_NCC1701[] ="NCC1701";
|
||||||
|
const char STR_E01X[] ="E01X";
|
||||||
|
const char STR_V911S[] ="V911S";
|
||||||
|
const char STR_GD00X[] ="GD00X";
|
||||||
|
const char STR_V761[] ="V761";
|
||||||
|
const char STR_KF606[] ="KF606";
|
||||||
|
const char STR_REDPINE[] ="Redpine";
|
||||||
|
const char STR_POTENSIC[] ="Potensi";
|
||||||
|
const char STR_ZSX[] ="ZSX";
|
||||||
|
const char STR_FLYZONE[] ="FlyZone";
|
||||||
|
const char STR_SCANNER[] ="Scanner";
|
||||||
|
const char STR_FRSKY_RX[] ="FrSkyRX";
|
||||||
|
const char STR_AFHDS2A_RX[] ="FS2A_RX";
|
||||||
|
const char STR_XN297DUMP[] ="XN297DP";
|
||||||
|
|
||||||
|
const char STR_SUBTYPE_FLYSKY[] = "\x04""Std\0""V9x9""V6x6""V912""CX20";
|
||||||
|
const char STR_SUBTYPE_HUBSAN[] = "\x04""H107""H301""H501";
|
||||||
|
const char STR_SUBTYPE_FRSKYX[] = "\x07""D16\0 ""D16 8ch""LBT(EU)""LBT 8ch";
|
||||||
|
const char STR_SUBTYPE_HISKY[] = "\x05""Std\0 ""HK310";
|
||||||
|
const char STR_SUBTYPE_V2X2[] = "\x06""Std\0 ""JXD506";
|
||||||
|
const char STR_SUBTYPE_DSM[] = "\x06""2 22ms""2 11ms""X 22ms""X 11ms";
|
||||||
|
const char STR_SUBTYPE_DEVO[] = "\x04""8ch\0""10ch""12ch""6ch\0""7ch\0";
|
||||||
|
const char STR_SUBTYPE_YD717[] = "\x07""Std\0 ""SkyWlkr""Syma X4""XINXUN\0""NIHUI\0 ";
|
||||||
|
const char STR_SUBTYPE_KN[] = "\x06""WLtoys""FeiLun";
|
||||||
|
const char STR_SUBTYPE_SYMAX[] = "\x03""Std""X5C";
|
||||||
|
const char STR_SUBTYPE_SLT[] = "\x06""V1_6ch""V2_8ch""Q100\0 ""Q200\0 ""MR100\0";
|
||||||
|
const char STR_SUBTYPE_CX10[] = "\x07""Green\0 ""Blue\0 ""DM007\0 ""-\0 ""JC3015a""JC3015b""MK33041";
|
||||||
|
const char STR_SUBTYPE_CG023[] = "\x05""Std\0 ""YD829";
|
||||||
|
const char STR_SUBTYPE_BAYANG[] = "\x07""Std\0 ""H8S3D\0 ""X16 AH\0""IRDrone""DHD D4";
|
||||||
|
const char STR_SUBTYPE_MT99[] = "\x06""MT99\0 ""H7\0 ""YZ\0 ""LS\0 ""FY805";
|
||||||
|
const char STR_SUBTYPE_MJXQ[] = "\x07""WLH08\0 ""X600\0 ""X800\0 ""H26D\0 ""E010\0 ""H26WH\0 ""Phoenix";
|
||||||
|
const char STR_SUBTYPE_FY326[] = "\x05""Std\0 ""FY319";
|
||||||
|
const char STR_SUBTYPE_HONTAI[] = "\x07""Std\0 ""JJRC X1""X5C1\0 ""FQ_951";
|
||||||
|
const char STR_SUBTYPE_AFHDS2A[] = "\x08""PWM,IBUS""PPM,IBUS""PWM,SBUS""PPM,SBUS";
|
||||||
|
const char STR_SUBTYPE_Q2X2[] = "\x04""Q222""Q242""Q282";
|
||||||
|
const char STR_SUBTYPE_WK2x01[] = "\x06""WK2801""WK2401""W6_5_1""W6_6_1""W6_HeL""W6_HeI";
|
||||||
|
const char STR_SUBTYPE_Q303[] = "\x06""Std\0 ""CX35\0 ""CX10D\0""CX10WD";
|
||||||
|
const char STR_SUBTYPE_CABELL[] = "\x07""V3\0 ""V3 Telm""-\0 ""-\0 ""-\0 ""-\0 ""F-Safe\0""Unbind\0";
|
||||||
|
const char STR_SUBTYPE_H83D[] = "\x07""Std\0 ""H20H\0 ""H20Mini""H30Mini";
|
||||||
|
const char STR_SUBTYPE_CORONA[] = "\x05""V1\0 ""V2\0 ""FD V3";
|
||||||
|
const char STR_SUBTYPE_HITEC[] = "\x07""Optima\0""Opt Hub""Minima\0";
|
||||||
|
const char STR_SUBTYPE_BUGS_MINI[] = "\x06""Std\0 ""Bugs3H";
|
||||||
|
const char STR_SUBTYPE_TRAXXAS[] = "\x04""6519";
|
||||||
|
const char STR_SUBTYPE_E01X[] = "\x05""E012\0""E015\0""E016H";
|
||||||
|
const char STR_SUBTYPE_GD00X[] = "\x05""GD_V1""GD_V2";
|
||||||
|
const char STR_SUBTYPE_REDPINE[] = "\x04""Fast""Slow";
|
||||||
|
const char STR_SUBTYPE_POTENSIC[] = "\x03""A20";
|
||||||
|
const char STR_SUBTYPE_ZSX[] = "\x07""280JJRC";
|
||||||
|
const char STR_SUBTYPE_FLYZONE[] = "\x05""FZ410";
|
||||||
|
const char STR_SUBTYPE_XN297DUMP[] = "\x07""250Kbps""1Mbps\0 ""2Mbps\0 ";
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
OPTION_NONE,
|
||||||
|
OPTION_OPTION,
|
||||||
|
OPTION_RFTUNE,
|
||||||
|
OPTION_VIDFREQ,
|
||||||
|
OPTION_FIXEDID,
|
||||||
|
OPTION_TELEM,
|
||||||
|
OPTION_SRVFREQ,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NO_SUBTYPE nullptr
|
||||||
|
|
||||||
|
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
|
||||||
|
#if defined(FLYSKY_A7105_INO)
|
||||||
|
{PROTO_FLYSKY, STR_FLYSKY, 5, STR_SUBTYPE_FLYSKY, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(HUBSAN_A7105_INO)
|
||||||
|
{PROTO_HUBSAN, STR_HUBSAN, 3, STR_SUBTYPE_HUBSAN, OPTION_VIDFREQ },
|
||||||
|
#endif
|
||||||
|
#if defined(FRSKYD_CC2500_INO)
|
||||||
|
{PROTO_FRSKYD, STR_FRSKYD, 0, NO_SUBTYPE, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(HISKY_NRF24L01_INO)
|
||||||
|
{PROTO_HISKY, STR_HISKY, 2, STR_SUBTYPE_HISKY, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(V2X2_NRF24L01_INO)
|
||||||
|
{PROTO_V2X2, STR_V2X2, 2, STR_SUBTYPE_V2X2, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(DSM_CYRF6936_INO)
|
||||||
|
{PROTO_DSM, STR_DSM, 4, STR_SUBTYPE_DSM, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(DEVO_CYRF6936_INO)
|
||||||
|
{PROTO_DEVO, STR_DEVO, 5, STR_SUBTYPE_DEVO, OPTION_FIXEDID },
|
||||||
|
#endif
|
||||||
|
#if defined(YD717_NRF24L01_INO)
|
||||||
|
{PROTO_YD717, STR_YD717, 5, STR_SUBTYPE_YD717, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(KN_NRF24L01_INO)
|
||||||
|
{PROTO_KN, STR_KN, 2, STR_SUBTYPE_KN, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(SYMAX_NRF24L01_INO)
|
||||||
|
{PROTO_SYMAX, STR_SYMAX, 2, STR_SUBTYPE_SYMAX, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(SLT_NRF24L01_INO)
|
||||||
|
{PROTO_SLT, STR_SLT, 5, STR_SUBTYPE_SLT, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(CX10_NRF24L01_INO)
|
||||||
|
{PROTO_CX10, STR_CX10, 7, STR_SUBTYPE_CX10, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(CG023_NRF24L01_INO)
|
||||||
|
{PROTO_CG023, STR_CG023, 2, STR_SUBTYPE_CG023, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(BAYANG_NRF24L01_INO)
|
||||||
|
{PROTO_BAYANG, STR_BAYANG, 5, STR_SUBTYPE_BAYANG, OPTION_TELEM },
|
||||||
|
#endif
|
||||||
|
#if defined(FRSKYX_CC2500_INO)
|
||||||
|
{PROTO_FRSKYX, STR_FRSKYX, 4, STR_SUBTYPE_FRSKYX, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(ESKY_NRF24L01_INO)
|
||||||
|
{PROTO_ESKY, STR_ESKY, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(MT99XX_NRF24L01_INO)
|
||||||
|
{PROTO_MT99XX, STR_MT99XX, 5, STR_SUBTYPE_MT99, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(MJXQ_NRF24L01_INO)
|
||||||
|
{PROTO_MJXQ, STR_MJXQ, 7, STR_SUBTYPE_MJXQ, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(SHENQI_NRF24L01_INO)
|
||||||
|
{PROTO_SHENQI, STR_SHENQI, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(FY326_NRF24L01_INO)
|
||||||
|
{PROTO_FY326, STR_FY326, 2, STR_SUBTYPE_FY326, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(SFHSS_CC2500_INO)
|
||||||
|
{PROTO_SFHSS, STR_SFHSS, 0, NO_SUBTYPE, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(J6PRO_CYRF6936_INO)
|
||||||
|
{PROTO_J6PRO, STR_J6PRO, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(FQ777_NRF24L01_INO)
|
||||||
|
{PROTO_FQ777, STR_FQ777, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(ASSAN_NRF24L01_INO)
|
||||||
|
{PROTO_ASSAN, STR_ASSAN, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(FRSKYV_CC2500_INO)
|
||||||
|
{PROTO_FRSKYV, STR_FRSKYV, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(HONTAI_NRF24L01_INO)
|
||||||
|
{PROTO_HONTAI, STR_HONTAI, 4, STR_SUBTYPE_HONTAI, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(AFHDS2A_A7105_INO)
|
||||||
|
{PROTO_AFHDS2A, STR_AFHDS2A, 4, STR_SUBTYPE_AFHDS2A, OPTION_SRVFREQ },
|
||||||
|
#endif
|
||||||
|
#if defined(CX10_NRF24L01_INO)
|
||||||
|
{PROTO_Q2X2, STR_Q2X2, 3, STR_SUBTYPE_Q2X2, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(WK2x01_CYRF6936_INO)
|
||||||
|
{PROTO_WK_2X01, STR_WK2x01, 6, STR_SUBTYPE_WK2x01, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(Q303_NRF24L01_INO)
|
||||||
|
{PROTO_Q303, STR_Q303, 4, STR_SUBTYPE_Q303, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(GW008_NRF24L01_INO)
|
||||||
|
{PROTO_GW008, STR_GW008, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(DM002_NRF24L01_INO)
|
||||||
|
{PROTO_DM002, STR_DM002, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(CABELL_NRF24L01_INO)
|
||||||
|
{PROTO_CABELL, STR_CABELL, 8, STR_SUBTYPE_CABELL, OPTION_OPTION },
|
||||||
|
#endif
|
||||||
|
#if defined(ESKY150_NRF24L01_INO)
|
||||||
|
{PROTO_ESKY150, STR_ESKY150, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(H8_3D_NRF24L01_INO)
|
||||||
|
{PROTO_H8_3D, STR_H8_3D, 4, STR_SUBTYPE_H83D, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(CORONA_CC2500_INO)
|
||||||
|
{PROTO_CORONA, STR_CORONA, 3, STR_SUBTYPE_CORONA, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(CFLIE_NRF24L01_INO)
|
||||||
|
{PROTO_CFLIE, STR_CFLIE, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(HITEC_CC2500_INO)
|
||||||
|
{PROTO_HITEC, STR_HITEC, 3, STR_SUBTYPE_HITEC, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(WFLY_CYRF6936_INO)
|
||||||
|
{PROTO_WFLY, STR_WFLY, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(BUGS_A7105_INO)
|
||||||
|
{PROTO_BUGS, STR_BUGS, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(BUGSMINI_NRF24L01_INO)
|
||||||
|
{PROTO_BUGSMINI, STR_BUGSMINI, 2, STR_SUBTYPE_BUGS_MINI, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(TRAXXAS_CYRF6936_INO)
|
||||||
|
{PROTO_TRAXXAS, STR_TRAXXAS, 1, STR_SUBTYPE_TRAXXAS, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(NCC1701_NRF24L01_INO)
|
||||||
|
{PROTO_NCC1701, STR_NCC1701, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(E01X_NRF24L01_INO)
|
||||||
|
{PROTO_E01X, STR_E01X, 3, STR_SUBTYPE_E01X, OPTION_OPTION },
|
||||||
|
#endif
|
||||||
|
#if defined(V911S_NRF24L01_INO)
|
||||||
|
{PROTO_V911S, NO_SUBTYPE, 0, NO_SUBTYPE, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(GD00X_NRF24L01_INO)
|
||||||
|
{PROTO_GD00X, STR_GD00X, 2, STR_SUBTYPE_GD00X, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(V761_NRF24L01_INO)
|
||||||
|
{PROTO_V761, STR_V761, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(KF606_NRF24L01_INO)
|
||||||
|
{PROTO_KF606, NO_SUBTYPE, 0, NO_SUBTYPE, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(REDPINE_CC2500_INO)
|
||||||
|
{PROTO_REDPINE, STR_REDPINE, 2, STR_SUBTYPE_REDPINE, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(POTENSIC_NRF24L01_INO)
|
||||||
|
{PROTO_POTENSIC, STR_POTENSIC, 1, STR_SUBTYPE_POTENSIC, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(ZSX_NRF24L01_INO)
|
||||||
|
{PROTO_ZSX, STR_ZSX, 1, STR_SUBTYPE_ZSX, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(FLYZONE_A7105_INO)
|
||||||
|
{PROTO_FLYZONE, STR_FLYZONE, 1, STR_SUBTYPE_FLYZONE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(SCANNER_CC2500_INO)
|
||||||
|
{PROTO_SCANNER, STR_SCANNER, 0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(FRSKY_RX_CC2500_INO)
|
||||||
|
{PROTO_FRSKY_RX, STR_FRSKY_RX, 0, NO_SUBTYPE, OPTION_RFTUNE },
|
||||||
|
#endif
|
||||||
|
#if defined(AFHDS2A_RX_A7105_INO)
|
||||||
|
{PROTO_AFHDS2A_RX, STR_AFHDS2A_RX,0, NO_SUBTYPE, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
#if defined(XN297DUMP_NRF24L01_INO)
|
||||||
|
{PROTO_XN297DUMP, STR_XN297DUMP, 3, STR_SUBTYPE_XN297DUMP, OPTION_NONE },
|
||||||
|
#endif
|
||||||
|
{0x00, nullptr, 0, nullptr, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 0
|
#define VERSION_REVISION 0
|
||||||
#define VERSION_PATCH_LEVEL 15
|
#define VERSION_PATCH_LEVEL 16
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
@ -592,7 +592,7 @@ enum {
|
|||||||
#define FRSKY_RX_EEPROM_OFFSET 178 // (1) format + (3) TX ID + (1) freq_tune + (47) channels, 52 bytes, end is 178+52=230
|
#define FRSKY_RX_EEPROM_OFFSET 178 // (1) format + (3) TX ID + (1) freq_tune + (47) channels, 52 bytes, end is 178+52=230
|
||||||
#define AFHDS2A_RX_EEPROM_OFFSET 230 // (4) TX ID + (16) channels, 20 bytes, end is 230+20=250
|
#define AFHDS2A_RX_EEPROM_OFFSET 230 // (4) TX ID + (16) channels, 20 bytes, end is 230+20=250
|
||||||
#define AFHDS2A_EEPROM_OFFSET2 250 // RX ID, 4 bytes per model id, end is 250+192=442
|
#define AFHDS2A_EEPROM_OFFSET2 250 // RX ID, 4 bytes per model id, end is 250+192=442
|
||||||
//#define CONFIG_EEPROM_OFFSET 441 // Current configuration of the multimodule
|
//#define CONFIG_EEPROM_OFFSET 442 // Current configuration of the multimodule
|
||||||
|
|
||||||
//****************************************
|
//****************************************
|
||||||
//*** MULTI protocol serial definition ***
|
//*** MULTI protocol serial definition ***
|
||||||
@ -666,6 +666,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
FLYZONE 53
|
FLYZONE 53
|
||||||
SCANNER 54
|
SCANNER 54
|
||||||
FRSKY_RX 55
|
FRSKY_RX 55
|
||||||
|
AFHDS2A_RX 56
|
||||||
BindBit=> 0x80 1=Bind/0=No
|
BindBit=> 0x80 1=Bind/0=No
|
||||||
AutoBindBit=> 0x40 1=Yes /0=No
|
AutoBindBit=> 0x40 1=Yes /0=No
|
||||||
RangeCheck=> 0x20 1=Yes /0=No
|
RangeCheck=> 0x20 1=Yes /0=No
|
||||||
@ -896,6 +897,20 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
[8] patchlevel
|
[8] patchlevel
|
||||||
version of multi code, should be displayed as major.minor.revision.patchlevel
|
version of multi code, should be displayed as major.minor.revision.patchlevel
|
||||||
[9] channel order: CH4|CH3|CH2|CH1 with CHx value A=0,E=1,T=2,R=3
|
[9] channel order: CH4|CH3|CH2|CH1 with CHx value A=0,E=1,T=2,R=3
|
||||||
|
[10] Next valid protocol number, can be used to skip invalid protocols
|
||||||
|
[11] Prev valid protocol number, can be used to skip invalid protocols
|
||||||
|
[12..18] Protocol name [7], not null terminated if prototcol len == 7
|
||||||
|
[19] Number of sub protocols
|
||||||
|
[20..27] Sub protocol name [8], not null terminated if sub prototcol len == 8
|
||||||
|
[28] Option text to be displayed:
|
||||||
|
OPTION_NONE 0
|
||||||
|
OPTION_OPTION 1
|
||||||
|
OPTION_RFTUNE 2
|
||||||
|
OPTION_VIDFREQ 3
|
||||||
|
OPTION_FIXEDID 4
|
||||||
|
OPTION_TELEM 5
|
||||||
|
OPTION_SRVFREQ 6
|
||||||
|
|
||||||
more information can be added by specifing a longer length of the type, the TX will just ignore these bytes
|
more information can be added by specifing a longer length of the type, the TX will just ignore these bytes
|
||||||
|
|
||||||
Type 0x02 Frksy S.port telemetry
|
Type 0x02 Frksy S.port telemetry
|
||||||
|
@ -224,6 +224,20 @@ uint8_t packet_in[TELEMETRY_BUFFER_SIZE];//telemetry receiving packets
|
|||||||
bool rx_disable_lna;
|
bool rx_disable_lna;
|
||||||
uint16_t rx_rc_chan[16];
|
uint16_t rx_rc_chan[16];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//Multi names
|
||||||
|
#ifdef MULTI_NAMES
|
||||||
|
struct mm_protocol_definition {
|
||||||
|
uint8_t protocol;
|
||||||
|
const char *ProtoString;
|
||||||
|
uint8_t nbrSubProto;
|
||||||
|
const char *SubProtoString;
|
||||||
|
uint8_t optionType;
|
||||||
|
};
|
||||||
|
extern const mm_protocol_definition multi_protocols[];
|
||||||
|
uint8_t multi_protocols_index=0xFF;
|
||||||
|
uint8_t multi_protocols_send;
|
||||||
|
#endif
|
||||||
#endif // TELEMETRY
|
#endif // TELEMETRY
|
||||||
|
|
||||||
// Callback
|
// Callback
|
||||||
@ -942,6 +956,10 @@ static void protocol_init()
|
|||||||
#ifdef MULTI_SYNC
|
#ifdef MULTI_SYNC
|
||||||
inputRefreshRate = 7000; // Default value
|
inputRefreshRate = 7000; // Default value
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MULTI_NAMES
|
||||||
|
multi_protocols_send = 0;
|
||||||
|
multi_protocols_index = 0xFF;
|
||||||
|
#endif
|
||||||
tx_pause();
|
tx_pause();
|
||||||
pass=0;
|
pass=0;
|
||||||
init_frskyd_link_telemetry();
|
init_frskyd_link_telemetry();
|
||||||
@ -982,8 +1000,6 @@ static void protocol_init()
|
|||||||
PE1_on; //NRF24L01 antenna RF3 by default
|
PE1_on; //NRF24L01 antenna RF3 by default
|
||||||
PE2_off; //NRF24L01 antenna RF3 by default
|
PE2_off; //NRF24L01 antenna RF3 by default
|
||||||
|
|
||||||
debugln("Protocol selected: %d, sub proto %d, rxnum %d, option %d", protocol, sub_protocol, RX_num, option);
|
|
||||||
|
|
||||||
switch(protocol) // Init the requested protocol
|
switch(protocol) // Init the requested protocol
|
||||||
{
|
{
|
||||||
#ifdef A7105_INSTALLED
|
#ifdef A7105_INSTALLED
|
||||||
@ -1388,6 +1404,34 @@ static void protocol_init()
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
debugln("Protocol selected: %d, sub proto %d, rxnum %d, option %d", protocol, sub_protocol, RX_num, option);
|
||||||
|
#ifdef MULTI_NAMES
|
||||||
|
uint8_t index=0;
|
||||||
|
while(multi_protocols[index].protocol != 0)
|
||||||
|
{
|
||||||
|
if(multi_protocols[index].protocol==protocol)
|
||||||
|
{
|
||||||
|
multi_protocols_index=index;
|
||||||
|
multi_protocols_send = 0;
|
||||||
|
SEND_MULTI_STATUS_on;
|
||||||
|
#ifdef DEBUG_SERIAL
|
||||||
|
debug("Proto=%s",multi_protocols[multi_protocols_index].ProtoString);
|
||||||
|
uint8_t nbr=multi_protocols[multi_protocols_index].nbrSubProto;
|
||||||
|
debug(", nbr_sub=%d, Sub=",nbr);
|
||||||
|
if(nbr && (sub_protocol&0x07)<nbr)
|
||||||
|
{
|
||||||
|
uint8_t len=multi_protocols[multi_protocols_index].SubProtoString[0];
|
||||||
|
uint8_t offset=len*(sub_protocol&0x07)+1;
|
||||||
|
for(uint8_t j=0;j<len;j++)
|
||||||
|
debug("%c",multi_protocols[multi_protocols_index].SubProtoString[j+offset]);
|
||||||
|
}
|
||||||
|
debugln("");
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WAIT_FOR_BIND) && defined(ENABLE_BIND_CH)
|
#if defined(WAIT_FOR_BIND) && defined(ENABLE_BIND_CH)
|
||||||
|
@ -127,7 +127,12 @@ inline void telemetry_set_input_sync(uint16_t refreshRate)
|
|||||||
|
|
||||||
static void multi_send_status()
|
static void multi_send_status()
|
||||||
{
|
{
|
||||||
multi_send_header(MULTI_TELEMETRY_STATUS, 6);
|
#ifdef MULTI_NAMES
|
||||||
|
if(multi_protocols_send && multi_protocols_index != 0xFF)
|
||||||
|
multi_send_header(MULTI_TELEMETRY_STATUS, 25);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
multi_send_header(MULTI_TELEMETRY_STATUS, 6);
|
||||||
|
|
||||||
// Build flags
|
// Build flags
|
||||||
uint8_t flags=0;
|
uint8_t flags=0;
|
||||||
@ -181,6 +186,42 @@ static void multi_send_status()
|
|||||||
|
|
||||||
// Channel order
|
// Channel order
|
||||||
Serial_write(RUDDER<<6|THROTTLE<<4|ELEVATOR<<2|AILERON);
|
Serial_write(RUDDER<<6|THROTTLE<<4|ELEVATOR<<2|AILERON);
|
||||||
|
|
||||||
|
#ifdef MULTI_NAMES
|
||||||
|
if(multi_protocols_send && multi_protocols_index != 0xFF)
|
||||||
|
{
|
||||||
|
multi_protocols_send--;
|
||||||
|
// Protocol next/prev
|
||||||
|
if(multi_protocols[multi_protocols_index+1].protocol != 0)
|
||||||
|
Serial_write(multi_protocols[multi_protocols_index+1].protocol); // next protocol number
|
||||||
|
else
|
||||||
|
Serial_write(protocol); // end of list
|
||||||
|
if(multi_protocols_index>0)
|
||||||
|
Serial_write(multi_protocols[multi_protocols_index-1].protocol); // prev protocol number
|
||||||
|
else
|
||||||
|
Serial_write(protocol); // begining of list
|
||||||
|
// Protocol
|
||||||
|
for(uint8_t i=0;i<7;i++)
|
||||||
|
Serial_write(multi_protocols[multi_protocols_index].ProtoString[i]); // protocol name
|
||||||
|
// Sub-protocol
|
||||||
|
uint8_t nbr=multi_protocols[multi_protocols_index].nbrSubProto;
|
||||||
|
Serial_write(nbr); // number of sub protocols
|
||||||
|
uint8_t j=0;
|
||||||
|
if(nbr && (sub_protocol&0x07)<nbr)
|
||||||
|
{
|
||||||
|
uint8_t len=multi_protocols[multi_protocols_index].SubProtoString[0];
|
||||||
|
uint8_t offset=len*(sub_protocol&0x07)+1;
|
||||||
|
for(;j<len;j++)
|
||||||
|
Serial_write(multi_protocols[multi_protocols_index].SubProtoString[j+offset]); // current sub protocol name
|
||||||
|
}
|
||||||
|
for(;j<8;j++)
|
||||||
|
Serial_write(0x00);
|
||||||
|
// Option type
|
||||||
|
Serial_write(multi_protocols[multi_protocols_index].optionType); // option display type
|
||||||
|
// Channels function
|
||||||
|
//TODO
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -319,8 +319,11 @@
|
|||||||
#define SPORT_SEND
|
#define SPORT_SEND
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if not defined(MULTI_TELEMETRY) || not defined(STM32_BOARD)
|
#if not defined(MULTI_TELEMETRY)
|
||||||
#undef MULTI_SYNC
|
#if not defined(STM32_BOARD)
|
||||||
|
#undef MULTI_SYNC
|
||||||
|
#endif
|
||||||
|
#undef MULTI_NAMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Make sure TX is defined correctly
|
//Make sure TX is defined correctly
|
||||||
|
@ -274,6 +274,8 @@
|
|||||||
#define MULTI_TELEMETRY
|
#define MULTI_TELEMETRY
|
||||||
//Sync OpenTX frames with the current protocol timing. This feature is only available on the STM32 module. Comment to disable.
|
//Sync OpenTX frames with the current protocol timing. This feature is only available on the STM32 module. Comment to disable.
|
||||||
#define MULTI_SYNC
|
#define MULTI_SYNC
|
||||||
|
//Send to OpenTX the current protocol and subprotocol names. Comment to disable.
|
||||||
|
#define MULTI_NAMES
|
||||||
|
|
||||||
//Comment a line to disable a specific protocol telemetry
|
//Comment a line to disable a specific protocol telemetry
|
||||||
#define DSM_TELEMETRY // Forward received telemetry packet directly to TX to be decoded by er9x, erskyTX and OpenTX
|
#define DSM_TELEMETRY // Forward received telemetry packet directly to TX to be decoded by er9x, erskyTX and OpenTX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user