mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-09 22:38:10 +00:00
_Config.h tweaks
This commit is contained in:
parent
edd4f740e0
commit
74ab2a4bd7
@ -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,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
|
// 0C,1C,A1,2B,00,18,00,00,00,00,00,18,00,50,92
|
||||||
debug(",telem");
|
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
|
switch(pkt[5]) // telemetry frame number
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
@ -346,14 +354,6 @@ uint16_t ReadHITEC()
|
|||||||
TX_RSSI += 128;
|
TX_RSSI += 128;
|
||||||
TX_LQI = pkt[14]&0x7F;
|
TX_LQI = pkt[14]&0x7F;
|
||||||
telemetry_link=1; // telemetry hub available
|
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
|
#endif
|
||||||
}
|
}
|
||||||
debugln("");
|
debugln("");
|
||||||
|
@ -218,7 +218,7 @@
|
|||||||
#undef HITEC_FW_TELEMETRY
|
#undef HITEC_FW_TELEMETRY
|
||||||
#endif
|
#endif
|
||||||
#if defined(HITEC_HUB_TELEMETRY) && defined(HITEC_FW_TELEMETRY)
|
#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
|
#endif
|
||||||
#if not defined(FRSKYD_CC2500_INO)
|
#if not defined(FRSKYD_CC2500_INO)
|
||||||
#undef HUB_TELEMETRY
|
#undef HUB_TELEMETRY
|
||||||
|
@ -240,16 +240,16 @@
|
|||||||
//#define MULTI_TELEMETRY
|
//#define MULTI_TELEMETRY
|
||||||
|
|
||||||
//Comment a line to disable a specific protocol 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 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 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 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 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 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_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 directly to be decoded by ersky9x or 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.
|
//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).
|
//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).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user