mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-13 10:17:55 +00:00
Compare commits
No commits in common. "082e96e381986108a1606c48a8679426a6648be5" and "13024e3816e67567a8295bec711d1ff58c21aa09" have entirely different histories.
082e96e381
...
13024e3816
@ -292,7 +292,7 @@ uint16_t DSM_callback()
|
|||||||
#define DSM_CH1_CH2_DELAY 4010 // Time between write of channel 1 and channel 2
|
#define DSM_CH1_CH2_DELAY 4010 // Time between write of channel 1 and channel 2
|
||||||
#ifdef STM32_BOARD
|
#ifdef STM32_BOARD
|
||||||
#define DSM_WRITE_DELAY 1600 // Time after write to verify write complete
|
#define DSM_WRITE_DELAY 1600 // Time after write to verify write complete
|
||||||
#define DSM_READ_DELAY 300 // Time before write to check read phase, and switch channels.
|
#define DSM_READ_DELAY 400 // Time before write to check read phase, and switch channels.
|
||||||
#else
|
#else
|
||||||
#define DSM_WRITE_DELAY 1950 // Time after write to verify write complete
|
#define DSM_WRITE_DELAY 1950 // Time after write to verify write complete
|
||||||
#define DSM_READ_DELAY 600 // Time before write to check read phase, and switch channels.
|
#define DSM_READ_DELAY 600 // Time before write to check read phase, and switch channels.
|
||||||
@ -470,15 +470,15 @@ uint16_t DSM_callback()
|
|||||||
case DSM_CH2_READ_B:
|
case DSM_CH2_READ_B:
|
||||||
//Read telemetry
|
//Read telemetry
|
||||||
rx_phase = CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
|
rx_phase = CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
|
||||||
//debug("ST1:%02X ",rx_phase);
|
debug("ST1:%02X ",rx_phase);
|
||||||
if((rx_phase & 0x03) == 0x02) // RXC=1, RXE=0 then 2nd check is required (debouncing)
|
if((rx_phase & 0x03) == 0x02) // RXC=1, RXE=0 then 2nd check is required (debouncing)
|
||||||
rx_phase |= CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
|
rx_phase |= CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
|
||||||
//debug("ST2:%02X ",rx_phase);
|
debug("ST2:%02X ",rx_phase);
|
||||||
if((rx_phase & 0x07) == 0x02)
|
if((rx_phase & 0x07) == 0x02)
|
||||||
{ // good data (complete with no errors)
|
{ // good data (complete with no errors)
|
||||||
CYRF_WriteRegister(CYRF_07_RX_IRQ_STATUS, 0x80); // need to set RXOW before data read
|
CYRF_WriteRegister(CYRF_07_RX_IRQ_STATUS, 0x80); // need to set RXOW before data read
|
||||||
length=CYRF_ReadRegister(CYRF_09_RX_COUNT);
|
length=CYRF_ReadRegister(CYRF_09_RX_COUNT);
|
||||||
//debug("RX(%d)",length);
|
debug("RX(%d)",length);
|
||||||
if(length>TELEMETRY_BUFFER_SIZE-2)
|
if(length>TELEMETRY_BUFFER_SIZE-2)
|
||||||
length=TELEMETRY_BUFFER_SIZE-2;
|
length=TELEMETRY_BUFFER_SIZE-2;
|
||||||
CYRF_ReadDataPacketLen(packet_in+1, length);
|
CYRF_ReadDataPacketLen(packet_in+1, length);
|
||||||
@ -496,7 +496,7 @@ uint16_t DSM_callback()
|
|||||||
// debug(" %02X", packet_in[i]);
|
// debug(" %02X", packet_in[i]);
|
||||||
telemetry_link=1;
|
telemetry_link=1;
|
||||||
}
|
}
|
||||||
//debugln("");
|
debugln("");
|
||||||
CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x20); // Abort RX operation
|
CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x20); // Abort RX operation
|
||||||
if (phase == DSM_CH2_READ_A && (sub_protocol==DSM2_1F || sub_protocol==DSMX_1F) && num_ch < 8) // 22ms mode
|
if (phase == DSM_CH2_READ_A && (sub_protocol==DSM2_1F || sub_protocol==DSMX_1F) && num_ch < 8) // 22ms mode
|
||||||
{
|
{
|
||||||
|
@ -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 50
|
#define VERSION_PATCH_LEVEL 49
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define SGF22_J20_FLAG_FIXHEIGHT 0x80
|
#define SGF22_J20_FLAG_FIXHEIGHT 0x80
|
||||||
|
|
||||||
#define SGF22_WRITE_TIME 1000
|
#define SGF22_WRITE_TIME 1000
|
||||||
|
//#define SGF22_HUB_TELEMETRY
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SGF22_DATA1,
|
SGF22_DATA1,
|
||||||
@ -192,9 +193,9 @@ uint16_t SGF22_callback()
|
|||||||
{
|
{
|
||||||
uint8_t p_len = XN297_ReadEnhancedPayload(packet_in, SGF22_PAYLOAD_SIZE);
|
uint8_t p_len = XN297_ReadEnhancedPayload(packet_in, SGF22_PAYLOAD_SIZE);
|
||||||
if(p_len == 3 && packet_in[0] == rx_tx_addr[2] && packet_in[1] == rx_tx_addr[3])
|
if(p_len == 3 && packet_in[0] == rx_tx_addr[2] && packet_in[1] == rx_tx_addr[3])
|
||||||
{//packets: 00 0B 00 -> 00 0B 01
|
{//packets only received when battery is low: 00 0B 01
|
||||||
telemetry_link = 1;
|
telemetry_link = 1;
|
||||||
v_lipo1 = packet_in[2] ? 0 : 255; //2.9V for 1S, 7.0V for 2S
|
v_lipo1 = packet_in[2] ? 0 : 255;
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
debug("L %d ",p_len);
|
debug("L %d ",p_len);
|
||||||
|
@ -499,7 +499,6 @@
|
|||||||
#undef V761_HUB_TELEMETRY
|
#undef V761_HUB_TELEMETRY
|
||||||
#undef FX_HUB_TELEMETRY
|
#undef FX_HUB_TELEMETRY
|
||||||
#undef XK2_HUB_TELEMETRY
|
#undef XK2_HUB_TELEMETRY
|
||||||
#undef SGF22_HUB_TELEMETRY
|
|
||||||
#undef KAMTOM_HUB_TELEMETRY
|
#undef KAMTOM_HUB_TELEMETRY
|
||||||
#undef YUXIANG_HUB_TELEMETRY
|
#undef YUXIANG_HUB_TELEMETRY
|
||||||
#undef RLINK_HUB_TELEMETRY
|
#undef RLINK_HUB_TELEMETRY
|
||||||
@ -546,9 +545,6 @@
|
|||||||
#if not defined(XK2_CCNRF_INO)
|
#if not defined(XK2_CCNRF_INO)
|
||||||
#undef XK2_HUB_TELEMETRY
|
#undef XK2_HUB_TELEMETRY
|
||||||
#endif
|
#endif
|
||||||
#if not defined(SGF22_NRF24L01_INO)
|
|
||||||
#undef SGF22_HUB_TELEMETRY
|
|
||||||
#endif
|
|
||||||
#if not defined(KAMTOM_NRF24L01_INO)
|
#if not defined(KAMTOM_NRF24L01_INO)
|
||||||
#undef KAMTOM_HUB_TELEMETRY
|
#undef KAMTOM_HUB_TELEMETRY
|
||||||
#endif
|
#endif
|
||||||
@ -612,7 +608,7 @@
|
|||||||
//protocols using FRSKYD user frames
|
//protocols using FRSKYD user frames
|
||||||
#undef HUB_TELEMETRY
|
#undef HUB_TELEMETRY
|
||||||
#endif
|
#endif
|
||||||
#if not defined(HOTT_FW_TELEMETRY) && not defined(DSM_TELEMETRY) && not defined(SPORT_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(HUBSAN_HUB_TELEMETRY) && not defined(BUGS_HUB_TELEMETRY) && not defined(NCC1701_HUB_TELEMETRY) && not defined(BAYANG_HUB_TELEMETRY) && not defined(CABELL_HUB_TELEMETRY) && not defined(RLINK_HUB_TELEMETRY) && not defined(AFHDS2A_HUB_TELEMETRY) && not defined(AFHDS2A_FW_TELEMETRY) && not defined(MULTI_TELEMETRY) && not defined(MULTI_STATUS) && not defined(HITEC_HUB_TELEMETRY) && not defined(HITEC_FW_TELEMETRY) && not defined(SCANNER_TELEMETRY) && not defined(FRSKY_RX_TELEMETRY) && not defined(AFHDS2A_RX_TELEMETRY) && not defined(BAYANG_RX_TELEMETRY) && not defined(DEVO_HUB_TELEMETRY) && not defined(PROPEL_HUB_TELEMETRY) && not defined(OMP_HUB_TELEMETRY) && not defined(V761_HUB_TELEMETRY) && not defined(SGF22_HUB_TELEMETRY) && not defined(XK2_HUB_TELEMETRY) && not defined(FX_HUB_TELEMETRY) && not defined(KAMTOM_HUB_TELEMETRY) && not defined(YUXIANG_HUB_TELEMETRY) && not defined(WFLY2_HUB_TELEMETRY) && not defined(LOLI_HUB_TELEMETRY) && not defined(MLINK_HUB_TELEMETRY) && not defined(MLINK_FW_TELEMETRY) && not defined(MT99XX_HUB_TELEMETRY) && not defined(MULTI_CONFIG_INO)
|
#if not defined(HOTT_FW_TELEMETRY) && not defined(DSM_TELEMETRY) && not defined(SPORT_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(HUBSAN_HUB_TELEMETRY) && not defined(BUGS_HUB_TELEMETRY) && not defined(NCC1701_HUB_TELEMETRY) && not defined(BAYANG_HUB_TELEMETRY) && not defined(CABELL_HUB_TELEMETRY) && not defined(RLINK_HUB_TELEMETRY) && not defined(AFHDS2A_HUB_TELEMETRY) && not defined(AFHDS2A_FW_TELEMETRY) && not defined(MULTI_TELEMETRY) && not defined(MULTI_STATUS) && not defined(HITEC_HUB_TELEMETRY) && not defined(HITEC_FW_TELEMETRY) && not defined(SCANNER_TELEMETRY) && not defined(FRSKY_RX_TELEMETRY) && not defined(AFHDS2A_RX_TELEMETRY) && not defined(BAYANG_RX_TELEMETRY) && not defined(DEVO_HUB_TELEMETRY) && not defined(PROPEL_HUB_TELEMETRY) && not defined(OMP_HUB_TELEMETRY) && not defined(V761_HUB_TELEMETRY) && not defined(XK2_HUB_TELEMETRY) && not defined(FX_HUB_TELEMETRY) && not defined(KAMTOM_HUB_TELEMETRY) && not defined(YUXIANG_HUB_TELEMETRY) && not defined(WFLY2_HUB_TELEMETRY) && not defined(LOLI_HUB_TELEMETRY) && not defined(MLINK_HUB_TELEMETRY) && not defined(MLINK_FW_TELEMETRY) && not defined(MT99XX_HUB_TELEMETRY) && not defined(MULTI_CONFIG_INO)
|
||||||
#undef TELEMETRY
|
#undef TELEMETRY
|
||||||
#undef INVERT_TELEMETRY
|
#undef INVERT_TELEMETRY
|
||||||
#undef MULTI_TELEMETRY
|
#undef MULTI_TELEMETRY
|
||||||
|
@ -351,7 +351,6 @@
|
|||||||
#define KAMTOM_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define KAMTOM_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define FX_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define FX_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define XK2_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define XK2_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define SGF22_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
|
||||||
#define YUXIANG_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define YUXIANG_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define PROPEL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define PROPEL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define CABELL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define CABELL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
|
@ -2238,8 +2238,6 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
|
|||||||
---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET|BAL|BALHIG
|
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET|BAL|BALHIG
|
||||||
|
|
||||||
Telemetry is supported. The plane sends a battery status of good->empty which is visible in A1 (good=13.2V->empty=0V) and RSSI gets a dummy value of 100.
|
|
||||||
|
|
||||||
### Sub_protocol F22
|
### Sub_protocol F22
|
||||||
Model: SG F22
|
Model: SG F22
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user