Skip to content

Commit 9ea6a32

Browse files
authored
Merge pull request #85 from istnv/bug/vx600
Typo in config for VX Pro
2 parents 3dd06f8 + 24f85da commit 9ea6a32

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

actions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export const getActions = function (instance) {
132132
instance.sendMessage(element.cmd)
133133
},
134134
}
135+
135136
actions['set_brightness'] = {
136137
name: 'Set Brightness',
137138
options: [

choices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ export const CONFIG_MODEL = {
436436
j6: { id: 'j6', label: 'J6', displayModes: CHOICES_DISPLAYMODE_VX1000, presets: CHOICES_PRESETS_J6, workingModes: CHOICES_WORKINGMODE_J6 },
437437

438438
vxPro: {
439-
id: 'vxpro', label: 'VX Pro', brightness: CHOICES_BRIGHTNESS_VX1000, displayModes: CHOICES_DISPLAYMODE_VX1000, inputs: CHOICES_INPUTS_VX1000, presets: CHOICES_PRESETS_VX1000,
439+
id: 'vxPro', label: 'VX Pro', brightness: CHOICES_BRIGHTNESS_VX1000, displayModes: CHOICES_DISPLAYMODE_VX1000, inputs: CHOICES_INPUTS_VX1000, presets: CHOICES_PRESETS_VX1000,
440440
pipOnOffs: CHOICES_PIP_ONOFF, layers: CHOICES_LAYERS_VX1000, cardNo: CHOICES_CARDNO_VX1000, layerPriority: CHOICES_LAYERPRIORITY_VX1000, connectorCode: CHOICES_CONNECTORCODE_VX1000
441441
},
442442
// vxPro: {

index.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,21 @@ class NovaStarInstance extends InstanceBase {
128128
}
129129

130130
async init(config) {
131+
if (config.modelID && nova_config.CONFIG_MODEL[config.modelID] == undefined) {
132+
config.modelID = undefined
133+
}
131134
this.config = config
132135

133-
if (this.config.modelID !== undefined) {
136+
if (this.config.modelID) {
134137
this.model = nova_config.CONFIG_MODEL[this.config.modelID]
135-
}
136138

137-
// this is not called by Companion directly, so we need to call this to load the actions into Companion
138-
this.init_variables()
139-
this.updateActions()
139+
// this is not called by Companion directly, so we need to call this to load the actions into Companion
140+
this.init_variables()
141+
this.updateActions()
140142

141-
// start up the TCP socket and attmept to get connected to the NovaStar device
142-
this.initTCP()
143+
// start up the TCP socket and attmept to get connected to the NovaStar device
144+
this.initTCP()
145+
}
143146
}
144147

145148
// calculates the checksum for dynamic commands
@@ -174,12 +177,10 @@ class NovaStarInstance extends InstanceBase {
174177
this.updateStatus(InstanceStatus.Disconnected, 'disconnected')
175178
}
176179

177-
if (this.config.port === undefined) {
178-
// use TCP port 5200 by default
179-
this.config.port = 5200
180-
}
180+
// use TCP port 5200 by default
181+
this.config.port = 5200
181182

182-
if (this.config.modelID == 'vxpro') {
183+
if (this.config.modelID == 'vxPro') {
183184
this.config.port = 15200
184185
}
185186

@@ -369,7 +370,7 @@ class NovaStarInstance extends InstanceBase {
369370
// and we need to re-connect the socket to the new address)
370371
let resetConnection = false
371372

372-
if (this.config.host != config.host) {
373+
if (this.config.host != config.host || this.config.modelID != config.modelID) {
373374
resetConnection = true
374375
}
375376

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "novastar-controller",
3-
"version": "2.6.1",
3+
"version": "2.6.2",
44
"main": "index.js",
55
"type": "module",
66
"scripts": {

0 commit comments

Comments
 (0)