methods to read RSSI and SNR

This commit is contained in:
Pawel Spychalski (DzikuVx)
2017-10-07 12:10:15 +02:00
parent 13add24fc7
commit 5b5ca9fedf
2 changed files with 18 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
{
"board": "arduino:avr:pro",
"board": "bsfrance:avr:lora32u4",
"sketch": "crossbow.ino",
"port": "COM23",
"output": "./build",
"configuration": "cpu=16MHzatmega328"
"output": "./build"
}

View File

@@ -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();
}