forked from bitfocus/companion-module-novastar-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
actions.js
157 lines (144 loc) · 3.43 KB
/
actions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
exports.getActions = function() {
let actions = {};
//Brightness
// VX6s, VX4S, NovaProHD, MCTRL4k, NovaPro UHD, NovaPro UHD Jr , VX1000, VX 600, VX16S
if (this.config.modelID == 'vx4s' || this.config.modelID == 'vx6s' ||this.config.modelID == 'MCTRL4k' || this.config.modelID == 'novaProHD'|| this.config.modelID == 'novaProUHD' || this.config.modelID == 'novaProUHDJr' || this.config.modelID == 'vx1000'|| this.config.modelID == 'vx600'|| this.config.modelID == 'vx16s')
actions['change_brightness'] = {
label: 'Change Brightness',
options: [
{
type: 'dropdown',
label: 'Brightness',
id: 'brightness',
default: '0',
choices: this.model.brightness
}
]
};
//Change Input
// VX6s, VX4S, NovaProHD, MCTRL4k, VX1000, VX600
if (this.config.modelID == 'vx4s' || this.config.modelID == 'vx6s' ||this.config.modelID == 'MCTRL4k'||this.config.modelID == 'vx1000' || this.config.modelID == 'novaProHD'|| this.config.modelID == 'vx600')
actions['change_input'] = {
label: 'Change Input',
options: [
{
type: 'dropdown',
label: 'Input',
id: 'input',
default: '0',
choices: this.model.inputs
}
]
}
//Change Test patterns
// All models
actions['change_test_pattern'] = {
label: 'Change Test Patterns',
options: [
{
type: 'dropdown',
label: 'Test Patterns',
id: 'pattern',
default: '0',
choices: this.CHOICES_TESTPATTERNS
}
]
};
//Change Display mode
// all models
actions['change_display_mode'] = {
label: 'Change Display Mode',
options: [
{
type: 'dropdown',
label: 'Display Mode',
id: 'display_mode',
default: '0',
choices: this.model.displayModes
}
]
};
//Working mode
// VX6s & J6
if (this.config.modelID == 'vx6s' || this.config.modelID == 'j6') {
actions['change_working_mode'] = {
label: 'Change Working Mode',
options: [
{
type: 'dropdown',
label: 'Working Mode',
id: 'working_mode',
default: '0',
choices: this.model.workingModes
}
]
};
}
//PIP
// VX4S, NovaProHD
if (this.config.modelID == 'vx4s' || this.config.modelID == 'novaProHD') {
actions['pip_onoff'] = {
label: 'PIP On/Off',
options: [
{
type: 'dropdown',
label: 'On/Off',
id: 'value',
default: '0',
choices: this.model.piponoffs
}
]
};
}
//Scaling
// VX4S, NovaProHD
if (this.config.modelID == 'vx4s' || this.config.modelID == 'novaProHD') {
actions['change_scaling'] = {
label: 'Change Scaling',
options: [
{
type: 'dropdown',
label: 'Scale',
id: 'scale',
default: '0',
choices: this.CHOICES_SCALING
}
]
}
}
// LOAD PRESETS
//VX4S, NovaPro UHD Jr,vx1000
if (this.config.modelID == 'vx4s' || this.config.modelID == 'novaProUHDJr'|| this.config.modelID == 'vx1000'|| this.config.modelID == 'vx600'|| this.config.modelID == 'vx16s' || this.config.modelID == 'j6') {
actions['load_preset'] = {
label: 'Recall Preset',
options: [
{
type: 'dropdown',
label: 'Preset',
id: 'preset',
default: '0',
choices: this.model.presets
}
]
};
}
// VX6s
if (this.config.modelID == 'vx6s') {
actions['load_preset'] = {
label: 'Load Preset to Preview',
options: [
{
type: 'dropdown',
label: 'Preset',
id: 'preset',
default: '0',
choices: this.model.presets
}
]
};
actions['take'] = {
label: 'Take Preview to Program'
};
}
return actions
}