Added the option to enable/disable the LNA (for the NRF modules that have one)
This commit is contained in:
parent
8409be43e7
commit
594fc0cdb2
@ -113,9 +113,9 @@ void WSPeripherals::_3V3PowerRail(State state)
|
||||
|
||||
const RF24 &WSPeripherals::getRadio(){return _NRF;}
|
||||
|
||||
void WSPeripherals::applyRadioConfig(uint8_t channel, uint8_t paLevel, rf24_datarate_e datarate)
|
||||
void WSPeripherals::applyRadioConfig(uint8_t channel, uint8_t paLevel, bool enableLNA, rf24_datarate_e datarate)
|
||||
{
|
||||
_NRF.setChannel(channel);
|
||||
_NRF.setPALevel(paLevel);
|
||||
_NRF.setPALevel(paLevel, enableLNA);
|
||||
_NRF.setDataRate(datarate);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class WSPeripherals
|
||||
/*
|
||||
* Before calling this method, externalPeripherals(ON) and initExternalPeripherals() must be called respectively
|
||||
*/
|
||||
void applyRadioConfig(uint8_t channel = RADIO_CHANNEL, uint8_t paLevel = RADIO_PA_LEVEL, rf24_datarate_e datarate = RADIO_DATARATE);
|
||||
void applyRadioConfig(uint8_t channel = RADIO_CHANNEL, uint8_t paLevel = RADIO_PA_LEVEL, bool enableLNA = ENABLE_LNA, rf24_datarate_e datarate = RADIO_DATARATE);
|
||||
const RF24 &getRadio();
|
||||
|
||||
protected:
|
||||
|
@ -22,9 +22,11 @@
|
||||
#define RADIO_CHANNEL 108
|
||||
#define RADIO_NODE_ADDRESS "WEST1" //Weather Station 1
|
||||
#define RADIO_PA_LEVEL RF24_PA_LOW //RF24_PA_MIN,RF24_PA_LOW,RF24_PA_HIGH,RF24_PA_MAX
|
||||
#define ENABLE_LNA false //true or false
|
||||
#define RADIO_DATARATE RF24_250KBPS
|
||||
|
||||
//Sleep config part : in 4 second increments ie : 1 corresponds to 4s of sleep, and 15 correponds to 60 seconds of sleep.
|
||||
//Sleep config part : in 4 second increments ie : 1 corresponds to 4s of sleep, and 15 correponds to 60 seconds of sleep.
|
||||
//Max is 255 * 4s.
|
||||
#define SLEEP_4_SEC_INTERVAL 15
|
||||
|
||||
//Pin config part
|
||||
|
Loading…
Reference in New Issue
Block a user