[SX126x] Added missing PHY getRSSI (#1132)

pull/1144/head
jgromes 2024-06-25 16:56:26 +01:00
rodzic e406c550b8
commit ce8e6fdfb0
2 zmienionych plików z 13 dodań i 2 usunięć

Wyświetl plik

@ -1327,6 +1327,10 @@ float SX126x::getDataRate() const {
return(this->dataRateMeasured); return(this->dataRateMeasured);
} }
float SX126x::getRSSI() {
return(this->getRSSI(true));
}
float SX126x::getRSSI(bool packet) { float SX126x::getRSSI(bool packet) {
if(packet) { if(packet) {
// get last packet RSSI from packet status // get last packet RSSI from packet status

Wyświetl plik

@ -917,11 +917,18 @@ class SX126x: public PhysicalLayer {
float getDataRate() const; float getDataRate() const;
/*! /*!
\brief GetsRSSI (Recorded Signal Strength Indicator). \brief Gets recorded signal strength indicator.
Overload with packet mode enabled for PhysicalLayer compatibility.
\returns RSSI value in dBm.
*/
float getRSSI() override;
/*!
\brief Gets RSSI (Recorded Signal Strength Indicator).
\param packet Whether to read last packet RSSI, or the current value. \param packet Whether to read last packet RSSI, or the current value.
\returns RSSI value in dBm. \returns RSSI value in dBm.
*/ */
float getRSSI(bool packet = true); float getRSSI(bool packet);
/*! /*!
\brief Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem. \brief Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem.