From 3b9aa79201154712adc206d7d880b1d19ebd23e2 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Sun, 9 Sep 2018 11:26:01 +0200 Subject: [PATCH] SLT sub protocol MR100 for Vista CH9: MODE CH10: FLIP CH11: VIDEO CH12:PICTURE --- Multiprotocol/Multiprotocol.h | 4 +++- Multiprotocol/SLT_nrf24l01.ino | 15 ++++++++++++++- Multiprotocol/_Config.h | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 848abdb..015eb0a 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_REVISION 0 -#define VERSION_PATCH_LEVEL 42 +#define VERSION_PATCH_LEVEL 44 //****************** // Protocols @@ -127,6 +127,7 @@ enum SLT SLT_V1 = 0, SLT_V2 = 1, Q200 = 2, + MR100 = 3, }; enum CX10 { @@ -703,6 +704,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p -- SLT_V1 0 SLT_V2 1 Q200 2 + MR100 3 Power value => 0x80 0=High/1=Low Stream[3] = option_protocol; diff --git a/Multiprotocol/SLT_nrf24l01.ino b/Multiprotocol/SLT_nrf24l01.ino index 469533c..396f02b 100644 --- a/Multiprotocol/SLT_nrf24l01.ino +++ b/Multiprotocol/SLT_nrf24l01.ino @@ -34,6 +34,14 @@ enum{ FLAG_Q200_VIDOFF= 0x04, }; +enum{ + // flags going to packet[6] (MR100) + FLAG_MR100_FMODE = 0x20, + FLAG_MR100_FLIP = 0x04, + FLAG_MR100_VIDEO = 0x02, + FLAG_MR100_PICTURE = 0x01, +}; + enum { SLT_BUILD=0, SLT_DATA1, @@ -80,7 +88,7 @@ static void __attribute__((unused)) SLT_set_freq(void) } // Unique freq - uint8_t max_freq=0x50; //V1 sure, V2? + uint8_t max_freq=0x50; //V1 and V2 if(sub_protocol==Q200) max_freq=45; for (uint8_t i = 0; i < SLT_NFREQCHANNELS; ++i) @@ -148,6 +156,11 @@ static void __attribute__((unused)) SLT_build_packet() |GET_FLAG(CH10_SW, FLAG_Q200_FLIP) |GET_FLAG(CH11_SW, FLAG_Q200_VIDON) |GET_FLAG(CH12_SW, FLAG_Q200_VIDOFF); + if(sub_protocol==MR100) + packet[6] = GET_FLAG(CH9_SW , FLAG_MR100_FMODE) + |GET_FLAG(CH10_SW, FLAG_MR100_FLIP) + |GET_FLAG(CH11_SW, FLAG_MR100_VIDEO) + |GET_FLAG(CH12_SW, FLAG_MR100_PICTURE); packet[7]=convert_channel_8b(CH7); packet[8]=convert_channel_8b(CH8); packet[9]=0xAA; //normal mode for Q200, unknown for V2 diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 2afee9a..28d546c 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -566,6 +566,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= { SLT_V1 SLT_V2 Q200 + MR100 */ // RX_Num is used for TX & RX match. Using different RX_Num values for each receiver will prevent starting a model with the false config loaded...