-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpecialDeviceComponent.py
27 lines (21 loc) · 1.07 KB
/
SpecialDeviceComponent.py
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
# Embedded file name: /Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/Launchpad_Pro/SpecialDeviceComponent.py
# Compiled at: 2018-04-23 20:27:04
from __future__ import absolute_import, print_function, unicode_literals
from _Framework.DeviceComponent import DeviceComponent
from .consts import FADER_TYPE_STANDARD, DEVICE_MAP_CHANNEL
class SpecialDeviceComponent(DeviceComponent):
def set_parameter_controls(self, controls):
if controls:
for control in controls:
control.set_channel(DEVICE_MAP_CHANNEL)
control.set_light_and_type('Device.On', FADER_TYPE_STANDARD)
super(SpecialDeviceComponent, self).set_parameter_controls(controls)
def _update_parameter_controls(self):
if self._parameter_controls is not None:
for control in self._parameter_controls:
control.update()
return
def update(self):
super(SpecialDeviceComponent, self).update()
if self.is_enabled():
self._update_parameter_controls()