Update RFM69.cpp
This commit is contained in:
parent
4c9aa5ea33
commit
aef898228b
10
RFM69.cpp
10
RFM69.cpp
|
|
@ -227,6 +227,11 @@ void RFM69::setPowerLevel(uint8_t powerLevel)
|
||||||
writeReg(REG_PALEVEL, (readReg(REG_PALEVEL) & 0xE0) | _powerLevel);
|
writeReg(REG_PALEVEL, (readReg(REG_PALEVEL) & 0xE0) | _powerLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t RFM69::getPowerLevel() // get powerLevel
|
||||||
|
{
|
||||||
|
return _powerLevel;
|
||||||
|
}
|
||||||
|
|
||||||
bool RFM69::canSend()
|
bool RFM69::canSend()
|
||||||
{
|
{
|
||||||
if (_mode == RF69_MODE_RX && PAYLOADLEN == 0 && readRSSI() < CSMA_LIMIT) // if signal stronger than -100dBm is detected assume channel activity
|
if (_mode == RF69_MODE_RX && PAYLOADLEN == 0 && readRSSI() < CSMA_LIMIT) // if signal stronger than -100dBm is detected assume channel activity
|
||||||
|
|
@ -844,11 +849,6 @@ uint8_t RFM69::readTemperature(uint8_t calFactor) // returns centigrade
|
||||||
return ~readReg(REG_TEMP2) + COURSE_TEMP_COEF + calFactor; // 'complement' corrects the slope, rising temp = rising val
|
return ~readReg(REG_TEMP2) + COURSE_TEMP_COEF + calFactor; // 'complement' corrects the slope, rising temp = rising val
|
||||||
} // COURSE_TEMP_COEF puts reading in the ballpark, user can add additional correction
|
} // COURSE_TEMP_COEF puts reading in the ballpark, user can add additional correction
|
||||||
|
|
||||||
uint8_t RFM69::readPowerLevel() // get powerLevel
|
|
||||||
{
|
|
||||||
return _powerLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RFM69::rcCalibration()
|
void RFM69::rcCalibration()
|
||||||
{
|
{
|
||||||
writeReg(REG_OSC1, RF_OSC1_RCCAL_START);
|
writeReg(REG_OSC1, RF_OSC1_RCCAL_START);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue