@@ -261,6 +261,11 @@ void bluetoothProcessCommand(char *rxData)
261261 PrintEndpoint originalPrintEndpoint = printEndpoint;
262262
263263 printEndpoint = PRINT_ENDPOINT_BLUETOOTH_COMMAND;
264+ if (settings.debugCLI == true )
265+ printEndpoint = PRINT_ENDPOINT_ALL;
266+ else
267+ printEndpoint = PRINT_ENDPOINT_BLUETOOTH_COMMAND;
268+
264269 processCommand (rxData); // Send command proccesor output to BLE
265270 printEndpoint = originalPrintEndpoint;
266271
@@ -384,9 +389,9 @@ void bluetoothFlush()
384389 bluetoothSerialBle->flush ();
385390 else if (settings.bluetoothRadioType == BLUETOOTH_RADIO_SPP_ACCESSORY_MODE)
386391 bluetoothSerialSpp->flush (); // Needed? Not sure... TODO
387- #else // COMPILE_BT
392+ #else // COMPILE_BT
388393 return ;
389- #endif // COMPILE_BT
394+ #endif // COMPILE_BT
390395}
391396
392397// Get MAC, start radio
@@ -510,15 +515,16 @@ void bluetoothStart()
510515 {
511516 // Support Apple Accessory
512517
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
514520
515521 beginSuccess &= bluetoothSerialSpp->begin (
516522 deviceName, true , true , settings.sppRxQueueSize , settings.sppTxQueueSize , 0 , 0 ,
517523 0 ); // localName, isMaster, disableBLE, rxBufferSize, txBufferSize, serviceID, rxID, txID
518524
519525 if (beginSuccess)
520526 {
521- // bluetoothSerialSpp.getBtAddress(btMACAddress); // Read the ESP32 BT MAC Address
527+ // bluetoothSerialSpp.getBtAddress(btMACAddress); // Read the ESP32 BT MAC Address
522528
523529 esp_sdp_init ();
524530
@@ -598,7 +604,7 @@ void bluetoothStart()
598604
599605 if (pin_bluetoothStatusLED != PIN_UNDEFINED)
600606 {
601- bluetoothLedTask.detach (); // Reset BT LED blinker task rate to 2Hz
607+ bluetoothLedTask.detach (); // Reset BT LED blinker task rate to 2Hz
602608 bluetoothLedTask.attach (bluetoothLedTaskPace2Hz, tickerBluetoothLedUpdate); // Rate in seconds, callback
603609 }
604610
@@ -608,11 +614,11 @@ void bluetoothStart()
608614 {
609615 if (bluetoothCommandTaskHandle == nullptr )
610616 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
616622 &bluetoothCommandTaskHandle, // Task handle
617623 settings.bluetoothInterruptsCore ); // Core where task should run, 0 = core, 1 = Arduino
618624 }
0 commit comments