diff --git a/Multiprotocol/DSM2_cyrf6936.ino b/Multiprotocol/DSM2_cyrf6936.ino index 9a2b018..b51279a 100644 --- a/Multiprotocol/DSM2_cyrf6936.ino +++ b/Multiprotocol/DSM2_cyrf6936.ino @@ -84,7 +84,7 @@ const uint8_t PROGMEM pncodes[5][9][8] = { /* Col 5 */ {0x9B, 0x75, 0xF7, 0xE0, 0x14, 0x8D, 0xB5, 0x80}, /* Col 6 */ {0xBF, 0x54, 0x98, 0xB9, 0xB7, 0x30, 0x5A, 0x88}, /* Col 7 */ {0x35, 0xD1, 0xFC, 0x97, 0x23, 0xD4, 0xC9, 0x88}, - /* Col 8 */ {0x88, 0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40} + /* Col 8 */ {0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40, 0x93} }, { /* Row 4 */ /* Col 0 */ {0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40, 0x93}, diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index a2dc5b5..4b5f8fa 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -402,7 +402,7 @@ enum CC2500_POWER CC2500_POWER_17 = 0xFF // +1dbm }; #define CC2500_HIGH_POWER CC2500_POWER_16 -#define CC2500_LOW_POWER CC2500_POWER_13 +#define CC2500_LOW_POWER CC2500_POWER_13 #define CC2500_RANGE_POWER CC2500_POWER_1 #define CC2500_BIND_POWER CC2500_POWER_1 diff --git a/Multiprotocol/Multiprotocol.ino b/Multiprotocol/Multiprotocol.ino index d9be20b..a5bb69d 100644 --- a/Multiprotocol/Multiprotocol.ino +++ b/Multiprotocol/Multiprotocol.ino @@ -99,6 +99,15 @@ uint8_t prev_protocol=0; #define MAX_PKT 27 uint8_t pkt[MAX_PKT];//telemetry receiving packets #if defined(TELEMETRY) + #if defined DSM2_CYRF6936_INO + #define DSM_TELEMETRY + #endif + #if defined FRSKYX_CC2500_INO + #define SPORT_TELEMETRY + #endif + #if defined FRSKY_CC2500_INO + #define HUB_TELEMETRY + #endif uint8_t pktt[MAX_PKT];//telemetry receiving packets volatile uint8_t tx_head=0; volatile uint8_t tx_tail=0; diff --git a/Multiprotocol/Telemetry.ino b/Multiprotocol/Telemetry.ino index 1b90ceb..a7d692a 100644 --- a/Multiprotocol/Telemetry.ino +++ b/Multiprotocol/Telemetry.ino @@ -5,15 +5,6 @@ #if defined TELEMETRY -#if defined DSM2_CYRF6936_INO - #define DSM_TELEMETRY -#endif -#if defined FRSKYX_CC2500_INO - #define SPORT_TELEMETRY -#endif -#if defined FRSKY_CC2500_INO - #define HUB_TELEMETRY -#endif #if defined SPORT_TELEMETRY #define SPORT_TIME 12000 #define FRSKY_SPORT_PACKET_SIZE 8 @@ -64,11 +55,11 @@ void frskySendStuffed() void compute_RSSIdbm() { - RSSI_dBm = (((uint16_t)(pktt[len-2])*18)>>5); + RSSI_dBm = (((uint16_t)(pktt[len-2])*18)>>4); if(pktt[len-2] >=128) - RSSI_dBm -= 82; + RSSI_dBm -= 164; else - RSSI_dBm += 65; + RSSI_dBm += 130; } void frsky_check_telemetry(uint8_t *pkt,uint8_t len) @@ -110,8 +101,8 @@ void frsky_link_frame() compute_RSSIdbm(); frame[1] = pktt[3]; frame[2] = pktt[4]; - frame[3] = (uint8_t)RSSI_dBm; - frame[4] = pktt[5]*2; + frame[3] = pktt[5]; + frame[4] = (uint8_t)RSSI_dBm; } else if ((cur_protocol[0]&0x1F)==MODE_HUBSAN) diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index e4fb682..c0942e4 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -21,9 +21,6 @@ //#define TX_SPEKTRUM //Spektrum TAER (1100<->1900µs) //#define TX_HISKY //HISKY AETR (1100<->1900µs) -//Uncomment to enable telemetry -#define TELEMETRY - //Comment if a module is not installed #define A7105_INSTALLED #define CYRF6936_INSTALLED @@ -61,6 +58,22 @@ #define FY326_NRF24L01_INO #endif +//Uncomment to enable telemetry +#define TELEMETRY + +//Comment to disable a specific telemetry +#if defined(TELEMETRY) + #if defined DSM2_CYRF6936_INO + #define DSM_TELEMETRY + #endif + #if defined FRSKYX_CC2500_INO + #define SPORT_TELEMETRY + #endif + #if defined FRSKY_CC2500_INO + #define HUB_TELEMETRY + #endif +#endif + //Update this table to set which protocol and all associated settings are called for the corresponding dial number const PPM_Parameters PPM_prot[15]= { // Dial Protocol Sub protocol RX_Num Power Auto Bind Option