Skip to content

Commit

Permalink
update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
daniep01 committed Apr 30, 2021
1 parent 7927d85 commit d96b31e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function instance(system) {

instance.prototype.deviceInformation = function(key,data) {
var self = this;
var changed = false;
var oldHasData = self.has_data = true;

self.log('debug','device information process key: ' + key)

if (key == 'STREAM STATE') {
debug('Stream state: ', data);

self.log('debug','data = ' + data);

if (data['Status'] !== undefined) {
self.streaming = data['Status'];
Expand Down Expand Up @@ -121,22 +121,22 @@ instance.prototype.init_tcp = function() {
self.log('debug',line.toString())
}

receivebuffer = receivebuffer.substr(offset);
receivebuffer = receivebuffer.substr(offset)
});

self.socket.on('receiveline', function (line) {

if (self.command === null && line.match(/:/) ) {
self.command = line;
self.log('debug','command:' + line)
self.log('debug','command: ' + line)
}
else if (self.command !== null && line.length > 0) {
self.stash.push(line.trim());
}
else if (line.length === 0 && self.command !== null) {
var cmd = self.command.trim().split(/:/)[0];

self.log('debug','COMMAND:', cmd);
self.log('debug','COMMAND: ' + cmd);

var obj = {};
self.stash.forEach(function (val) {
Expand Down

0 comments on commit d96b31e

Please sign in to comment.