testing syslog

This commit is contained in:
richonguzman
2024-04-09 12:51:51 -04:00
parent 0b22d27b40
commit 16f5338953
2 changed files with 10 additions and 9 deletions
+5 -4
View File
@@ -182,13 +182,14 @@ void loop() {
Utils::checkDisplayInterval();
Utils::checkBeaconInterval();
String packet;
APRS_IS_Utils::checkStatus(); // Need that to update display, maybe split this and send APRSIS status to display func?
String packet = "";
if (Config.loramodule.rxActive) {
packet = LoRa_Utils::receivePacket(); // We need to fetch LoRa packet above APRSIS and Digi
}
APRS_IS_Utils::checkStatus(); // Need that to update display, maybe split this and send APRSIS status to display func?
}
if (packet != "") {
if (Config.aprs_is.active) { // If APRSIS enabled
+5 -5
View File
@@ -97,9 +97,9 @@ namespace LoRa_Utils {
changeFreqTx();
}
#ifdef HAS_INTERNAL_LED
#ifdef HAS_INTERNAL_LED
digitalWrite(internalLedPin, HIGH);
#endif
#endif
int state = radio.transmit("\x3c\xff\x01" + newPacket);
transmissionFlag = true;
if (state == RADIOLIB_ERR_NONE) {
@@ -116,9 +116,9 @@ namespace LoRa_Utils {
Utils::print(F("failed, code "));
Utils::println(String(state));
}
#ifdef HAS_INTERNAL_LED
#ifdef HAS_INTERNAL_LED
digitalWrite(internalLedPin, LOW);
#endif
#endif
if (Config.loramodule.txFreq != Config.loramodule.rxFreq) {
changeFreqRx();
}
@@ -169,7 +169,7 @@ namespace LoRa_Utils {
freqError = radio.getFrequencyError();
Utils::println("<--- LoRa Packet Rx : " + loraPacket);
Utils::println("(RSSI:" + String(rssi) + " / SNR:" + String(snr) + " / FreqErr:" + String(freqError) + ")");
if (Config.syslog.active && WiFi.status() == WL_CONNECTED && loraPacket != "") {
if (Config.syslog.active && WiFi.status() == WL_CONNECTED) {
SYSLOG_Utils::log("Rx", loraPacket, rssi, snr, freqError);
}
return loraPacket;