-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedbacks.js
89 lines (88 loc) · 1.96 KB
/
feedbacks.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
import { combineRgb } from '@companion-module/base'
export function getFeedbackDefinitions(self) {
return {
selected: {
type: 'boolean',
name: 'Specified input is selected-input',
description: 'Show feedback selected input',
options: [
{
type: 'dropdown',
label: 'Input',
id: 'input',
default: '1',
choices: self.CHOICES_INPUTS,
},
],
defaultStyle: {
color: combineRgb(0, 0, 0),
bgcolor: combineRgb(255, 0, 0),
},
callback: (feedback) => {
return self.selectedInput == feedback.options.input
},
},
output: {
type: 'boolean',
name: 'Selected-input is routed to output',
description: 'Show feedback selected output',
options: [
{
type: 'dropdown',
label: 'Output',
id: 'output',
default: '1',
choices: self.CHOICES_OUTPUTS,
},
],
defaultStyle: {
color: combineRgb(0, 0, 0),
bgcolor: combineRgb(0, 255, 0),
},
callback: (feedback) => {
return self.outputRoute[feedback.options.output] == self.selectedInput
},
},
input_output: {
type: 'boolean',
name: 'Specified input is routed to output',
description: 'Show feedback selected output',
options: [
{
type: 'dropdown',
label: 'Input',
id: 'input',
default: '1',
choices: self.CHOICES_INPUTS,
},
{
type: 'dropdown',
label: 'Output',
id: 'output',
default: '1',
choices: self.CHOICES_OUTPUTS,
},
],
defaultStyle: {
color: combineRgb(0, 0, 0),
bgcolor: combineRgb(0, 255, 0),
},
callback: (feedback) => {
return self.outputRoute[feedback.options.output] == feedback.options.input
},
},
locked: {
type: 'boolean',
name: 'Keys are locked',
description: 'The keys on the front of the switch are disabled',
options: [],
defaultStyle: {
color: combineRgb(0, 0, 0),
bgcolor: combineRgb(255, 0, 0),
},
callback: (feedback) => {
return self.keylock == 1
}
},
}
}