Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
krocheck committed Oct 5, 2020
1 parent 7c65f57 commit 07d3be1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
25 changes: 18 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,17 @@ class instance extends instance_skel {
this.sendNextCommand();
}
else if (line.match(/ACK/)) {
var echo = this.commandQueue.shift();
echo = echo.split('\n');
if (this.commandQueue.length > 0) {
var echo = this.commandQueue.shift();
echo = echo.split('\n');

if (echo.length > 1) {
var cmd = echo.shift().trim().split(/:/)[0];
this.processSmartviewInformation(cmd, echo);
}
if (echo.length > 1) {
var cmd = echo.shift().trim().split(/:/)[0];
this.processSmartviewInformation(cmd, echo);
}

this.sendNextCommand();
this.sendNextCommand();
}
}
else {
this.socket.emit('receiveline', line.toString());
Expand Down Expand Up @@ -551,32 +553,41 @@ class instance extends instance_skel {
case 'Brightness':
monitor.brightness = parseInt(value);
this.setVariable('mon_' + monitor.id + '_brightness', monitor.brightness);
this.checkFeedbacks('bright');
break;
case 'Contrast':
monitor.contrast = parseInt(value);
this.setVariable('mon_' + monitor.id + '_contrast', monitor.contrast);
this.checkFeedbacks('cont');
break;
case 'Saturation':
monitor.saturation = parseInt(value);
this.setVariable('mon_' + monitor.id + '_saturation', monitor.saturation);
this.checkFeedbacks('sat');
break;
case 'Border':
monitor.border = value;
this.checkFeedbacks('border');
break;
case 'ScopeMode':
monitor.scopeMode = value;
this.checkFeedbacks('scopeFunc');
break;
case 'AudioChannel':
monitor.audioChannel = value;
this.checkFeedbacks('audio');
break;
case 'LUT':
monitor.lut = value;
this.checkFeedbacks('lut');
break;
case 'MonitorInput':
monitor.monitorInput = value;
this.checkFeedbacks('input');
break;
case 'Identify':
monitor.identify = (value == 'true');
this.checkFeedbacks('ident');
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bmd-smartview",
"version": "1.1.0",
"version": "1.1.1",
"api_version": "1.0.0",
"keywords": [
"Scope",
Expand Down

0 comments on commit 07d3be1

Please sign in to comment.