Data carrier detection
This commit is contained in:
10
LoRa.cpp
10
LoRa.cpp
@@ -1,5 +1,8 @@
|
||||
// Copyright (c) Sandeep Mistry. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
// Modifications and additions copyright 2018 by Mark Qvist
|
||||
// Obviously still under the MIT license.
|
||||
|
||||
#include <LoRa.h>
|
||||
|
||||
@@ -17,6 +20,7 @@
|
||||
#define REG_FIFO_RX_CURRENT_ADDR 0x10
|
||||
#define REG_IRQ_FLAGS 0x12
|
||||
#define REG_RX_NB_BYTES 0x13
|
||||
#define REG_MODEM_STAT 0x18
|
||||
#define REG_PKT_SNR_VALUE 0x19
|
||||
#define REG_PKT_RSSI_VALUE 0x1a
|
||||
#define REG_MODEM_CONFIG_1 0x1d
|
||||
@@ -204,6 +208,10 @@ int LoRaClass::parsePacket(int size)
|
||||
return packetLength;
|
||||
}
|
||||
|
||||
uint8_t LoRaClass::modemStatus() {
|
||||
return readRegister(REG_MODEM_STAT);
|
||||
}
|
||||
|
||||
int LoRaClass::packetRssi()
|
||||
{
|
||||
return (readRegister(REG_PKT_RSSI_VALUE) - (_frequency < 868E6 ? 164 : 157));
|
||||
|
||||
Reference in New Issue
Block a user