kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
avoid global vars
rodzic
da1be0cc6e
commit
0880428184
|
@ -33,11 +33,10 @@ bool RouterTask::loop(System &system) {
|
|||
// do routing
|
||||
if (!_fromModem.empty()) {
|
||||
std::shared_ptr<APRSMessage> modemMsg = _fromModem.getElement();
|
||||
String path;
|
||||
|
||||
if (system.getUserConfig()->aprs_is.active && modemMsg->getSource() != system.getUserConfig()->callsign) {
|
||||
std::shared_ptr<APRSMessage> aprsIsMsg = std::make_shared<APRSMessage>(*modemMsg);
|
||||
path = aprsIsMsg->getPath();
|
||||
String path = aprsIsMsg->getPath();
|
||||
|
||||
if (!(path.indexOf("RFONLY") != -1 || path.indexOf("NOGATE") != -1 || path.indexOf("TCPIP") != -1)) {
|
||||
if (!path.isEmpty()) {
|
||||
|
@ -62,7 +61,7 @@ bool RouterTask::loop(System &system) {
|
|||
|
||||
if (system.getUserConfig()->digi.active && modemMsg->getSource() != system.getUserConfig()->callsign) {
|
||||
std::shared_ptr<APRSMessage> digiMsg = std::make_shared<APRSMessage>(*modemMsg);
|
||||
path = digiMsg->getPath();
|
||||
String path = digiMsg->getPath();
|
||||
|
||||
// simple loop check
|
||||
if (path.indexOf("WIDE1-1") >= 0 || path.indexOf(system.getUserConfig()->callsign) == -1) {
|
||||
|
|
Ładowanie…
Reference in New Issue