kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
update routing to APRS-IS
rodzic
34f794aac2
commit
ccfc0ceb12
|
@ -35,17 +35,20 @@ bool RouterTask::setup(System &system) {
|
||||||
bool RouterTask::loop(System &system) {
|
bool RouterTask::loop(System &system) {
|
||||||
// do routing
|
// do routing
|
||||||
if (!_fromModem.empty()) {
|
if (!_fromModem.empty()) {
|
||||||
std::shared_ptr<APRSMessage> msg = _fromModem.getElement();
|
std::shared_ptr<APRSMessage> modemMsg = _fromModem.getElement();
|
||||||
String path = msg->getPath();
|
|
||||||
|
|
||||||
if (!(path.indexOf("RFONLY") != -1 || path.indexOf("NOGATE") != -1 || path.indexOf("TCPIP") != -1)) {
|
if (system.getUserConfig()->aprs_is.active && modemMsg->getSource() != system.getUserConfig()->callsign) {
|
||||||
if (!path.isEmpty()) {
|
std::shared_ptr<APRSMessage> msg = std::make_shared<APRSMessage>(*modemMsg);
|
||||||
path += ",";
|
String path = msg->getPath();
|
||||||
}
|
|
||||||
msg->setPath(path + "qAR," + system.getUserConfig()->callsign);
|
|
||||||
|
|
||||||
if (system.getUserConfig()->aprs_is.active)
|
if (!(path.indexOf("RFONLY") != -1 || path.indexOf("NOGATE") != -1 || path.indexOf("TCPIP") != -1)) {
|
||||||
|
if (!path.isEmpty()) {
|
||||||
|
path += ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
msg->setPath(path + "qAR," + system.getUserConfig()->callsign);
|
||||||
_toAprsIs.addElement(msg);
|
_toAprsIs.addElement(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue