mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2026-01-04 15:50:28 +01:00
adjust header and some status variables
This commit is contained in:
parent
b5623a5870
commit
6ec0ea292e
|
|
@ -13,7 +13,6 @@
|
|||
#include "TaskEth.h"
|
||||
#include "TaskFTP.h"
|
||||
#include "TaskMQTT.h"
|
||||
//#include "TaskModem.h"
|
||||
#include "TaskNTP.h"
|
||||
#include "TaskOTA.h"
|
||||
#include "TaskRadiolib.h"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
#include <Task.h>
|
||||
#include <TimeLib.h>
|
||||
#include <logger.h>
|
||||
|
||||
#include <RadioLib.h>
|
||||
#include <TimeLib.h>
|
||||
|
||||
#include "Task.h"
|
||||
#include "TaskAprsIs.h"
|
||||
#include "TaskRadiolib.h"
|
||||
|
||||
RadiolibTask::RadiolibTask(TaskQueue<std::shared_ptr<APRSMessage>> &fromModem, TaskQueue<std::shared_ptr<APRSMessage>> &toModem) : Task(TASK_RADIOLIB, TaskRadiolib), _fromModem(fromModem), _toModem(toModem) {
|
||||
|
|
@ -80,13 +77,15 @@ bool RadiolibTask::setup(System &system) {
|
|||
rxEnable = false;
|
||||
txEnable = false;
|
||||
}
|
||||
_stateInfo = "LoRa-Modem failed";
|
||||
_state = Error;
|
||||
}
|
||||
|
||||
state = radio->setCRC(true);
|
||||
if (state != RADIOLIB_ERR_NONE) {
|
||||
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "[%s] setCRC failed, code %d", timeString().c_str(), state);
|
||||
while (true)
|
||||
;
|
||||
_stateInfo = "LoRa-Modem failed";
|
||||
_state = Error;
|
||||
}
|
||||
|
||||
radio->setDio0Action(setFlag);
|
||||
|
|
@ -95,12 +94,15 @@ bool RadiolibTask::setup(System &system) {
|
|||
int state = startRX(RADIOLIB_SX127X_RXCONTINUOUS);
|
||||
if (state != RADIOLIB_ERR_NONE) {
|
||||
system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, getName(), "[%s] startRX failed, code %d", timeString().c_str(), state);
|
||||
rxEnable = false;
|
||||
rxEnable = false;
|
||||
_stateInfo = "LoRa-Modem failed";
|
||||
_state = Error;
|
||||
}
|
||||
}
|
||||
|
||||
preambleDurationMilliSec = ((uint64_t)(preambleLength + 4) << (config.spreadingFactor + 10 /* to milli-sec */)) / config.signalBandwidth;
|
||||
|
||||
_stateInfo = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
#define TASK_LORA_H_
|
||||
|
||||
#include "project_configuration.h"
|
||||
#include <APRS-Decoder.h>
|
||||
#include <BoardFinder.h>
|
||||
#include <LoRa_APRS.h>
|
||||
#include <RadioLib.h>
|
||||
#include <TaskManager.h>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue