Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MT99xx2/SU35 protocol #1033

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion Multiprotocol/MT99xx_ccnrf.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
*/
// compatible with MT99xx, Eachine H7, Yi Zhan i6S and LS114/124
// compatible with MT99xx, Eachine H7, Yi Zhan i6S, LS114/124, QF009 Su35
// Last sync with Goebish mt99xx_nrf24l01.c dated 2016-01-29

#if defined(MT99XX_CCNRF_INO)
Expand Down Expand Up @@ -96,6 +96,16 @@ enum{
FLAG_PA18_FLIP = 0x80,
};

enum{
// flags going to packet[6] (QF009 Su35)
FLAG_SU35_6G = 0x00,
FLAG_SU35_3D = 0x40,
FLAG_SU35_HIRATE = 0x01,
FLAG_SU35_LED = 0x02,
FLAG_SU35_FLASH = 0x04,
FLAG_SU35_INVERT = 0x08,
};

const uint8_t h7_mys_byte[] = {
0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14,
0x05, 0x15, 0x06, 0x16, 0x07, 0x17, 0x00, 0x10
Expand Down Expand Up @@ -271,6 +281,14 @@ static void __attribute__((unused)) MT99XX_send_packet()
if(hopping_frequency_no == 0)
packet[7] ^= 0x40;
break;
case SU35+8:
packet[6] = FLAG_SU35_6G
| GET_FLAG( CH5_SW, FLAG_SU35_3D )
| GET_FLAG( !CH6_SW, FLAG_SU35_LED )
| GET_FLAG( CH7_SW, FLAG_SU35_FLASH )
| GET_FLAG( CH8_SW, FLAG_SU35_INVERT )
| GET_FLAG( CH9_SW, FLAG_SU35_HIRATE );
break;
}
uint8_t result=crc8;
for(uint8_t i=0; i<8; i++)
Expand Down
2 changes: 1 addition & 1 deletion Multiprotocol/Multi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
89,Losi
90,MouldKg,Analog,Digit
91,Xerall
92,MT99xx,PA18
92,MT99xx,PA18,SU35
93,Kyosho2,KT-17
94,Scorpio
95,BlueFly
Expand Down
4 changes: 2 additions & 2 deletions Multiprotocol/Multi_Protos.ino
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const char STR_SUBTYPE_CX10[] = "\x07""Green\0 ""Blue\0 ""DM007\0 ""-\0
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\0""QX100\0 ";
const char STR_SUBTYPE_MT99[] = "\x06""MT99\0 ""H7\0 ""YZ\0 ""LS\0 ""FY805\0""A180\0 ""Dragon""F949G\0";
const char STR_SUBTYPE_MT992[] = "\x04""PA18";
const char STR_SUBTYPE_MT992[] = "\x04""PA18""SU35";
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";
Expand Down Expand Up @@ -413,7 +413,7 @@ const mm_protocol_definition multi_protocols[] = {
{PROTO_MT99XX, STR_MT99XX, STR_SUBTYPE_MT99, 8, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback },
#endif
#if defined(MT99XX_CCNRF_INO)
{PROTO_MT99XX2, STR_MT99XX2, STR_SUBTYPE_MT992, 1, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback },
{PROTO_MT99XX2, STR_MT99XX2, STR_SUBTYPE_MT992, 2, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback },
#endif
#if defined(NCC1701_NRF24L01_INO)
{PROTO_NCC1701, STR_NCC1701, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, NCC_init, NCC_callback },
Expand Down
3 changes: 2 additions & 1 deletion Multiprotocol/Multiprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ enum MT99XX
};
enum MT99XX2
{
PA18 = 0,
PA18 = 0,
SU35 = 1,
};
enum MJXQ
{
Expand Down
1 change: 1 addition & 0 deletions Multiprotocol/_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
F949G
PROTO_MT99XX2
PA18
SU35
PROTO_NCC1701
NONE
PROTO_OMP
Expand Down