mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 18:38:13 +00:00
FrSky D16 LBT v1.x & 2.1: adjust thresholds to match ETSI requirements
This commit is contained in:
parent
2be757e609
commit
957d623b4b
@ -150,6 +150,11 @@ void CC2500_SetPower()
|
|||||||
#else
|
#else
|
||||||
power=CC2500_HIGH_POWER;
|
power=CC2500_HIGH_POWER;
|
||||||
#endif
|
#endif
|
||||||
|
if(IS_LBT_POWER_on)
|
||||||
|
{
|
||||||
|
power=CC2500_LBT_POWER;
|
||||||
|
LBT_POWER_off; // Only accept once
|
||||||
|
}
|
||||||
if(IS_RANGE_FLAG_on)
|
if(IS_RANGE_FLAG_on)
|
||||||
power=CC2500_RANGE_POWER;
|
power=CC2500_RANGE_POWER;
|
||||||
if(prev_power != power)
|
if(prev_power != power)
|
||||||
|
@ -302,10 +302,10 @@ uint16_t ReadFrSkyX()
|
|||||||
uint8_t rssi_level=convert_channel_8b(CH16)>>1; //CH16 0..127
|
uint8_t rssi_level=convert_channel_8b(CH16)>>1; //CH16 0..127
|
||||||
if ( rssi > rssi_level && rssi < 128) //test rssi level dynamically
|
if ( rssi > rssi_level && rssi < 128) //test rssi level dynamically
|
||||||
#else
|
#else
|
||||||
if ( rssi > 72 && rssi < 128) //LBT and RSSI between -36 and -8.5 dBm
|
if ( rssi > 14 && rssi < 128) // if RSSI above -65dBm (12=-70) => ETSI requirement
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
POWER_FLAG_off; // Reduce to low power before transmitting
|
LBT_POWER_on; // Reduce to low power before transmitting
|
||||||
debugln("Busy %d %d",hopping_frequency_no,rssi);
|
debugln("Busy %d %d",hopping_frequency_no,rssi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 0
|
#define VERSION_REVISION 0
|
||||||
#define VERSION_PATCH_LEVEL 93
|
#define VERSION_PATCH_LEVEL 94
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
@ -487,6 +487,11 @@ enum MultiPacketTypes
|
|||||||
#define DISABLE_TELEM_on protocol_flags3 |= _BV(3)
|
#define DISABLE_TELEM_on protocol_flags3 |= _BV(3)
|
||||||
#define IS_DISABLE_TELEM_on ( ( protocol_flags3 & _BV(3) ) !=0 )
|
#define IS_DISABLE_TELEM_on ( ( protocol_flags3 & _BV(3) ) !=0 )
|
||||||
#define IS_DISABLE_TELEM_off ( ( protocol_flags3 & _BV(3) ) ==0 )
|
#define IS_DISABLE_TELEM_off ( ( protocol_flags3 & _BV(3) ) ==0 )
|
||||||
|
//LBT power
|
||||||
|
#define LBT_POWER_off protocol_flags3 &= ~_BV(7)
|
||||||
|
#define LBT_POWER_on protocol_flags3 |= _BV(7)
|
||||||
|
#define IS_LBT_POWER_on ( ( protocol_flags3 & _BV(7) ) !=0 )
|
||||||
|
#define IS_LBT_POWER_off ( ( protocol_flags3 & _BV(7) ) ==0 )
|
||||||
|
|
||||||
|
|
||||||
// Failsafe
|
// Failsafe
|
||||||
@ -611,6 +616,7 @@ enum CC2500_POWER
|
|||||||
CC2500_POWER_17 = 0xFF // +1dbm
|
CC2500_POWER_17 = 0xFF // +1dbm
|
||||||
};
|
};
|
||||||
#define CC2500_HIGH_POWER CC2500_POWER_17
|
#define CC2500_HIGH_POWER CC2500_POWER_17
|
||||||
|
#define CC2500_LBT_POWER CC2500_POWER_14
|
||||||
#define CC2500_LOW_POWER CC2500_POWER_13
|
#define CC2500_LOW_POWER CC2500_POWER_13
|
||||||
#define CC2500_RANGE_POWER CC2500_POWER_1
|
#define CC2500_RANGE_POWER CC2500_POWER_1
|
||||||
#define CC2500_BIND_POWER CC2500_POWER_1
|
#define CC2500_BIND_POWER CC2500_POWER_1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user