diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-03-25 16:43:27 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-03-25 16:44:46 (GMT) |
| commit | 30c319831ab15e6abaf97e4fa8f58a8eaeb8ba4a (patch) | |
| tree | a3231e8a294d6214e6c549d0d9ca4d23b1eb523f /src/components/ble/NimbleController.cpp | |
| parent | 196b8325544174f571e6394259d11c56eaad8cb4 (diff) | |
sans airplane mode and related support code
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(); - } -} |
