Merge pull request #142 from ortegafernando/master
Add getPowerLevel function
This commit is contained in:
commit
8b0c3c9278
|
|
@ -241,6 +241,11 @@ void RFM69::setPowerLevel(uint8_t powerLevel)
|
|||
writeReg(REG_PALEVEL, (readReg(REG_PALEVEL) & 0xE0) | _powerLevel);
|
||||
}
|
||||
|
||||
uint8_t RFM69::getPowerLevel() // get powerLevel
|
||||
{
|
||||
return _powerLevel;
|
||||
}
|
||||
|
||||
bool RFM69::canSend()
|
||||
{
|
||||
if (_mode == RF69_MODE_RX && PAYLOADLEN == 0 && readRSSI() < CSMA_LIMIT) // if signal stronger than -100dBm is detected assume channel activity
|
||||
|
|
|
|||
1
RFM69.h
1
RFM69.h
|
|
@ -218,6 +218,7 @@ class RFM69 {
|
|||
//void promiscuous(bool onOff=true); //replaced with spyMode()
|
||||
virtual void setHighPower(bool onOFF=true); // has to be called after initialize() for RFM69HW
|
||||
virtual void setPowerLevel(uint8_t level); // reduce/increase transmit power level
|
||||
uint8_t getPowerLevel(); // get powerLevel
|
||||
void sleep();
|
||||
uint8_t readTemperature(uint8_t calFactor=0); // get CMOS temperature (8bit)
|
||||
void rcCalibration(); // calibrate the internal RC oscillator for use in wide temperature variations - see datasheet section [4.3.5. RC Timer Accuracy]
|
||||
|
|
|
|||
Loading…
Reference in New Issue