diff --git a/Multiprotocol/Hitec_cc2500.ino b/Multiprotocol/Hitec_cc2500.ino index c316f7b..276c6c8 100644 --- a/Multiprotocol/Hitec_cc2500.ino +++ b/Multiprotocol/Hitec_cc2500.ino @@ -326,7 +326,15 @@ uint16_t ReadHITEC() // 0C,1C,A1,2B,00,17,00,00,00,42,44,17,00,48,8D -> 42=>temperature3 0x42-0x28=26°C,44=>temperature4 0x44-0x28=28°C // 0C,1C,A1,2B,00,18,00,00,00,00,00,18,00,50,92 debug(",telem"); - #if defined(HITEC_HUB_TELEMETRY) + #if defined(HITEC_FW_TELEMETRY) + // 8 bytes telemetry packets => see at the end of this file how to fully decode it + pkt[0]=pkt[13]; // TX RSSI + pkt[1]=pkt[14]&0x7F; // TX LQI + uint8_t offset=pkt[5]==0?1:0; + for(uint8_t i=5;i < 11; i++) + pkt[i-3]=pkt[i+offset]; // frame number followed by 5 bytes of data + telemetry_link=2; // telemetry forward available + #elif defined(HITEC_HUB_TELEMETRY) switch(pkt[5]) // telemetry frame number { case 0x00: @@ -346,14 +354,6 @@ uint16_t ReadHITEC() TX_RSSI += 128; TX_LQI = pkt[14]&0x7F; telemetry_link=1; // telemetry hub available - #elif defined(HITEC_FW_TELEMETRY) - // 8 bytes telemetry packets => see at the end of this file how to fully decode it - pkt[0]=pkt[13]; // TX RSSI - pkt[1]=pkt[14]&0x7F; // LQI - uint8_t offset=pkt[5]==0?1:0; - for(uint8_t i=5;i < 11; i++) - pkt[i-3]=pkt[i+offset]; // frame number followed by 5 bytes of data - telemetry_link=2; // telemetry forward available #endif } debugln(""); diff --git a/Multiprotocol/Validate.h b/Multiprotocol/Validate.h index 56d4bc4..a60561d 100644 --- a/Multiprotocol/Validate.h +++ b/Multiprotocol/Validate.h @@ -218,7 +218,7 @@ #undef HITEC_FW_TELEMETRY #endif #if defined(HITEC_HUB_TELEMETRY) && defined(HITEC_FW_TELEMETRY) - #error You need to choose HUB or FW telemetry but not both. + #error You need to choose between HITEC HUB or HITEC FW telemetry but not both. #endif #if not defined(FRSKYD_CC2500_INO) #undef HUB_TELEMETRY diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 6b836b6..648af1f 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -240,16 +240,16 @@ //#define MULTI_TELEMETRY //Comment a line to disable a specific protocol telemetry -#define DSM_TELEMETRY // Forward received telemetry packet directly to TX to be decoded +#define DSM_TELEMETRY // Forward received telemetry packet directly to TX to be decoded by er9x, ersky9x and OpenTX #define SPORT_TELEMETRY // Use FrSkyX SPORT format to send telemetry to TX -#define AFHDS2A_FW_TELEMETRY // Forward received telemetry packet directly to TX to be decoded +#define AFHDS2A_FW_TELEMETRY // Forward received telemetry packet directly to TX to be decoded by ersky9x and OpenTX +#define AFHDS2A_HUB_TELEMETRY // Use FrSkyD Hub format to send basic telemetry to TX like er9x #define HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX -#define AFHDS2A_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX #define BAYANG_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 CABELL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX -#define HITEC_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to er9x and ersky9x -//#define HITEC_FW_TELEMETRY // Under development: Forward received telemetry packets directly to be decoded by ersky9x or OpenTX +#define HITEC_HUB_TELEMETRY // Use FrSkyD Hub format to send basic telemetry to the radios which can decode it like er9x, ersky9x and OpenTX +//#define HITEC_FW_TELEMETRY // Under development: Forward received telemetry packets to be decoded by ersky9x and OpenTX //SPORT_POLLING is an implementation of the same polling routine as XJT module for sport telemetry bidirectional communication. //This is useful for passing sport control frames from TX to RX(ex: changing Betaflight PID or VTX channels on the fly using LUA scripts with OpentX).