Passed
Push — web-timed ( cfeda2...1d9e3e )
by Matt
01:11
created

tests.effects   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 32
dl 0
loc 52
rs 10
c 0
b 0
f 0
1
from time import sleep
2
3
from PyDMXControl import Colors
4
from PyDMXControl.controllers import uDMXController as Controller
5
from PyDMXControl.effects.Color import Chase
6
from PyDMXControl.effects.Intensity import Dim
7
from PyDMXControl.profiles.Eyourlife import Small_Flat_Par
8
from PyDMXControl.profiles.Stairville import LED_Par_10mm, LED_Par_36
9
10
dmx = Controller()
11
12
# Fixtures
13
dmx.add_fixture(LED_Par_10mm)
14
dmx.add_fixture(LED_Par_36)
15
dmx.add_fixture(LED_Par_36)
16
dmx.add_fixture(LED_Par_36)
17
dmx.add_fixture(LED_Par_36)
18
dmx.add_fixture(Small_Flat_Par)
19
dmx.add_fixture(Small_Flat_Par)
20
21
# Dim all up
22
dmx.all_locate()
23
24
# Test color chase
25
Chase.group_apply(dmx.get_all_fixtures(), 1000, colors=[Colors.Red, Colors.Yellow, Colors.Green, Colors.Blue])
26
27
# Wait then clear
28
sleep(15)
29
dmx.clear_all_effects()
30
dmx.all_locate()
31
sleep(5)
32
33
# Test color chase
34
Chase.group_apply(dmx.get_all_fixtures(), 5000, colors=[Colors.Blue, Colors.Cyan, Colors.White])
35
36
# Wait then clear
37
sleep(15)
38
dmx.clear_all_effects()
39
dmx.all_locate()
40
sleep(5)
41
42
# Test dim chase
43
dmx.all_off()
44
Dim.group_apply(dmx.get_fixtures_by_profile(LED_Par_36), 1000)
45
46
# Debug
47
dmx.debug_control()
48
49
# Done
50
dmx.sleep_till_enter()
51
dmx.close()
52