kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
commit
e9fbba6caf
|
@ -76,7 +76,7 @@
|
|||
"topic": "LoraAPRS/Data"
|
||||
},
|
||||
"syslog": {
|
||||
"active": true,
|
||||
"active": false,
|
||||
"server": "syslog.lora-aprs.info",
|
||||
"port": 514
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <BoardFinder.h>
|
||||
#include <System.h>
|
||||
#include <TaskManager.h>
|
||||
#include <esp_task_wdt.h>
|
||||
#include <logger.h>
|
||||
#include <power_management.h>
|
||||
|
||||
|
@ -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);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <esp_task_wdt.h>
|
||||
#include <logger.h>
|
||||
|
||||
#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());
|
||||
|
|
|
@ -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<APRSMessage> msg = std::shared_ptr<APRSMessage>(new APRSMessage());
|
||||
msg->decode(str.substring(3));
|
||||
|
|
Ładowanie…
Reference in New Issue