Disable low power by default

This commit is contained in:
pascallanger 2017-02-23 11:23:25 +01:00
parent 2ba3552578
commit 846e09c7cb
5 changed files with 31 additions and 8 deletions

View File

@ -146,7 +146,11 @@ void A7105_SetPower()
{
uint8_t power=A7105_BIND_POWER;
if(IS_BIND_DONE_on)
power=IS_POWER_FLAG_on?A7105_HIGH_POWER:A7105_LOW_POWER;
#ifdef A7105_ENABLE_LOW_POWER
power=IS_POWER_FLAG_on?A7105_HIGH_POWER:A7105_LOW_POWER;
#else
power=A7105_HIGH_POWER;
#endif
if(IS_RANGE_FLAG_on)
power=A7105_RANGE_POWER;
if(prev_power != power)

View File

@ -145,7 +145,11 @@ void CC2500_SetPower()
{
uint8_t power=CC2500_BIND_POWER;
if(IS_BIND_DONE_on)
power=IS_POWER_FLAG_on?CC2500_HIGH_POWER:CC2500_LOW_POWER;
#ifdef CC2500_ENABLE_LOW_POWER
power=IS_POWER_FLAG_on?CC2500_HIGH_POWER:CC2500_LOW_POWER;
#else
power=CC2500_HIGH_POWER;
#endif
if(IS_RANGE_FLAG_on)
power=CC2500_RANGE_POWER;
if(prev_power != power)

View File

@ -133,7 +133,11 @@ void CYRF_SetPower(uint8_t val)
{
uint8_t power=CYRF_BIND_POWER;
if(IS_BIND_DONE_on)
power=IS_POWER_FLAG_on?CYRF_HIGH_POWER:CYRF_LOW_POWER;
#ifdef CYRF6936_ENABLE_LOW_POWER
power=IS_POWER_FLAG_on?CYRF_HIGH_POWER:CYRF_LOW_POWER;
#else
power=CYRF_HIGH_POWER;
#endif
if(IS_RANGE_FLAG_on)
power=CYRF_RANGE_POWER;
power|=val;

View File

@ -160,7 +160,11 @@ void NRF24L01_SetPower()
{
uint8_t power=NRF_BIND_POWER;
if(IS_BIND_DONE_on)
power=IS_POWER_FLAG_on?NRF_HIGH_POWER:NRF_LOW_POWER;
#ifdef NRF24L01_ENABLE_LOW_POWER
power=IS_POWER_FLAG_on?NRF_HIGH_POWER:NRF_LOW_POWER;
#else
power=NRF_HIGH_POWER;
#endif
if(IS_RANGE_FLAG_on)
power=NRF_POWER_0;
rf_setup = (rf_setup & 0xF9) | (power << 1);

View File

@ -50,9 +50,9 @@
#define WAIT_FOR_BIND
/**************************/
/*** RF CHIPS INSTALLED ***/
/**************************/
/****************/
/*** RF CHIPS ***/
/****************/
//There are 4 RF components supported. If one of them is not installed you must comment it using "//".
//If a chip is not installed all associated protocols are disabled.
//4-in-1 modules have all RF chips installed
@ -62,6 +62,14 @@
#define CC2500_INSTALLED
#define NRF24L01_INSTALLED
//Low power is reducing the transmit power of the multi module. This setting is configurable per model in PPM (table below) or Serial mode (radio GUI).
//It can be activated when flying indoor or small models since the distance is short or if a model is causing issues when flying closed to the TX.
//By default low power is completly disabled on all rf chips to prevent mistakes, but you can enable it by uncommenting the lines below:
//#define A7105_ENABLE_LOW_POWER
//#define CYRF6936_ENABLE_LOW_POWER
//#define CC2500_ENABLE_LOW_POWER
//#define NRF24L01_ENABLE_LOW_POWER
/****************************/
/*** PROTOCOLS TO INCLUDE ***/
@ -70,7 +78,6 @@
//All the protocols will not fit in the Atmega328p module so you need to pick and choose.
//Comment the protocols you are not using with "//" to save Flash space.
//The protocols below need an A7105 to be installed
#define FLYSKY_A7105_INO
#define HUBSAN_A7105_INO