Skip to content

Commit

Permalink
ble test and update
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Feb 16, 2025
1 parent 6ccbd8c commit f06f576
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/LoRa_APRS_Tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/ble_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit f06f576

Please sign in to comment.