This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfeedbacks.js
88 lines (88 loc) · 1.9 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
import { combineRgb } from '@companion-module/base'
import { Types } from 'aes70'
export async function updateF(self) {
self.setFeedbackDefinitions({
ChannelState: {
name: 'Muted Amp Channel Feedback',
type: 'boolean',
label: 'Channel State',
defaultStyle: {
bgcolor: combineRgb(255, 0, 0),
color: combineRgb(255, 255, 255),
},
options: [
{
id: 'feedmute',
type: 'dropdown',
label: 'Channel',
choices: [
{ id: 0, label: 'A' },
{ id: 1, label: 'B' },
{ id: 2, label: 'C' },
{ id: 3, label: 'D' },
],
default: 0,
},
],
callback: (feedback) => {
if (self.ready) {
return self.muteState[feedback.options.feedmute]
}
},
},
PowerState: {
name: 'Power Amp Feedback',
type: 'boolean',
label: 'Power Amp',
defaultStyle: {
bgcolor: combineRgb(0, 255, 0),
color: combineRgb(0, 0, 0),
},
options: [],
callback: (feedback) => {
if (self.ready) {
return self.powerState
}
},
},
LastAmpPreset: {
name: 'Last Amp Preset Recall',
type: 'boolean',
label: 'Last Preset',
defaultStyle: {
bgcolor: combineRgb(255, 128, 0),
color: combineRgb(255, 255, 255),
},
options: [
{
id: 'preset',
type: 'dropdown',
label: 'Amp Preset',
choices: [
{ id: 1, label: '1' },
{ id: 2, label: '2' },
{ id: 3, label: '3' },
{ id: 4, label: '4' },
{ id: 5, label: '5' },
{ id: 6, label: '6' },
{ id: 7, label: '7' },
{ id: 8, label: '8' },
{ id: 9, label: '9' },
{ id: 10, label: '10' },
{ id: 11, label: '11' },
{ id: 12, label: '12' },
{ id: 13, label: '13' },
{ id: 14, label: '14' },
{ id: 15, label: '15' },
],
default: 1,
},
],
callback: (feedback) => {
if (self.ready) {
return self.presetLast === feedback.options.preset
}
},
},
})
}