Skip to content

Commit 22db172

Browse files
committed
Add compile guards to new BT code.
Fix issue #498
1 parent a2b67bc commit 22db172

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Firmware/RTK_Surveyor/Bluetooth.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ void bluetoothStart()
234234
// https://github.com/espressif/arduino-esp32/issues/3386
235235
void pinBluetoothTask(void *pvParameters)
236236
{
237+
#ifdef COMPILE_BT
237238
if (bluetoothSerial->begin(deviceName) == false)
238239
{
239240
systemPrintln("An error occurred initializing Bluetooth");
@@ -245,6 +246,7 @@ void pinBluetoothTask(void *pvParameters)
245246
bluetoothPinned = true;
246247

247248
vTaskDelete(nullptr); // Delete task once it has run once
249+
#endif // COMPILE_BT
248250
}
249251

250252
// This function stops BT so that it can be restarted later

0 commit comments

Comments
 (0)