@@ -723,13 +723,10 @@ BLEStack BLEDevice::getBLEStack() {
723723
724724String BLEDevice::getBLEStackString () {
725725 switch (getBLEStack ()) {
726- case BLEStack::BLUEDROID:
727- return " Bluedroid" ;
728- case BLEStack::NIMBLE:
729- return " NimBLE" ;
726+ case BLEStack::BLUEDROID: return " Bluedroid" ;
727+ case BLEStack::NIMBLE: return " NimBLE" ;
730728 case BLEStack::UNKNOWN:
731- default :
732- return " Unknown" ;
729+ default : return " Unknown" ;
733730 }
734731}
735732
@@ -829,7 +826,7 @@ void BLEDevice::gapEventHandler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_par
829826 case ESP_GAP_BLE_OOB_REQ_EVT: /* OOB request event */ log_i (" ESP_GAP_BLE_OOB_REQ_EVT" ); break ;
830827 case ESP_GAP_BLE_LOCAL_IR_EVT: /* BLE local IR event */ log_i (" ESP_GAP_BLE_LOCAL_IR_EVT" ); break ;
831828 case ESP_GAP_BLE_LOCAL_ER_EVT: /* BLE local ER event */ log_i (" ESP_GAP_BLE_LOCAL_ER_EVT" ); break ;
832- case ESP_GAP_BLE_NC_REQ_EVT: /* NUMERIC CONFIRMATION */
829+ case ESP_GAP_BLE_NC_REQ_EVT: /* NUMERIC CONFIRMATION */
833830 {
834831 log_i (" ESP_GAP_BLE_NC_REQ_EVT" );
835832#ifdef CONFIG_BLE_SMP_ENABLE // Check that BLE SMP (security) is configured in make menuconfig
@@ -840,8 +837,7 @@ void BLEDevice::gapEventHandler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_par
840837 esp_ble_confirm_reply (param->ble_security .ble_req .bd_addr , false );
841838 }
842839#endif // CONFIG_BLE_SMP_ENABLE
843- }
844- break ;
840+ } break ;
845841 case ESP_GAP_BLE_PASSKEY_REQ_EVT: /* passkey request event */
846842 {
847843 log_i (" ESP_GAP_BLE_PASSKEY_REQ_EVT: " );
@@ -867,8 +863,7 @@ void BLEDevice::gapEventHandler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_par
867863
868864 esp_ble_passkey_reply (param->ble_security .ble_req .bd_addr , true , passkey);
869865#endif // CONFIG_BLE_SMP_ENABLE
870- }
871- break ;
866+ } break ;
872867 /*
873868 * TODO should we add white/black list comparison?
874869 */
@@ -885,8 +880,7 @@ void BLEDevice::gapEventHandler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_par
885880 esp_ble_gap_security_rsp (param->ble_security .ble_req .bd_addr , true );
886881 }
887882#endif // CONFIG_BLE_SMP_ENABLE
888- }
889- break ;
883+ } break ;
890884 /*
891885 *
892886 */
@@ -897,7 +891,7 @@ void BLEDevice::gapEventHandler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_par
897891#ifdef CONFIG_BLE_SMP_ENABLE // Check that BLE SMP (security) is configured in make menuconfig
898892 uint32_t passkey = param->ble_security .key_notif .passkey ;
899893
900- if (!BLESecurity::m_passkeySet) {
894+ if (!BLESecurity::m_passkeySet) {
901895 log_w (" No passkey set" );
902896 }
903897
@@ -912,17 +906,15 @@ void BLEDevice::gapEventHandler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_par
912906 BLEDevice::m_securityCallbacks->onPassKeyNotify (passkey);
913907 }
914908#endif // CONFIG_BLE_SMP_ENABLE
915- }
916- break ;
909+ } break ;
917910 case ESP_GAP_BLE_KEY_EVT:
918911 {
919912 // shows the ble key type info share with peer device to the user.
920913 log_d (" ESP_GAP_BLE_KEY_EVT" );
921914#ifdef CONFIG_BLE_SMP_ENABLE // Check that BLE SMP (security) is configured in make menuconfig
922915 log_i (" key type = %s" , BLESecurity::esp_key_type_to_str (param->ble_security .ble_key .key_type ));
923916#endif // CONFIG_BLE_SMP_ENABLE
924- }
925- break ;
917+ } break ;
926918 case ESP_GAP_BLE_AUTH_CMPL_EVT:
927919 {
928920 log_i (" ESP_GAP_BLE_AUTH_CMPL_EVT" );
@@ -931,8 +923,7 @@ void BLEDevice::gapEventHandler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_par
931923 BLEDevice::m_securityCallbacks->onAuthenticationComplete (param->ble_security .auth_cmpl );
932924 }
933925#endif // CONFIG_BLE_SMP_ENABLE
934- }
935- break ;
926+ } break ;
936927 default :
937928 {
938929 break ;
@@ -964,8 +955,6 @@ void BLEDevice::setCustomGattsHandler(gatts_event_handler handler) {
964955 m_customGattsHandler = handler;
965956}
966957
967-
968-
969958#endif
970959
971960/* **************************************************************************
0 commit comments