Skip to content

Commit 680cff2

Browse files
committed
set advertising data in array brackets - fix for regression in 1v95, fix #404
1 parent b03f96a commit 680cff2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/ble_eddystone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ exports.get = function(url) {
3737
}
3838

3939
exports.advertise = function(url) {
40-
NRF.setAdvertising(exports.get(url), {interval:100});
40+
NRF.setAdvertising([exports.get(url)], {interval:100});
4141
};

modules/ble_ibeacon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require("ble_ibeacon").advertise({
1010

1111
exports.get = function(options) {
1212
if (!options.uuid || options.uuid.length != 16)
13-
throw "Invalid UUID: must be exactly 16 bytes"
13+
throw new Error("Invalid UUID: must be exactly 16 bytes");
1414
var d = [0x1a, // Length of manufacturer data
1515
0xff, // Param: Manufacturer data
1616
0x4c, 0x00, // Apple company id
@@ -29,5 +29,5 @@ exports.get = function(options) {
2929
};
3030

3131
exports.advertise = function(options) {
32-
NRF.setAdvertising(exports.get(options), {interval:100});
32+
NRF.setAdvertising([exports.get(options)], {interval:100});
3333
};

0 commit comments

Comments
 (0)