initial cleanup on the lowest level of serial layer, "system_error" bug is still unknown
parent
2cbd911653
commit
46b3151e37
10
js/serial.js
10
js/serial.js
|
@ -136,8 +136,8 @@ var serial = {
|
|||
|
||||
var sending = function () {
|
||||
// store inside separate variables in case array gets destroyed
|
||||
var data = self.output_buffer[0].data;
|
||||
var callback = self.output_buffer[0].callback;
|
||||
var data = self.output_buffer[0].data,
|
||||
callback = self.output_buffer[0].callback;
|
||||
|
||||
chrome.serial.send(self.connectionId, data, function (sendInfo) {
|
||||
callback(sendInfo);
|
||||
|
@ -165,8 +165,7 @@ var serial = {
|
|||
listeners: [],
|
||||
|
||||
addListener: function (function_reference) {
|
||||
var listener = chrome.serial.onReceive.addListener(function_reference);
|
||||
|
||||
chrome.serial.onReceive.addListener(function_reference);
|
||||
this.listeners.push(function_reference);
|
||||
},
|
||||
removeListener: function (function_reference) {
|
||||
|
@ -184,8 +183,7 @@ var serial = {
|
|||
listeners: [],
|
||||
|
||||
addListener: function (function_reference) {
|
||||
var listener = chrome.serial.onReceiveError.addListener(function_reference);
|
||||
|
||||
chrome.serial.onReceiveError.addListener(function_reference);
|
||||
this.listeners.push(function_reference);
|
||||
},
|
||||
removeListener: function (function_reference) {
|
||||
|
|
Loading…
Reference in New Issue