diff --git a/cores/nRF5/utility/SoftwareTimer.h b/cores/nRF5/utility/SoftwareTimer.h index 5d535526..0651ab06 100644 --- a/cores/nRF5/utility/SoftwareTimer.h +++ b/cores/nRF5/utility/SoftwareTimer.h @@ -44,7 +44,8 @@ class SoftwareTimer TimerHandle_t _handle; public: - SoftwareTimer() { _handle = NULL; } + SoftwareTimer() { _handle = NULL; } + virtual ~SoftwareTimer() { if(_handle != NULL) xTimerDelete(_handle, 0); } void begin(uint32_t ms, TimerCallbackFunction_t callback) { diff --git a/libraries/Bluefruit52Lib/src/BLECentral.cpp b/libraries/Bluefruit52Lib/src/BLECentral.cpp index b71a86d5..2f25c65c 100644 --- a/libraries/Bluefruit52Lib/src/BLECentral.cpp +++ b/libraries/Bluefruit52Lib/src/BLECentral.cpp @@ -165,7 +165,7 @@ void BLECentral::_event_handler(ble_evt_t* evt) case BLE_GAP_EVT_DISCONNECTED: if ( Bluefruit.Gap.getRole(evt_conn_hdl) == BLE_GAP_ROLE_CENTRAL) { - // Invoke callback + // Invoke callback reason is BLE_HCI_STATUS code if ( _disconnect_cb) ada_callback(NULL, _disconnect_cb, evt_conn_hdl, evt->evt.gap_evt.params.disconnected.reason); } break;