methods to read RSSI and SNR
This commit is contained in:
5
.vscode/arduino.json
vendored
5
.vscode/arduino.json
vendored
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"board": "arduino:avr:pro",
|
||||
"board": "bsfrance:avr:lora32u4",
|
||||
"sketch": "crossbow.ino",
|
||||
"port": "COM23",
|
||||
"output": "./build",
|
||||
"configuration": "cpu=16MHzatmega328"
|
||||
"output": "./build"
|
||||
}
|
||||
16
crossbow.ino
16
crossbow.ino
@@ -226,6 +226,14 @@ void computeCrc(uint8_t dataByte) {
|
||||
*/
|
||||
#ifdef LORA_HARDWARE_SERIAL
|
||||
|
||||
int getRadioRssi(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getRadioSnr(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void radioPacketStart(void) {
|
||||
|
||||
}
|
||||
@@ -248,6 +256,14 @@ void writeToRadio(uint8_t dataByte) {
|
||||
|
||||
#ifdef LORA_HARDWARE_SPI
|
||||
|
||||
int getRadioRssi(void) {
|
||||
return LoRa.packetRssi();
|
||||
}
|
||||
|
||||
int getRadioSnr(void) {
|
||||
return LoRa.packetSnr();
|
||||
}
|
||||
|
||||
void radioPacketStart(void) {
|
||||
LoRa.beginPacket();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user