more update

This commit is contained in:
richonguzman 2024-10-30 18:28:00 -03:00
parent c661527d07
commit e8dd7243d7
1 changed files with 10 additions and 0 deletions

View File

@ -131,6 +131,16 @@ namespace BLE_Utils {
void sendToLoRa() {
if (!shouldSendBLEtoLoRa) return;
if (!Config.acceptOwnFrameFromTNC && BLEToLoRaPacket.indexOf("::") == -1) {
String sender = BLEToLoRaPacket.substring(0, BLEToLoRaPacket.indexOf(">"));
if (sender == currentBeacon->callsign) {
BLEToLoRaPacket = "";
shouldSendBLEtoLoRa = false;
return;
}
}
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "BLE Tx", "%s", BLEToLoRaPacket.c_str());
displayShow("BLE Tx >>", "", BLEToLoRaPacket, 1000);
LoRa_Utils::sendNewPacket(BLEToLoRaPacket);