mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-05-15 04:52:16 -04:00
Fixed RSSI indication
This commit is contained in:
parent
03e655b3ff
commit
beb17d0922
5 changed files with 22 additions and 8 deletions
15
LoRa.cpp
15
LoRa.cpp
|
@ -212,9 +212,18 @@ uint8_t LoRaClass::modemStatus() {
|
|||
return readRegister(REG_MODEM_STAT);
|
||||
}
|
||||
|
||||
int LoRaClass::packetRssi()
|
||||
{
|
||||
return (readRegister(REG_PKT_RSSI_VALUE) - (_frequency < 868E6 ? 164 : 157));
|
||||
uint8_t LoRaClass::packetRssiRaw() {
|
||||
uint8_t pkt_rssi_value = readRegister(REG_PKT_RSSI_VALUE);
|
||||
return pkt_rssi_value;
|
||||
}
|
||||
|
||||
int LoRaClass::packetRssi() {
|
||||
int pkt_rssi = (int)readRegister(REG_PKT_RSSI_VALUE);
|
||||
// TODO: change this to look at the actual model code
|
||||
if (_frequency < 820E6) pkt_rssi -= 7;
|
||||
pkt_rssi -= 157;
|
||||
|
||||
return pkt_rssi;
|
||||
}
|
||||
|
||||
float LoRaClass::packetSnr()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue