mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-05-09 14:44:27 +02:00
first beta Syslog: adding rssi snr freq error
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include "syslog_utils.h"
|
||||
#include "gps_utils.h"
|
||||
|
||||
namespace SYSLOG_Utils {
|
||||
|
||||
void processPacket(String packet, int rssi, float snr, int freqError) {
|
||||
String syslogPacket;
|
||||
syslogPacket = packet.substring(3,packet.indexOf(">")) + " / TIME / ";
|
||||
syslogPacket += packet.substring(packet.indexOf(">")+1,packet.indexOf(",")) + " / ";
|
||||
if (packet.indexOf("WIDE1-1") > 10) {
|
||||
syslogPacket += "WIDE1-1 / ";
|
||||
} else {
|
||||
syslogPacket += " _ / ";
|
||||
}
|
||||
syslogPacket += String(rssi) + "dBm / " + String(snr) + "dB / " + String(freqError) + "Hz / ";
|
||||
// Callsign / Time / Destination / Path / RSSI / SNR / FreqError /gpsLat / gpsLon / Distance
|
||||
Serial.println(syslogPacket + GPS_Utils::getDistance(packet));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user