Merge branch 'master' into develop

This commit is contained in:
hathach committed 2019-02-13 22:25:26 +07:00
commit 333f151ff5
6 files changed
+123 -18

No files matched your search

@@ -478,10 +478,9 @@ void BLEClientCharacteristic::_eventHandler(ble_evt_t* evt)
uint16_t const max_payload = conn->getMtu() - 3;
uint16_t packet_len = min16(_adamsg.remaining, max_payload-2);
// still has data, continue to prepare
if ( packet_len )
{
// Long Write Prepare
// still has data, continue to prepare Long Write sequence
ble_gattc_write_params_t param =
{
.write_op = BLE_GATT_OP_PREP_WRITE_REQ,
@@ -499,7 +498,7 @@ void BLEClientCharacteristic::_eventHandler(ble_evt_t* evt)
}
}else
{
// Long Write Execute
// All data is prepared, execute Long Write
ble_gattc_write_params_t param =
{
.write_op = BLE_GATT_OP_EXEC_WRITE_REQ,