diff options
Diffstat (limited to 'src/components/ble/NimbleController.cpp')
| -rw-r--r-- | src/components/ble/NimbleController.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp index 79880e9..a1597e2 100644 --- a/src/components/ble/NimbleController.cpp +++ b/src/components/ble/NimbleController.cpp @@ -163,7 +163,7 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) { case BLE_GAP_EVENT_ADV_COMPLETE: NRF_LOG_INFO("Advertising event : BLE_GAP_EVENT_ADV_COMPLETE"); NRF_LOG_INFO("reason=%d; status=%0X", event->adv_complete.reason, event->connect.status); - if (bleController.IsRadioEnabled() && !bleController.IsConnected()) { + if (!bleController.IsConnected()) { StartAdvertising(); } break; @@ -332,20 +332,4 @@ void NimbleController::NotifyBatteryLevel(uint8_t level) { } } -void NimbleController::EnableRadio() { - bleController.EnableRadio(); - bleController.Disconnect(); - fastAdvCount = 0; - StartAdvertising(); -} - -void NimbleController::DisableRadio() { - bleController.DisableRadio(); - if (bleController.IsConnected()) { - ble_gap_terminate(connectionHandle, BLE_ERR_REM_USER_CONN_TERM); - bleController.Disconnect(); - } else { - ble_gap_adv_stop(); - } -} |
