For with fix for disconnection notifications
Fork of nRF51822 by
Diff: btle/btle.cpp
- Revision:
- 61:057be2a0cd38
- Parent:
- 56:a1071b629aa3
diff -r e861f2041469 -r 057be2a0cd38 btle/btle.cpp --- a/btle/btle.cpp Tue Sep 02 17:01:18 2014 +0100 +++ b/btle/btle.cpp Wed Sep 03 17:19:53 2014 +0000 @@ -139,6 +139,10 @@ if (p_ble_evt->evt.gap_evt.params.disconnected.reason == BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION) { nRF51Gap::getInstance().processDisconnectionEvent(handle, Gap::LOCAL_HOST_TERMINATED_CONNECTION); + } else if (p_ble_evt->evt.gap_evt.params.disconnected.reason == BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION) { + nRF51Gap::getInstance().processDisconnectionEvent(handle, Gap::REMOTE_USER_TERMINATED_CONNECTION); + } else { + nRF51Gap::getInstance().processDisconnectionEvent(handle, Gap::CONN_INTERVAL_UNACCEPTABLE); } break; }