initial cleanup on the lowest level of serial layer, "system_error" bug is still unknown

10.3.x-maintenance
cTn 2014-09-09 13:55:58 +02:00
parent 2cbd911653
commit 46b3151e37
1 changed files with 21 additions and 23 deletions

View File

@ -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) {