-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
modem.parseResponse = function(response) {
var plain = response.slice(response.indexOf(':')+1).trim();
var parts = plain.split(/,(?=(?:[^"]|"[^"]*")*$)/);
for(i in parts)
parts[i] = parts[i].replace(/\"/g, '');
return parts;
}
modem.parseResponse = function(response) {
var plain = response.slice(response.indexOf(':')+1).trim();
var parts = plain.split(/,(?=(?:[^"]|"[^"]*")*$)/);
for(var i=0;i<parts.length;i++)
parts[i] = parts[i].replace(/\"/g, '');
return parts;
}
modem.close = function(device) {
this.port.removeAllListeners();
this.port.close();
this.port = null;
this.isOpened = false;
this.emit('close');
}
modem.close = function(device) {
for(var k in timeouts) clearTimeout(timeouts[k])
this.port.removeAllListeners();
try{this.port.close()}catch(e){};
this.port = null;
this.isOpened = false;
this.emit('close');
}
if(this.queue[0] && this.queue[0]['command'].trim().slice(0, data.length) === data) {
this.queue[0]['command'] = this.queue[0]['command'].slice(data.length); <= Why you do that ?
return ;
}
Please.. any update ?
Metadata
Metadata
Assignees
Labels
No labels