Introduce setRSSIThreshold on SX127x modules
This commit is contained in:
parent
fd3b165bf0
commit
9a76aa1c84
2 changed files with 16 additions and 0 deletions
|
@ -1184,6 +1184,13 @@ int16_t SX127x::setCrcFiltering(bool crcOn) {
|
|||
}
|
||||
}
|
||||
|
||||
int16_t SX127x::setRSSIThreshold(float value) {
|
||||
if (value < 127.5 || value > 0)
|
||||
return RADIOLIB_ERR_INVALID_RSSI_THRESHOLD;
|
||||
|
||||
return _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_RSSI_THRESH, (uint8_t)(-2.0 * value), 7, 0);
|
||||
}
|
||||
|
||||
int16_t SX127x::setRSSIConfig(uint8_t smoothingSamples, int8_t offset) {
|
||||
// check active modem
|
||||
if(getActiveModem() != RADIOLIB_SX127X_FSK_OOK) {
|
||||
|
|
|
@ -1227,6 +1227,15 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
int16_t setDIOPreambleDetect(bool usePreambleDetect);
|
||||
|
||||
/*!
|
||||
\brief Sets the RSSI value above which the RSSI interrupt is signaled
|
||||
|
||||
\param value A value between -127.5 and 0 inclusive
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setRSSIThreshold(float value);
|
||||
|
||||
#if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
|
||||
protected:
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue