Skip to content

Commit bb15130

Browse files
committed
Revise sentence for updating data field
1 parent 4014bed commit bb15130

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

index.bs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6356,7 +6356,11 @@ To <dfn>trigger a simulated characteristic event </dfn> given a [=navigable=] |n
63566356
1. Set |params|[`"serviceUuid"`] to |service|'s <a>UUID</a>.
63576357
1. Set |params|[`"characteristicUuid"`] to |characteristic|'s <a>UUID</a>.
63586358
1. Set |params|[`"type"`] to |type|.
6359-
1. If |type| is `write`, set |params|[`"data"`] to a [=new=] {{Uint8Array}} wrapping a [=new=] {{ArrayBuffer}} containing |bytes|.
6359+
1. If |type| is `write`, run the following steps:
6360+
1. Let |data| be an empty list.
6361+
1. For each |byte| in |bytes|:
6362+
1. Append |byte|'s [=byte/value=] to |data|.
6363+
1. Set |params|[`"data"`] to |data|.
63606364
1. Let |body| be a [=map=] matching the <code>bluetooth.CharacteristicEventGenerated</code> production, with the
63616365
<code>params</code> field set to |params|.
63626366
1. Let |relatedNavigables| be a [=/set=] containing |navigable|.
@@ -6401,7 +6405,11 @@ To <dfn>trigger a simulated descriptor event </dfn> given a [=navigable=] |navig
64016405
1. Set |params|[`"characteristicUuid"`] to |characteristic|'s <a>UUID</a>.
64026406
1. Set |params|[`"descriptorUuid"`] to |descriptor|'s <a>UUID</a>.
64036407
1. Set |params|[`"type"`] to |type|.
6404-
1. If |type| is `write`, set |params|[`"data"`] to a [=new=] {{Uint8Array}} wrapping a [=new=] {{ArrayBuffer}} containing |bytes|.
6408+
1. If |type| is `write`, run the following steps:
6409+
1. Let |data| be an empty list.
6410+
1. For each |byte| in |bytes|:
6411+
1. Append |byte|'s [=byte/value=] to |data|.
6412+
1. Set |params|[`"data"`] to |data|.
64056413
1. Let |body| be a [=map=] matching the <code>bluetooth.DescriptorEventGenerated</code> production, with the
64066414
<code>params</code> field set to |params|.
64076415
1. Let |relatedNavigables| be a [=/set=] containing |navigable|.

0 commit comments

Comments
 (0)