From 5dedaea4064fcad95eb5c35fa3a70589e778cf5a Mon Sep 17 00:00:00 2001 From: ortegafernando Date: Tue, 2 Jun 2020 08:14:53 +0200 Subject: [PATCH] Add readPowerLevel function --- RFM69.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RFM69.cpp b/RFM69.cpp index 937f090..64d4d73 100644 --- a/RFM69.cpp +++ b/RFM69.cpp @@ -844,6 +844,11 @@ 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); @@ -1120,4 +1125,4 @@ void RFM69::listenModeSendBurst( uint8_t targetNode, void* buffer, uint8_t size setMode(RF69_MODE_STANDBY); reinitRadio(); } -#endif \ No newline at end of file +#endif