first beta Syslog: adding rssi snr freq error

This commit is contained in:
richonguzman
2023-06-11 23:21:52 -04:00
parent 9a76249fe5
commit 3858d39e8a
10 changed files with 126 additions and 2 deletions
+20
View File
@@ -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));
}
}