mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 21:48:12 +00:00
Compare commits
3 Commits
04d4e39b87
...
ffae7dda1d
Author | SHA1 | Date | |
---|---|---|---|
|
ffae7dda1d | ||
|
4f17f76b39 | ||
|
31ef090508 |
@ -214,6 +214,6 @@
|
|||||||
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
|
97,0,SGF22,Std,1,Mode,Flip,LED,Pict,Video,TrRes
|
||||||
61,1,EazyRC
|
61,1,EazyRC
|
||||||
98,0,Kyosho3,ASF,0
|
98,0,Kyosho3,ASF,0
|
||||||
|
@ -42,6 +42,8 @@ static uint16_t __attribute__((unused)) KYOSHO3_send_packet()
|
|||||||
CYRF_SetPower(0x28);
|
CYRF_SetPower(0x28);
|
||||||
if(IS_BIND_IN_PROGRESS)
|
if(IS_BIND_IN_PROGRESS)
|
||||||
{
|
{
|
||||||
|
if(--bind_counter==0)
|
||||||
|
BIND_DONE;
|
||||||
packet[0] = 0xAA;
|
packet[0] = 0xAA;
|
||||||
//ID
|
//ID
|
||||||
memcpy(&packet[1],&rx_tx_addr[1],3);
|
memcpy(&packet[1],&rx_tx_addr[1],3);
|
||||||
@ -86,11 +88,6 @@ static uint16_t __attribute__((unused)) KYOSHO3_send_packet()
|
|||||||
|
|
||||||
uint16_t KYOSHO3_callback()
|
uint16_t KYOSHO3_callback()
|
||||||
{
|
{
|
||||||
if(IS_BIND_IN_PROGRESS)
|
|
||||||
{
|
|
||||||
if(--bind_counter==0)
|
|
||||||
BIND_DONE;
|
|
||||||
}
|
|
||||||
return KYOSHO3_send_packet();
|
return KYOSHO3_send_packet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +100,6 @@ void KYOSHO3_init()
|
|||||||
|
|
||||||
//Find a free even channel
|
//Find a free even channel
|
||||||
CYRF_FindBestChannels(hopping_frequency,1,1,0x04,0x50, FIND_CHANNEL_EVEN);
|
CYRF_FindBestChannels(hopping_frequency,1,1,0x04,0x50, FIND_CHANNEL_EVEN);
|
||||||
hopping_frequency[0] = 0x12;
|
|
||||||
|
|
||||||
#ifdef KYOSHO3_FORCE_ID // data taken from TX dump
|
#ifdef KYOSHO3_FORCE_ID // data taken from TX dump
|
||||||
rx_tx_addr[1] = 0x01;
|
rx_tx_addr[1] = 0x01;
|
||||||
|
@ -35,6 +35,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define SGF22_FLAG_VERTICAL 0xC0
|
#define SGF22_FLAG_VERTICAL 0xC0
|
||||||
//packet[9]
|
//packet[9]
|
||||||
#define SGF22_FLAG_PHOTO 0x40
|
#define SGF22_FLAG_PHOTO 0x40
|
||||||
|
#define SGF22_FLAG_TRIMRESET 0x04
|
||||||
|
|
||||||
static void __attribute__((unused)) SGF22_send_packet()
|
static void __attribute__((unused)) SGF22_send_packet()
|
||||||
{
|
{
|
||||||
@ -66,7 +67,8 @@ static void __attribute__((unused)) SGF22_send_packet()
|
|||||||
packet[8] |= SGF22_FLAG_6G; // mode 1 - 6g
|
packet[8] |= SGF22_FLAG_6G; // mode 1 - 6g
|
||||||
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
|
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
|
||||||
packet[8] |= SGF22_FLAG_VERTICAL; // mode 0 - vertical
|
packet[8] |= SGF22_FLAG_VERTICAL; // mode 0 - vertical
|
||||||
packet[9] = GET_FLAG(CH8_SW, SGF22_FLAG_PHOTO); // press in throttle trim for photo
|
packet[9] = GET_FLAG(CH8_SW, SGF22_FLAG_PHOTO) // press in throttle trim for photo
|
||||||
|
| GET_FLAG(CH10_SW, SGF22_FLAG_TRIMRESET); // Both sticks down inwards
|
||||||
packet[10] = 0x42; // no fine tune
|
packet[10] = 0x42; // no fine tune
|
||||||
packet[11] = 0x10; // no fine tune
|
packet[11] = 0x10; // no fine tune
|
||||||
}
|
}
|
||||||
@ -112,8 +114,8 @@ static void __attribute__((unused)) SGF22_initialize_txid()
|
|||||||
if(val ) hopping_frequency[3]++;*/
|
if(val ) hopping_frequency[3]++;*/
|
||||||
|
|
||||||
#ifdef FORCE_SGF22_ORIGINAL_ID
|
#ifdef FORCE_SGF22_ORIGINAL_ID
|
||||||
rx_tx_addr[2] = 0x1F; // TX2: 27
|
rx_tx_addr[2] = 0x1F; // TX2:27 TX3:2B
|
||||||
rx_tx_addr[3] = 0x61; // TX2: 51
|
rx_tx_addr[3] = 0x61; // TX2:51 TX3:0C
|
||||||
memcpy(hopping_frequency,"\x15\x34\x24\x44", SGF22_RF_NUM_CHANNELS); //Original dump=>21=0x15,52=0x34,36=0x24,68=0x44
|
memcpy(hopping_frequency,"\x15\x34\x24\x44", SGF22_RF_NUM_CHANNELS); //Original dump=>21=0x15,52=0x34,36=0x24,68=0x44
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
@ -165,7 +167,7 @@ void SGF22_init()
|
|||||||
SGF22_initialize_txid();
|
SGF22_initialize_txid();
|
||||||
SGF22_RF_init();
|
SGF22_RF_init();
|
||||||
bind_counter=SGF22_BIND_COUNT;
|
bind_counter=SGF22_BIND_COUNT;
|
||||||
packet_sent = packet_count = 0x26; // TX2: 26
|
packet_sent = packet_count = 0x26; // TX2:26 TX3:26
|
||||||
phase = 0;
|
phase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1991,9 +1991,9 @@ Autobind protocol
|
|||||||
|
|
||||||
Model: SGF22
|
Model: SGF22
|
||||||
|
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
||||||
---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO
|
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET
|
||||||
|
|
||||||
## Shenqi - *19*
|
## Shenqi - *19*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
Loading…
x
Reference in New Issue
Block a user