diff --git a/RFM69.cpp b/RFM69.cpp index 64d4d73..8d47b71 100644 --- a/RFM69.cpp +++ b/RFM69.cpp @@ -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);