[SX127x] Fixed RSSI offset not shifted (#538)
This commit is contained in:
parent
0fab561713
commit
ba67ce2720
1 changed files with 1 additions and 1 deletions
|
@ -1075,7 +1075,7 @@ int16_t SX127x::setRSSIConfig(uint8_t smoothingSamples, int8_t offset) {
|
||||||
RADIOLIB_CHECK_RANGE(offset, -16, 15, RADIOLIB_ERR_INVALID_RSSI_OFFSET);
|
RADIOLIB_CHECK_RANGE(offset, -16, 15, RADIOLIB_ERR_INVALID_RSSI_OFFSET);
|
||||||
|
|
||||||
// set new register values
|
// set new register values
|
||||||
state = _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_RSSI_CONFIG, offset, 7, 3);
|
state = _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_RSSI_CONFIG, offset << 3, 7, 3);
|
||||||
state |= _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_RSSI_CONFIG, smoothingSamples, 2, 0);
|
state |= _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_RSSI_CONFIG, smoothingSamples, 2, 0);
|
||||||
return(state);
|
return(state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue