Update RFM69.cpp

This commit is contained in:
ortegafernando 2020-06-02 15:56:38 +02:00 committed by GitHub
parent 4c9aa5ea33
commit aef898228b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -227,6 +227,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
@ -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
} // COURSE_TEMP_COEF puts reading in the ballpark, user can add additional correction
uint8_t RFM69::readPowerLevel() // get powerLevel
{
return _powerLevel;
}
void RFM69::rcCalibration()
{
writeReg(REG_OSC1, RF_OSC1_RCCAL_START);