@@ -261,6 +261,11 @@ void bluetoothProcessCommand(char *rxData)
261
261
PrintEndpoint originalPrintEndpoint = printEndpoint;
262
262
263
263
printEndpoint = PRINT_ENDPOINT_BLUETOOTH_COMMAND;
264
+ if (settings.debugCLI == true )
265
+ printEndpoint = PRINT_ENDPOINT_ALL;
266
+ else
267
+ printEndpoint = PRINT_ENDPOINT_BLUETOOTH_COMMAND;
268
+
264
269
processCommand (rxData); // Send command proccesor output to BLE
265
270
printEndpoint = originalPrintEndpoint;
266
271
@@ -384,9 +389,9 @@ void bluetoothFlush()
384
389
bluetoothSerialBle->flush ();
385
390
else if (settings.bluetoothRadioType == BLUETOOTH_RADIO_SPP_ACCESSORY_MODE)
386
391
bluetoothSerialSpp->flush (); // Needed? Not sure... TODO
387
- #else // COMPILE_BT
392
+ #else // COMPILE_BT
388
393
return ;
389
- #endif // COMPILE_BT
394
+ #endif // COMPILE_BT
390
395
}
391
396
392
397
// Get MAC, start radio
@@ -510,15 +515,16 @@ void bluetoothStart()
510
515
{
511
516
// Support Apple Accessory
512
517
513
- bluetoothSerialSpp->enableSSP (false , false ); // Enable secure pairing, authenticate without displaying anything
518
+ bluetoothSerialSpp->enableSSP (false ,
519
+ false ); // Enable secure pairing, authenticate without displaying anything
514
520
515
521
beginSuccess &= bluetoothSerialSpp->begin (
516
522
deviceName, true , true , settings.sppRxQueueSize , settings.sppTxQueueSize , 0 , 0 ,
517
523
0 ); // localName, isMaster, disableBLE, rxBufferSize, txBufferSize, serviceID, rxID, txID
518
524
519
525
if (beginSuccess)
520
526
{
521
- // bluetoothSerialSpp.getBtAddress(btMACAddress); // Read the ESP32 BT MAC Address
527
+ // bluetoothSerialSpp.getBtAddress(btMACAddress); // Read the ESP32 BT MAC Address
522
528
523
529
esp_sdp_init ();
524
530
@@ -598,7 +604,7 @@ void bluetoothStart()
598
604
599
605
if (pin_bluetoothStatusLED != PIN_UNDEFINED)
600
606
{
601
- bluetoothLedTask.detach (); // Reset BT LED blinker task rate to 2Hz
607
+ bluetoothLedTask.detach (); // Reset BT LED blinker task rate to 2Hz
602
608
bluetoothLedTask.attach (bluetoothLedTaskPace2Hz, tickerBluetoothLedUpdate); // Rate in seconds, callback
603
609
}
604
610
@@ -608,11 +614,11 @@ void bluetoothStart()
608
614
{
609
615
if (bluetoothCommandTaskHandle == nullptr )
610
616
xTaskCreatePinnedToCore (
611
- bluetoothCommandTask, // Function to run
612
- " BluetoothCommandTask" , // Just for humans
613
- 4000 , // Stack Size - must be ~4000
614
- nullptr , // Task input parameter
615
- 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
617
+ bluetoothCommandTask, // Function to run
618
+ " BluetoothCommandTask" , // Just for humans
619
+ 4000 , // Stack Size - must be ~4000
620
+ nullptr , // Task input parameter
621
+ 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
616
622
&bluetoothCommandTaskHandle, // Task handle
617
623
settings.bluetoothInterruptsCore ); // Core where task should run, 0 = core, 1 = Arduino
618
624
}
0 commit comments