From 974c28dfae9286f9ad5771c355102020b7b12d3a Mon Sep 17 00:00:00 2001 From: Francois Beaufort Date: Thu, 18 Feb 2016 11:46:51 +0100 Subject: [PATCH] web-bluetooth: fix value format in notification --- web-bluetooth/notifications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-bluetooth/notifications.js b/web-bluetooth/notifications.js index f7c5b1342e..8c68fdce73 100644 --- a/web-bluetooth/notifications.js +++ b/web-bluetooth/notifications.js @@ -49,7 +49,7 @@ function handleNotifications(event) { // In the "real" world, you'd use data.getUint8, data.getUint16 or even // TextDecoder to process raw data bytes. for (var i = 0; i < value.byteLength; i++) { - a.push(('00' + value.getUint8(i).toString(16)).slice(-2)); + a.push('0x' + ('00' + value.getUint8(i).toString(16)).slice(-2)); } - log('> ' + a.join('')); + log('> ' + a.join(' ')); }