From 9f25ba199eaf17d88f8378efefee4c0a21ff3107 Mon Sep 17 00:00:00 2001 From: Goebish Date: Fri, 5 Jun 2020 21:24:58 +0200 Subject: [PATCH] Add to RX protocols list --- Multiprotocol/Multiprotocol.ino | 2 +- Multiprotocol/V2X2_common.ino | 19 +++++++++++++++++++ Multiprotocol/V2X2_nrf24l01.ino | 22 ---------------------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/Multiprotocol/Multiprotocol.ino b/Multiprotocol/Multiprotocol.ino index 35b5071..31f8887 100644 --- a/Multiprotocol/Multiprotocol.ino +++ b/Multiprotocol/Multiprotocol.ino @@ -231,7 +231,7 @@ uint8_t packet_in[TELEMETRY_BUFFER_SIZE];//telemetry receiving packets #endif //RX protocols - #if defined(AFHDS2A_RX_A7105_INO) || defined(FRSKY_RX_CC2500_INO) || defined(BAYANG_RX_NRF24L01_INO) || defined(DSM_RX_CYRF6936_INO) + #if defined(AFHDS2A_RX_A7105_INO) || defined(FRSKY_RX_CC2500_INO) || defined(BAYANG_RX_NRF24L01_INO) || defined(DSM_RX_CYRF6936_INO) || defined(V2X2_RX_NRF24L01_INO) bool rx_data_started; bool rx_data_received; bool rx_disable_lna; diff --git a/Multiprotocol/V2X2_common.ino b/Multiprotocol/V2X2_common.ino index b706350..da42830 100644 --- a/Multiprotocol/V2X2_common.ino +++ b/Multiprotocol/V2X2_common.ino @@ -15,6 +15,25 @@ #if defined(V2X2_NRF24L01_INO) || defined(V2X2_RX_NRF24L01_INO) +enum { + V2X2_FLAG_CAMERA = 0x01, // also automatic Missile Launcher and Hoist in one direction + V2X2_FLAG_VIDEO = 0x02, // also Sprayer, Bubbler, Missile Launcher(1), and Hoist in the other dir. + V2X2_FLAG_FLIP = 0x04, + V2X2_FLAG_UNK9 = 0x08, + V2X2_FLAG_LIGHT = 0x10, + V2X2_FLAG_UNK10 = 0x20, + V2X2_FLAG_BIND = 0xC0, + // flags going to byte 10 + V2X2_FLAG_HEADLESS = 0x02, + V2X2_FLAG_MAG_CAL_X = 0x08, + V2X2_FLAG_MAG_CAL_Y = 0x20, + V2X2_FLAG_EMERGENCY = 0x80, // JXD-506 + // flags going to byte 11 (JXD-506) + V2X2_FLAG_START_STOP = 0x40, + V2X2_FLAG_CAMERA_UP = 0x01, + V2X2_FLAG_CAMERA_DN = 0x02, +}; + // This is frequency hopping table for V202 protocol // The table is the first 4 rows of 32 frequency hopping // patterns, all other rows are derived from the first 4. diff --git a/Multiprotocol/V2X2_nrf24l01.ino b/Multiprotocol/V2X2_nrf24l01.ino index 65ba649..22f0de0 100644 --- a/Multiprotocol/V2X2_nrf24l01.ino +++ b/Multiprotocol/V2X2_nrf24l01.ino @@ -29,28 +29,6 @@ #define V2X2_PACKET_CHKTIME 100 #define V2X2_PAYLOADSIZE 16 -// -enum { - V2X2_FLAG_CAMERA = 0x01, // also automatic Missile Launcher and Hoist in one direction - V2X2_FLAG_VIDEO = 0x02, // also Sprayer, Bubbler, Missile Launcher(1), and Hoist in the other dir. - V2X2_FLAG_FLIP = 0x04, - V2X2_FLAG_UNK9 = 0x08, - V2X2_FLAG_LIGHT = 0x10, - V2X2_FLAG_UNK10 = 0x20, - V2X2_FLAG_BIND = 0xC0, - // flags going to byte 10 - V2X2_FLAG_HEADLESS = 0x02, - V2X2_FLAG_MAG_CAL_X = 0x08, - V2X2_FLAG_MAG_CAL_Y = 0x20, - V2X2_FLAG_EMERGENCY = 0x80, // JXD-506 - // flags going to byte 11 (JXD-506) - V2X2_FLAG_START_STOP = 0x40, - V2X2_FLAG_CAMERA_UP = 0x01, - V2X2_FLAG_CAMERA_DN = 0x02, -}; - -// - enum { V202_INIT2 = 0, V202_INIT2_NO_BIND,//1