Skip to content

Commit 429d2b5

Browse files
committed
code wrap for book
1 parent 5db7ef8 commit 429d2b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

phonegap/www/js/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ var app = {
5757
deviceList.appendChild(listItem);
5858

5959
var deviceListLength = deviceList.getElementsByTagName('li').length;
60-
app.setStatus("Found " + deviceListLength + " device" + (deviceListLength === 1 ? "." : "s."));
60+
app.setStatus("Found " + deviceListLength +
61+
" device" + (deviceListLength === 1 ? "." : "s."));
6162
},
6263
onScanComplete: function() {
6364
var deviceListLength = deviceList.getElementsByTagName('li').length;
@@ -88,7 +89,8 @@ var app = {
8889
brightness.value = data[0];
8990
});
9091

91-
ble.startNotification(peripheral.id, LED_SERVICE, POWER_SWITCH, function(buffer) {
92+
ble.startNotification(peripheral.id, LED_SERVICE, POWER_SWITCH,
93+
function(buffer) {
9294
var data = new Uint8Array(buffer);
9395
powerSwitch.checked = data[0] !== 0;
9496
});

0 commit comments

Comments
 (0)