From 8c2d86339935e81d42bf86db7c9b36dde502543e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 7 Dec 2025 07:53:48 -0600 Subject: [PATCH] Another #endif snuck in there --- src/nimble/NimbleBluetooth.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 3c178f183..fdce774f5 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -678,9 +678,9 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks { LOG_INFO("BLE disconnect reason: %d", reason); #else - virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc) - { - LOG_INFO("BLE disconnect"); +virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc) +{ + LOG_INFO("BLE disconnect"); #endif #ifdef NIMBLE_TWO if (ble->isDeInit) @@ -718,14 +718,14 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks // Restart Advertising ble->startAdvertising(); #else - NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising(); - if (!pAdvertising->start(0)) { - if (pAdvertising->isAdvertising()) { - LOG_DEBUG("BLE advertising already running"); - } else { - LOG_ERROR("BLE failed to restart advertising"); - } + NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising(); + if (!pAdvertising->start(0)) { + if (pAdvertising->isAdvertising()) { + LOG_DEBUG("BLE advertising already running"); + } else { + LOG_ERROR("BLE failed to restart advertising"); } + } #endif } }; @@ -833,7 +833,6 @@ void NimbleBluetooth::setup() } else { LOG_WARN("Failed to prefer 2M PHY by default, rc=%d", phyResult); } -#endif int dataLenResult = ble_gap_write_sugg_def_data_len(kPreferredBleTxOctets, kPreferredBleTxTimeUs); if (dataLenResult == 0) {