From 8bf755c15c04d1e9785c6cb7e066a8550f3dd858 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 31 Dec 2016 07:25:27 -0800 Subject: [PATCH] fixing eddystone uid encoding --- libs/bluetooth/bluetooth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/bluetooth/bluetooth.ts b/libs/bluetooth/bluetooth.ts index 0652ea7a..eaf89d52 100644 --- a/libs/bluetooth/bluetooth.ts +++ b/libs/bluetooth/bluetooth.ts @@ -59,8 +59,8 @@ namespace bluetooth { //% help=bluetooth/advertise-uid blockExternalInputs=1 export function advertiseUid(ns: number, instance: number, power: number, connectable: boolean) { const buf = pins.createBuffer(16); - buf.fill(ns, 6, 4); - buf.fill(instance, 12, 4); + buf.setNumber(NumberFormat.Int32BE, 6, ns); + buf.setNumber(NumberFormat.Int32BE, 12, instance); bluetooth.advertiseUidBuffer(buf, power, connectable); } }