Skip to content

Commit cba1a2b

Browse files
committed
fix address setting
1 parent c58f218 commit cba1a2b

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

LORA.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
}
5252
sending = false;
5353
});
54-
startQueue(board);
5554
}
5655

5756
LORA.prototype = proto = Object.create(Module.prototype, {
@@ -85,7 +84,7 @@
8584
if (arguments.length == 1) {
8685
self._callbackRecvAckOK = ackOK;
8786
}
88-
var cmd = [0xF0, 0x04, 0x22, 0x04, 0x04 /*Address*/ , 0xF7];
87+
var cmd = [0xF0, 0x04, 0x22, 0x04, this._address /*Address*/ , 0xF7];
8988
this._board.send(cmd);
9089
}
9190

@@ -97,22 +96,5 @@
9796
return data;
9897
}
9998

100-
function startQueue(board) {
101-
setInterval(function () {
102-
if (sending || sendArray.length == 0) {
103-
return;
104-
}
105-
sending = true;
106-
var sendObj = sendArray.shift();
107-
sendAck = sendObj.ack;
108-
if (sendAck > 0) {
109-
board.send(sendObj.obj);
110-
} else {
111-
sending = false;
112-
sendCallback();
113-
}
114-
}, 0);
115-
}
116-
11799
scope.module.LORA = LORA;
118100
}));

0 commit comments

Comments
 (0)