We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1784cfa commit afb35afCopy full SHA for afb35af
adafruit_rfm9x.py
@@ -497,6 +497,16 @@ def rssi(self):
497
raw_rssi -= 164
498
return raw_rssi
499
500
+ @property
501
+ def snr(self):
502
+ """The SNR (in dB) of the last received message."""
503
+ # Read SNR 0x19 register and convert to value using formula in datasheet.
504
+ # SNR(dB) = PacketSnr [twos complement] / 4
505
+ snr_byte = self._read_u8(_RH_RF95_REG_19_PKT_SNR_VALUE)
506
+ if snr_byte > 127:
507
+ snr_byte = (256-snr_byte) * -1
508
+ return snr_byte/4
509
+
510
@property
511
def signal_bandwidth(self):
512
"""The signal bandwidth used by the radio (try setting to a higher
0 commit comments