Skip to content

Commit 60909b7

Browse files
committed
adicionado método para pegar o valor bruto do snr do pacote
1 parent 4e8a465 commit 60909b7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/LoRa.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ int LoRaClass::packetRssi() {
293293
: RSSI_OFFSET_HF_PORT));
294294
}
295295

296+
int LoRaClass::rawPacketSnr() {
297+
return ((int8_t)readRegister(REG_PKT_SNR_VALUE));
298+
}
299+
296300
float LoRaClass::packetSnr() {
297301
return ((int8_t)readRegister(REG_PKT_SNR_VALUE)) * 0.25;
298302
}

src/LoRa.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class LoRaClass : public Stream {
4545

4646
int parsePacket(int size = 0);
4747
int packetRssi();
48+
int rawPacketSnr();
4849
float packetSnr();
4950
long packetFrequencyError();
5051

0 commit comments

Comments
 (0)