diff --git a/Multiprotocol/Devo_cyrf6936.ino b/Multiprotocol/Devo_cyrf6936.ino index 6e41964..d8d7117 100644 --- a/Multiprotocol/Devo_cyrf6936.ino +++ b/Multiprotocol/Devo_cyrf6936.ino @@ -162,6 +162,7 @@ static void __attribute__((unused)) DEVO_build_data_pkt() DEVO_add_pkt_suffix(); } +#if defined DEVO_HUB_TELEMETRY static void __attribute__((unused)) DEVO_parse_telemetry_packet() { DEVO_scramble_pkt(); //This will unscramble the packet @@ -186,6 +187,7 @@ static void __attribute__((unused)) DEVO_parse_telemetry_packet() v_lipo2 = packet[3] << 1; } } +#endif static void __attribute__((unused)) DEVO_cyrf_set_bound_sop_code() { @@ -296,7 +298,7 @@ uint16_t devo_callback() { static uint8_t txState=0; -#if defined DEVO_HUB_TELEMETRY +#if defined DEVO_HUB_TELEMETRY int delay; if (txState == 0) diff --git a/Multiprotocol/Multi_Names.ino b/Multiprotocol/Multi_Names.ino index caacff5..46f820a 100644 --- a/Multiprotocol/Multi_Names.ino +++ b/Multiprotocol/Multi_Names.ino @@ -244,7 +244,7 @@ const mm_protocol_definition multi_protocols[] = { {PROTO_FRSKYL, STR_FRSKYL, 2, STR_SUBTYPE_FRSKYL, OPTION_RFTUNE }, #endif #if defined(FRSKYR9_SX1276_INO) - {PROTO_FRSKY_R9, STR_FRSKYR9, 4, STR_SUBTYPE_FRSKYR9, OPTION_RFPOWER }, + {PROTO_FRSKY_R9, STR_FRSKYR9, 4, STR_SUBTYPE_FRSKYR9, OPTION_NONE }, #endif #if defined(FX816_NRF24L01_INO) {PROTO_FX816, STR_FX816, 1, STR_SUBTYPE_FX816, OPTION_NONE }, diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 120ea12..ddd6db3 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 1 -#define VERSION_PATCH_LEVEL 14 +#define VERSION_PATCH_LEVEL 15 //****************** // Protocols diff --git a/Multiprotocol/Propel_nrf24l01.ino b/Multiprotocol/Propel_nrf24l01.ino index 2b59805..42a698f 100644 --- a/Multiprotocol/Propel_nrf24l01.ino +++ b/Multiprotocol/Propel_nrf24l01.ino @@ -252,28 +252,30 @@ uint16_t PROPEL_callback() break; case PROPEL_DATA1: - if (_BV(NRF24L01_07_RX_DR) & NRF24L01_ReadReg(NRF24L01_07_STATUS)) - {// data received from the model - NRF24L01_ReadPayload(packet_in, PROPEL_PACKET_SIZE); - if (packet_in[0] == 0xa3 && memcmp(&packet_in[1],rx_id,3)==0) - { - telemetry_counter++; //LQI - v_lipo1=packet[5]; //number of life left? - v_lipo2=packet[4]; //bit mask: 0x80=flying, 0x08=taking off, 0x04=landing, 0x00=landed/crashed - if(telemetry_lost==0) - telemetry_link=1; + #ifdef PROPEL_HUB_TELEMETRY + if (_BV(NRF24L01_07_RX_DR) & NRF24L01_ReadReg(NRF24L01_07_STATUS)) + {// data received from the model + NRF24L01_ReadPayload(packet_in, PROPEL_PACKET_SIZE); + if (packet_in[0] == 0xa3 && memcmp(&packet_in[1],rx_id,3)==0) + { + telemetry_counter++; //LQI + v_lipo1=packet[5]; //number of life left? + v_lipo2=packet[4]; //bit mask: 0x80=flying, 0x08=taking off, 0x04=landing, 0x00=landed/crashed + if(telemetry_lost==0) + telemetry_link=1; + } } - } + packet_count++; + if(packet_count>=100) + {//LQI calculation + packet_count=0; + TX_LQI=telemetry_counter; + RX_RSSI=telemetry_counter; + telemetry_counter = 0; + telemetry_lost=0; + } + #endif PROPEL_data_packet(); - packet_count++; - if(packet_count>=100) - {//LQI calculation - packet_count=0; - TX_LQI=telemetry_counter; - RX_RSSI=telemetry_counter; - telemetry_counter = 0; - telemetry_lost=0; - } break; } return PROPEL_PACKET_PERIOD; diff --git a/Multiprotocol/Validate.h b/Multiprotocol/Validate.h index 1bfab72..27efe68 100644 --- a/Multiprotocol/Validate.h +++ b/Multiprotocol/Validate.h @@ -321,6 +321,7 @@ #undef BAYANG_RX_TELEMETRY #undef BAYANG_RX_NRF24L01_INO #undef DEVO_HUB_TELEMETRY + #undef PROPEL_HUB_TELEMETRY #undef DSM_RX_CYRF6936_INO #else #if defined(MULTI_TELEMETRY) && defined(MULTI_STATUS) @@ -348,6 +349,9 @@ #if not defined(DEVO_CYRF6936_INO) #undef DEVO_HUB_TELEMETRY #endif + #if not defined(PROPEL_NRF24L01_INO) + #undef PROPEL_HUB_TELEMETRY + #endif #if not defined(NCC1701_NRF24L01_INO) #undef NCC1701_HUB_TELEMETRY #endif @@ -384,7 +388,7 @@ #if not defined(HOTT_CC2500_INO) #undef HOTT_FW_TELEMETRY #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(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) + #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(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) #undef TELEMETRY #undef INVERT_TELEMETRY #undef MULTI_TELEMETRY diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index d90e1a4..88d73da 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -310,6 +310,7 @@ #define DEVO_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX #define HUBSAN_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX #define NCC1701_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 HITEC_HUB_TELEMETRY // Use FrSkyD Hub format to send basic telemetry to the radios which can decode it like er9x, erskyTX and OpenTX #define HITEC_FW_TELEMETRY // Forward received telemetry packets to be decoded by erskyTX and OpenTX