diff --git a/data/is-cfg.json b/data/is-cfg.json index 47d6f65..63becf5 100644 --- a/data/is-cfg.json +++ b/data/is-cfg.json @@ -76,7 +76,7 @@ "topic": "LoraAPRS/Data" }, "syslog": { - "active": true, + "active": false, "server": "syslog.lora-aprs.info", "port": 514 }, diff --git a/platformio.ini b/platformio.ini index 7c1aa1c..75d41b9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -6,7 +6,7 @@ platform = espressif32 @ 3.1.1 framework = arduino lib_ldf_mode = deep+ monitor_speed = 115200 -monitor_flags = --raw +monitor_raw = yes lib_deps = bblanchon/ArduinoJson @ 6.17.0 lewisxhe/AXP202X_Library @ 1.1.2 diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index da05b99..1665a6d 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -48,6 +49,8 @@ RouterTask routerTask(fromModem, toModem, toAprsIs, toMQTT); BeaconTask beaconTask(toModem, toAprsIs); void setup() { + esp_task_wdt_init(10, true); + esp_task_wdt_add(NULL); Serial.begin(115200); LoRaSystem.getLogger().setSerial(&Serial); setWiFiLogger(&LoRaSystem.getLogger()); @@ -137,6 +140,7 @@ void setup() { } } + esp_task_wdt_reset(); LoRaSystem.getTaskManager().setup(LoRaSystem); LoRaSystem.getDisplay().showSpashScreen("LoRa APRS iGate", VERSION); @@ -166,6 +170,7 @@ void setup() { volatile bool syslogSet = false; void loop() { + esp_task_wdt_reset(); LoRaSystem.getTaskManager().loop(LoRaSystem); if (LoRaSystem.isWifiOrEthConnected() && LoRaSystem.getUserConfig()->syslog.active && !syslogSet) { LoRaSystem.getLogger().setSyslogServer(LoRaSystem.getUserConfig()->syslog.server, LoRaSystem.getUserConfig()->syslog.port, LoRaSystem.getUserConfig()->callsign); diff --git a/src/TaskOTA.cpp b/src/TaskOTA.cpp index 08f90fa..8be9330 100644 --- a/src/TaskOTA.cpp +++ b/src/TaskOTA.cpp @@ -1,3 +1,4 @@ +#include #include #include "Task.h" @@ -37,6 +38,9 @@ bool OTATask::setup(System &system) { error_str = "End Failed"; } system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "Error[%d]: %s", error, error_str.c_str()); + }) + .onProgress([&](unsigned int received, unsigned int total_size) { + esp_task_wdt_reset(); }); if (system.getUserConfig()->network.hostname.overwrite) { _ota.setHostname(system.getUserConfig()->network.hostname.name.c_str()); diff --git a/src/TaskRadiolib.cpp b/src/TaskRadiolib.cpp index 295753a..f71dbb7 100644 --- a/src/TaskRadiolib.cpp +++ b/src/TaskRadiolib.cpp @@ -134,7 +134,7 @@ bool RadiolibTask::loop(System &system) { system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "[%s] readData failed, code %d", timeString().c_str(), state); } else { if (str.substring(0, 3) != "<\xff\x01") { - system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, getName(), "[%s] Unknown packet '%s' with RSSI %.0fdBm, SNR %.2fdB and FreqErr %fHz%s", timeString().c_str(), str.c_str(), radio->getRSSI(), radio->getSNR(), -radio->getFrequencyError()); + system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, getName(), "[%s] Unknown packet '%s' with RSSI %.0fdBm, SNR %.2fdB and FreqErr %fHz", timeString().c_str(), str.c_str(), radio->getRSSI(), radio->getSNR(), -radio->getFrequencyError()); } else { std::shared_ptr msg = std::shared_ptr(new APRSMessage()); msg->decode(str.substring(3));