[SX127x] Fixed getRSSI overload for PhysicalLayer (#1064)
This commit is contained in:
parent
d77823375a
commit
c11ac4703b
4 changed files with 24 additions and 2 deletions
|
@ -419,6 +419,10 @@ int16_t SX1272::setDataShapingOOK(uint8_t sh) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
float SX1272::getRSSI() {
|
||||
return(SX1272::getRSSI(true, false));
|
||||
}
|
||||
|
||||
float SX1272::getRSSI(bool packet, bool skipReceive) {
|
||||
return(SX127x::getRSSI(packet, skipReceive, -139));
|
||||
}
|
||||
|
|
|
@ -231,13 +231,20 @@ class SX1272: public SX127x {
|
|||
*/
|
||||
int16_t setDataShapingOOK(uint8_t sh);
|
||||
|
||||
/*!
|
||||
\brief Gets recorded signal strength indicator.
|
||||
Overload with packet mode enabled for PhysicalLayer compatibility.
|
||||
\returns RSSI value in dBm.
|
||||
*/
|
||||
float getRSSI();
|
||||
|
||||
/*!
|
||||
\brief Gets recorded signal strength indicator.
|
||||
\param packet Whether to read last packet RSSI, or the current value. LoRa mode only, ignored for FSK.
|
||||
\param skipReceive Set to true to skip putting radio in receive mode for the RSSI measurement in FSK/OOK mode.
|
||||
\returns RSSI value in dBm.
|
||||
*/
|
||||
float getRSSI(bool packet = true, bool skipReceive = false);
|
||||
float getRSSI(bool packet, bool skipReceive = false);
|
||||
|
||||
/*!
|
||||
\brief Enables/disables CRC check of received packets.
|
||||
|
|
|
@ -448,6 +448,10 @@ int16_t SX1278::setDataShapingOOK(uint8_t sh) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
float SX1278::getRSSI() {
|
||||
return(SX1278::getRSSI(true, false));
|
||||
}
|
||||
|
||||
float SX1278::getRSSI(bool packet, bool skipReceive) {
|
||||
int16_t offset = -157;
|
||||
if(frequency < 868.0) {
|
||||
|
|
|
@ -243,13 +243,20 @@ class SX1278: public SX127x {
|
|||
*/
|
||||
int16_t setDataShapingOOK(uint8_t sh);
|
||||
|
||||
/*!
|
||||
\brief Gets recorded signal strength indicator.
|
||||
Overload with packet mode enabled for PhysicalLayer compatibility.
|
||||
\returns RSSI value in dBm.
|
||||
*/
|
||||
float getRSSI();
|
||||
|
||||
/*!
|
||||
\brief Gets recorded signal strength indicator.
|
||||
\param packet Whether to read last packet RSSI, or the current value. LoRa mode only, ignored for FSK.
|
||||
\param skipReceive Set to true to skip putting radio in receive mode for the RSSI measurement in FSK/OOK mode.
|
||||
\returns RSSI value in dBm.
|
||||
*/
|
||||
float getRSSI(bool packet = true, bool skipReceive = false);
|
||||
float getRSSI(bool packet, bool skipReceive = false);
|
||||
|
||||
/*!
|
||||
\brief Enables/disables CRC check of received packets.
|
||||
|
|
Loading…
Add table
Reference in a new issue