mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 19:48:11 +00:00
SGF22: new F22S sub protocol
This commit is contained in:
parent
edaee63f16
commit
64ea7111ac
@ -217,6 +217,7 @@
|
|||||||
94,0,Scorpio
|
94,0,Scorpio
|
||||||
95,0,Bluefly,HP100,0,CH5,CH6,CH7,CH8
|
95,0,Bluefly,HP100,0,CH5,CH6,CH7,CH8
|
||||||
96,0,BumbleB
|
96,0,BumbleB
|
||||||
97,0,SGF22,Std,1,Mode,Flip,LED,Pict,Video,TrRes
|
97,0,SGF22,F22,1,Mode,Flip,LED,Pict,Video,TrRes
|
||||||
61,1,EazyRC
|
97,1,SGF22,F22S,1,Mode,Flip,LED,Pict,Video,TrRes
|
||||||
|
61,0,EazyRC
|
||||||
98,0,Kyosho3,ASF,0
|
98,0,Kyosho3,ASF,0
|
||||||
|
@ -93,6 +93,6 @@
|
|||||||
94,Scorpio
|
94,Scorpio
|
||||||
95,BlueFly
|
95,BlueFly
|
||||||
96,BumbleB
|
96,BumbleB
|
||||||
97,SGF22
|
97,SGF22,F22,F22S
|
||||||
98,Kyosho3
|
98,Kyosho3
|
||||||
99,XK2
|
99,XK2
|
@ -180,6 +180,7 @@ const char STR_SUBTYPE_MOULDKG[] = "\x06""Analog""Digit\0";
|
|||||||
const char STR_SUBTYPE_KF606[] = "\x06""KF606\0""MIG320""ZCZ50\0";
|
const char STR_SUBTYPE_KF606[] = "\x06""KF606\0""MIG320""ZCZ50\0";
|
||||||
const char STR_SUBTYPE_E129[] = "\x04""E129""C186";
|
const char STR_SUBTYPE_E129[] = "\x04""E129""C186";
|
||||||
const char STR_SUBTYPE_FX[] = "\x04""816\0""620\0""9630""Q560";
|
const char STR_SUBTYPE_FX[] = "\x04""816\0""620\0""9630""Q560";
|
||||||
|
const char STR_SUBTYPE_SGF22[] = "\x04""F22\0""F22S";
|
||||||
#define NO_SUBTYPE nullptr
|
#define NO_SUBTYPE nullptr
|
||||||
|
|
||||||
#ifdef SEND_CPPM
|
#ifdef SEND_CPPM
|
||||||
@ -454,7 +455,7 @@ const mm_protocol_definition multi_protocols[] = {
|
|||||||
{PROTO_SCORPIO, STR_SCORPIO, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_CYRF, SCORPIO_init, SCORPIO_callback },
|
{PROTO_SCORPIO, STR_SCORPIO, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_CYRF, SCORPIO_init, SCORPIO_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(SGF22_NRF24L01_INO)
|
#if defined(SGF22_NRF24L01_INO)
|
||||||
{PROTO_SGF22, STR_SGF22, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, SGF22_init, SGF22_callback },
|
{PROTO_SGF22, STR_SGF22, STR_SUBTYPE_SGF22, 2, OPTION_NONE, 0, 0, SW_NRF, SGF22_init, SGF22_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(SHENQI_NRF24L01_INO)
|
#if defined(SHENQI_NRF24L01_INO)
|
||||||
{PROTO_SHENQI, STR_SHENQI, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, SHENQI_init, SHENQI_callback },
|
{PROTO_SHENQI, STR_SHENQI, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, SHENQI_init, SHENQI_callback },
|
||||||
@ -559,7 +560,10 @@ uint16_t PROTOLIST_callback()
|
|||||||
Serial_write(multi_protocols[option].protocol);
|
Serial_write(multi_protocols[option].protocol);
|
||||||
//Protocol name
|
//Protocol name
|
||||||
for(uint8_t i=0;i<proto_len;i++)
|
for(uint8_t i=0;i<proto_len;i++)
|
||||||
|
{
|
||||||
Serial_write(multi_protocols[option].ProtoString[i]);
|
Serial_write(multi_protocols[option].ProtoString[i]);
|
||||||
|
//debug("%c",multi_protocols[option].ProtoString[i]);
|
||||||
|
}
|
||||||
//Flags
|
//Flags
|
||||||
uint8_t flags=0;
|
uint8_t flags=0;
|
||||||
#ifdef FAILSAFE_ENABLE
|
#ifdef FAILSAFE_ENABLE
|
||||||
@ -569,15 +573,20 @@ uint16_t PROTOLIST_callback()
|
|||||||
if(multi_protocols[option].chMap)
|
if(multi_protocols[option].chMap)
|
||||||
flags |= 0x02; //Disable_ch_mapping supported
|
flags |= 0x02; //Disable_ch_mapping supported
|
||||||
Serial_write( flags | (multi_protocols[option].optionType<<4)); // flags && option type
|
Serial_write( flags | (multi_protocols[option].optionType<<4)); // flags && option type
|
||||||
|
//debug(" Flag=%02X",flags | (multi_protocols[option].optionType<<4));
|
||||||
//Number of sub protocols
|
//Number of sub protocols
|
||||||
Serial_write(nbr_sub);
|
Serial_write(nbr_sub);
|
||||||
|
//debug(" NSub=%02X ",nbr_sub);
|
||||||
if(nbr_sub !=0 )
|
if(nbr_sub !=0 )
|
||||||
{//Sub protocols length and texts
|
{//Sub protocols length and texts
|
||||||
for(uint8_t i=0;i<=nbr_sub*sub_len;i++)
|
for(uint8_t i=0;i<=nbr_sub*sub_len;i++)
|
||||||
|
{
|
||||||
Serial_write(multi_protocols[option].SubProtoString[i]);
|
Serial_write(multi_protocols[option].SubProtoString[i]);
|
||||||
|
//debug("%c",multi_protocols[option].SubProtoString[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//debugln("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1000;
|
return 1000;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 4
|
#define VERSION_REVISION 4
|
||||||
#define VERSION_PATCH_LEVEL 11
|
#define VERSION_PATCH_LEVEL 12
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
@ -481,6 +481,11 @@ enum FX
|
|||||||
FX9630 = 2,
|
FX9630 = 2,
|
||||||
FX_Q560 = 3,
|
FX_Q560 = 3,
|
||||||
};
|
};
|
||||||
|
enum SGF22
|
||||||
|
{
|
||||||
|
SGF22_F22 = 0,
|
||||||
|
SGF22_F22S = 1,
|
||||||
|
};
|
||||||
|
|
||||||
#define NONE 0
|
#define NONE 0
|
||||||
#define P_HIGH 1
|
#define P_HIGH 1
|
||||||
|
@ -12,7 +12,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
|
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
// Compatible with SGF22 R11
|
// Compatible with SGF22, ParkTen F22S
|
||||||
|
|
||||||
#if defined(SGF22_NRF24L01_INO)
|
#if defined(SGF22_NRF24L01_INO)
|
||||||
|
|
||||||
@ -25,6 +25,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define SGF22_PAYLOAD_SIZE 12
|
#define SGF22_PAYLOAD_SIZE 12
|
||||||
#define SGF22_BIND_COUNT 50
|
#define SGF22_BIND_COUNT 50
|
||||||
#define SGF22_RF_NUM_CHANNELS 4
|
#define SGF22_RF_NUM_CHANNELS 4
|
||||||
|
#define SGF22_F22S_BIND_RF_CHANNEL 10
|
||||||
|
|
||||||
//packet[8]
|
//packet[8]
|
||||||
#define SGF22_FLAG_3D 0x00
|
#define SGF22_FLAG_3D 0x00
|
||||||
@ -72,6 +73,8 @@ static void __attribute__((unused)) SGF22_send_packet()
|
|||||||
packet[10] = 0x42; // no fine tune
|
packet[10] = 0x42; // no fine tune
|
||||||
packet[11] = 0x10; // no fine tune
|
packet[11] = 0x10; // no fine tune
|
||||||
}
|
}
|
||||||
|
if(sub_protocol == SGF22_F22S)
|
||||||
|
packet[0] += 6;
|
||||||
packet[1] = packet_count; // sequence
|
packet[1] = packet_count; // sequence
|
||||||
packet[2] = rx_tx_addr[2];
|
packet[2] = rx_tx_addr[2];
|
||||||
packet[3] = rx_tx_addr[3];
|
packet[3] = rx_tx_addr[3];
|
||||||
@ -131,7 +134,7 @@ static void __attribute__((unused)) SGF22_RF_init()
|
|||||||
{
|
{
|
||||||
XN297_Configure(XN297_CRCEN, XN297_SCRAMBLED, XN297_1M);
|
XN297_Configure(XN297_CRCEN, XN297_SCRAMBLED, XN297_1M);
|
||||||
XN297_SetTXAddr((uint8_t*)"\xC7\x95\x3C\xBB\xA5", 5);
|
XN297_SetTXAddr((uint8_t*)"\xC7\x95\x3C\xBB\xA5", 5);
|
||||||
XN297_RFChannel(SGF22_BIND_RF_CHANNEL); // Set bind channel
|
XN297_RFChannel(sub_protocol == SGF22_F22S ? SGF22_F22S_BIND_RF_CHANNEL : SGF22_BIND_RF_CHANNEL); // Set bind channel
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t SGF22_callback()
|
uint16_t SGF22_callback()
|
||||||
|
@ -815,7 +815,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
|||||||
PROTO_SCORPIO
|
PROTO_SCORPIO
|
||||||
NONE
|
NONE
|
||||||
PROTO_SGF22
|
PROTO_SGF22
|
||||||
NONE
|
SGF22
|
||||||
|
F22S
|
||||||
PROTO_SHENQI
|
PROTO_SHENQI
|
||||||
NONE
|
NONE
|
||||||
PROTO_SKYARTEC
|
PROTO_SKYARTEC
|
||||||
|
@ -138,7 +138,7 @@ CFlie|38|CFlie||||||||NRF24L01|
|
|||||||
[Redpine](Protocols_Details.md#Redpine---50)|50|FAST|SLOW|||||||NRF24L01|XN297
|
[Redpine](Protocols_Details.md#Redpine---50)|50|FAST|SLOW|||||||NRF24L01|XN297
|
||||||
[Scanner](Protocols_Details.md#Scanner---54)|54|||||||||CC2500|
|
[Scanner](Protocols_Details.md#Scanner---54)|54|||||||||CC2500|
|
||||||
[Scorpio](Protocols_Details.md#Scorpio---94)|94|||||||||CYRF6936|
|
[Scorpio](Protocols_Details.md#Scorpio---94)|94|||||||||CYRF6936|
|
||||||
[SGF22](Protocols_Details.md#SGF22---97)|97|SGF22||||||||NRF24L01|XN297
|
[SGF22](Protocols_Details.md#SGF22---97)|97|F22|F22S|||||||NRF24L01|XN297
|
||||||
[Shenqi](Protocols_Details.md#Shenqi---19)|19|Shenqi||||||||NRF24L01|LT8900
|
[Shenqi](Protocols_Details.md#Shenqi---19)|19|Shenqi||||||||NRF24L01|LT8900
|
||||||
[Skyartec](Protocols_Details.md#Skyartec---68)|68|||||||||CC2500|CC2500
|
[Skyartec](Protocols_Details.md#Skyartec---68)|68|||||||||CC2500|CC2500
|
||||||
[SLT](Protocols_Details.md#SLT---11)|11|SLT_V1|SLT_V2|Q100|Q200|MR100|V1_4CH|||NRF24L01|CC2500
|
[SLT](Protocols_Details.md#SLT---11)|11|SLT_V1|SLT_V2|Q100|Q200|MR100|V1_4CH|||NRF24L01|CC2500
|
||||||
@ -2029,12 +2029,16 @@ A|E|T|R|FLIP|LIGHT|CALIB|HLESS|RTH|THR_CUT|ROTATE
|
|||||||
## SGF22 - *97*
|
## SGF22 - *97*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
|
||||||
Model: SGF22
|
|
||||||
|
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
||||||
---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET
|
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET
|
||||||
|
|
||||||
|
### Sub_protocol F22
|
||||||
|
Model: SG F22
|
||||||
|
|
||||||
|
### Sub_protocol F22S
|
||||||
|
Model: ParkTen F22S
|
||||||
|
|
||||||
## Shenqi - *19*
|
## Shenqi - *19*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user