kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
send messages which are coming from aprs is
rodzic
d3a4035c6c
commit
1bda129947
|
@ -45,7 +45,7 @@ OTATask otaTask;
|
|||
NTPTask ntpTask;
|
||||
FTPTask ftpTask;
|
||||
MQTTTask mqttTask(toMQTT);
|
||||
AprsIsTask aprsIsTask(toAprsIs);
|
||||
AprsIsTask aprsIsTask(toAprsIs, toModem);
|
||||
RouterTask routerTask(fromModem, toModem, toAprsIs, toMQTT);
|
||||
BeaconTask beaconTask(toModem, toAprsIs);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "TaskAprsIs.h"
|
||||
#include "project_configuration.h"
|
||||
|
||||
AprsIsTask::AprsIsTask(TaskQueue<std::shared_ptr<APRSMessage>> &toAprsIs) : Task(TASK_APRS_IS, TaskAprsIs), _toAprsIs(toAprsIs) {
|
||||
AprsIsTask::AprsIsTask(TaskQueue<std::shared_ptr<APRSMessage>> &toAprsIs, TaskQueue<std::shared_ptr<APRSMessage>> &toModem) : Task(TASK_APRS_IS, TaskAprsIs), _toAprsIs(toAprsIs), _toModem(toModem) {
|
||||
}
|
||||
|
||||
AprsIsTask::~AprsIsTask() {
|
||||
|
@ -30,7 +30,10 @@ bool AprsIsTask::loop(System &system) {
|
|||
return false;
|
||||
}
|
||||
|
||||
_aprs_is.getAPRSMessage();
|
||||
std::shared_ptr<APRSMessage> msg = _aprs_is.getAPRSMessage();
|
||||
if (msg) {
|
||||
_toModem.addElement(msg);
|
||||
}
|
||||
|
||||
if (!_toAprsIs.empty()) {
|
||||
std::shared_ptr<APRSMessage> msg = _toAprsIs.getElement();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
class AprsIsTask : public Task {
|
||||
public:
|
||||
explicit AprsIsTask(TaskQueue<std::shared_ptr<APRSMessage>> &toAprsIs);
|
||||
explicit AprsIsTask(TaskQueue<std::shared_ptr<APRSMessage>> &toAprsIs, TaskQueue<std::shared_ptr<APRSMessage>> &toModem);
|
||||
virtual ~AprsIsTask();
|
||||
|
||||
virtual bool setup(System &system) override;
|
||||
|
@ -18,6 +18,7 @@ private:
|
|||
APRS_IS _aprs_is;
|
||||
|
||||
TaskQueue<std::shared_ptr<APRSMessage>> &_toAprsIs;
|
||||
TaskQueue<std::shared_ptr<APRSMessage>> &_toModem;
|
||||
|
||||
bool connect(System &system);
|
||||
};
|
||||
|
|
|
@ -164,6 +164,7 @@ bool RadiolibTask::loop(System &system) {
|
|||
} else {
|
||||
if (!txEnable) {
|
||||
// system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, getName(), "[%s] TX is not enabled", timeString().c_str());
|
||||
_toModem.getElement(); // empty list, otherwise memory will get full.
|
||||
} else {
|
||||
if (transmitFlag) {
|
||||
// system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, getName(), "[%s] TX signal detected. Waiting TX", timeString().c_str());
|
||||
|
|
Ładowanie…
Reference in New Issue