From f06f576844437bae6b331de67ce5ee7d85289e43 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Sun, 16 Feb 2025 12:42:46 -0300 Subject: [PATCH] ble test and update --- src/LoRa_APRS_Tracker.cpp | 4 ++-- src/ble_utils.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index 9a9ef65..410d8e0 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -57,7 +57,7 @@ TinyGPSPlus gps; BluetoothSerial SerialBT; #endif -String versionDate = "2025.02.14"; +String versionDate = "2025.02.16"; uint8_t myBeaconsIndex = 0; int myBeaconsSize = Config.beacons.size(); @@ -203,7 +203,7 @@ void loop() { MSG_Utils::processOutputBuffer(); MSG_Utils::clean15SegBuffer(); - if (bluetoothActive) { + if (bluetoothActive && bluetoothConnected) { if (Config.bluetooth.useBLE) { BLE_Utils::sendToPhone(packet.text.substring(3)); BLE_Utils::sendToLoRa(); diff --git a/src/ble_utils.cpp b/src/ble_utils.cpp index ee167f4..601ff10 100644 --- a/src/ble_utils.cpp +++ b/src/ble_utils.cpp @@ -164,11 +164,11 @@ namespace BLE_Utils { } else { // TNC2 for (int n = 0; n < frame.length(); n++) txBLE(frame[n]); txBLE('\n'); - } + } } void sendToPhone(const String& packet) { - if (!packet.isEmpty() && bluetoothConnected) { + if (!packet.isEmpty()) { logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "BLE Rx", "%s", packet.c_str()); String receivedPacketString = ""; for (int i = 0; i < packet.length(); i++) receivedPacketString += packet[i];