diff --git a/src/modules/RF69/RF69.cpp b/src/modules/RF69/RF69.cpp index db39ff70..25818a4f 100644 --- a/src/modules/RF69/RF69.cpp +++ b/src/modules/RF69/RF69.cpp @@ -872,11 +872,11 @@ float RF69::getRSSI() { return(-1.0 * (_mod->SPIgetRegValue(RADIOLIB_RF69_REG_RSSI_VALUE)/2.0)); } -int16_t RF69::setRSSIThreshold(float value) { - if (value < 127.5 || value > 0) +int16_t RF69::setRSSIThreshold(float dbm) { + if (dbm < 127.5 || dbm > 0) return RADIOLIB_ERR_INVALID_RSSI_THRESHOLD; - return _mod->SPIsetRegValue(RADIOLIB_RF69_REG_RSSI_THRESH, (uint8_t)(-2.0 * value), 7, 0); + return _mod->SPIsetRegValue(RADIOLIB_RF69_REG_RSSI_THRESH, (uint8_t)(-2.0 * dbm), 7, 0); } void RF69::setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn) { diff --git a/src/modules/RF69/RF69.h b/src/modules/RF69/RF69.h index cb81cc4e..e1d3acf7 100644 --- a/src/modules/RF69/RF69.h +++ b/src/modules/RF69/RF69.h @@ -964,11 +964,11 @@ class RF69: public PhysicalLayer { /*! \brief Sets the RSSI value above which the RSSI interrupt is signaled - \param value A value between -127.5 and 0 inclusive + \param dbm A dBm value between -127.5 and 0 inclusive \returns \ref status_codes */ - int16_t setRSSIThreshold(float value); + int16_t setRSSIThreshold(float dbm); /*! \brief Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. diff --git a/src/modules/SX127x/SX127x.cpp b/src/modules/SX127x/SX127x.cpp index 2b2be9c2..1adf22b8 100644 --- a/src/modules/SX127x/SX127x.cpp +++ b/src/modules/SX127x/SX127x.cpp @@ -1184,11 +1184,11 @@ int16_t SX127x::setCrcFiltering(bool crcOn) { } } -int16_t SX127x::setRSSIThreshold(float value) { - if (value < 127.5 || value > 0) +int16_t SX127x::setRSSIThreshold(float dbm) { + if (dbm < 127.5 || dbm > 0) return RADIOLIB_ERR_INVALID_RSSI_THRESHOLD; - return _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_RSSI_THRESH, (uint8_t)(-2.0 * value), 7, 0); + return _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_RSSI_THRESH, (uint8_t)(-2.0 * dbm), 7, 0); } int16_t SX127x::setRSSIConfig(uint8_t smoothingSamples, int8_t offset) { diff --git a/src/modules/SX127x/SX127x.h b/src/modules/SX127x/SX127x.h index b322df57..87be55e6 100644 --- a/src/modules/SX127x/SX127x.h +++ b/src/modules/SX127x/SX127x.h @@ -1230,11 +1230,11 @@ class SX127x: public PhysicalLayer { /*! \brief Sets the RSSI value above which the RSSI interrupt is signaled - \param value A value between -127.5 and 0 inclusive + \param dbm A dBm value between -127.5 and 0 inclusive \returns \ref status_codes */ - int16_t setRSSIThreshold(float value); + int16_t setRSSIThreshold(float dbm); #if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL) protected: