From 09e06d36e8e47922b34b0d27767fdb9a9f1179a5 Mon Sep 17 00:00:00 2001 From: "Ricardo Guzman (Richonguzman)" Date: Tue, 24 Feb 2026 06:50:27 -0300 Subject: [PATCH] checkCallsignList update --- src/lora_utils.cpp | 18 +++++++++--------- src/station_utils.cpp | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/lora_utils.cpp b/src/lora_utils.cpp index 0e41669..5394944 100644 --- a/src/lora_utils.cpp +++ b/src/lora_utils.cpp @@ -1,17 +1,17 @@ /* Copyright (C) 2025 Ricardo Guzman - CA2RXU - * + * * This file is part of LoRa APRS iGate. - * + * * LoRa APRS iGate is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * LoRa APRS iGate is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with LoRa APRS iGate. If not, see . */ @@ -43,7 +43,7 @@ bool transmitFlag = true; #ifdef HAS_SX1268 #if defined(LIGHTGATEWAY_1_0) || defined(LIGHTGATEWAY_PLUS_1_0) SPIClass loraSPI(FSPI); - SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN, loraSPI); + SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN, loraSPI); #else SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN); #endif @@ -100,11 +100,11 @@ namespace LoRa_Utils { while (true); } #endif*/ - + radio.setSpreadingFactor(Config.loramodule.rxSpreadingFactor); radio.setCodingRate(Config.loramodule.rxCodingRate4); float signalBandwidth = Config.loramodule.rxSignalBandwidth / 1000; - radio.setBandwidth(signalBandwidth); + radio.setBandwidth(signalBandwidth); radio.setCRC(true); #if (defined(RADIO_RXEN) && defined(RADIO_TXEN)) // QRP Labs LightGateway has 400M22S (SX1268) @@ -174,7 +174,7 @@ namespace LoRa_Utils { changeFreqTx(); } } - + #ifdef INTERNAL_LED_PIN if (Config.digi.ecoMode != 1) digitalWrite(INTERNAL_LED_PIN, HIGH); // disabled in Ultra Eco Mode #endif diff --git a/src/station_utils.cpp b/src/station_utils.cpp index 3d8892c..bcd4ea0 100644 --- a/src/station_utils.cpp +++ b/src/station_utils.cpp @@ -83,8 +83,9 @@ namespace STATION_Utils { for (size_t i = 0; i < list.size(); i++) { int wildcardIndex = list[i].indexOf("*"); if (wildcardIndex >= 0) { - String wildcard = list[i].substring(0, wildcardIndex); - if (callsign.startsWith(wildcard)) return true; + if (wildcardIndex >= 2 && callsign.length() >= wildcardIndex && strncmp(callsign.c_str(), list[i].c_str(), wildcardIndex) == 0) { + return true; + } } else { if (list[i] == callsign) return true; }