diff --git a/nRF51GattServer.cpp b/nRF51GattServer.cpp index f9fe2ed..53f0972 100644 --- a/nRF51GattServer.cpp +++ b/nRF51GattServer.cpp @@ -271,12 +271,10 @@ void nRF51GattServer::hwCallback(ble_evt_t *p_ble_evt) /* 1.) Handle CCCD changes */ handle_value = gattsEventP->params.write.handle; - for (uint8_t i = 0; igetProperties() & (GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_INDICATE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY)) && (nrfCharacteristicHandles[i].cccd_handle == handle_value)) { - uint16_t cccd_value = - (gattsEventP->params.write.data[1] << 8) | - gattsEventP->params.write.data[0]; /* Little Endian but M0 may be mis-aligned */ + uint16_t cccd_value = (gattsEventP->params.write.data[1] << 8) | gattsEventP->params.write.data[0]; /* Little Endian but M0 may be mis-aligned */ if (((p_characteristics[i]->getProperties() & GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_INDICATE) && (cccd_value & BLE_GATT_HVX_INDICATION)) || ((p_characteristics[i]->getProperties() & GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY) && (cccd_value & BLE_GATT_HVX_NOTIFICATION))) {