-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathactions.js
32 lines (32 loc) · 889 Bytes
/
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
module.exports = function (self) {
self.setActionDefinitions({
reset_peaks: {
name: 'Reset peak levels',
options: [],
callback: async (_event) => {
self.log('info', 'Resetting peak levels');
self.levels.a_fast_peak= -999;
self.levels.a_slow_peak= -999;
self.levels.b_fast_peak= -999;
self.levels.b_slow_peak= -999;
self.levels.z_fast_peak= -999;
self.levels.z_slow_peak= -999;
self.setVariableValues(self.levels);
},
},
reset_minimums: {
name: 'Reset minimum levels',
options: [],
callback: async (_event) => {
self.log('info', 'Resetting minimum levels');
self.levels.a_fast_minimum= 0;
self.levels.a_slow_minimum= 0;
self.levels.b_fast_minimum= 0;
self.levels.b_slow_minimum= 0;
self.levels.z_fast_minimum= 0;
self.levels.z_slow_minimum= 0;
self.setVariableValues(self.levels);
},
},
})
}