File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 12
12
ROUTING_NONE = '00'
13
13
14
14
15
+ # light on
16
+ #\0538007964 (GA 100)
17
+
18
+ # light off
19
+ #\0538000164 (GA 100)
20
+
21
+ # set to level
22
+ #\053800rr64FF (GA 100, to level 100%/0xff)
23
+
15
24
def duration_to_ramp_rate (seconds ):
16
25
if seconds == 0 :
17
26
return '02'
@@ -33,7 +42,19 @@ def duration_to_ramp_rate(seconds):
33
42
return '42'
34
43
elif seconds <= 120 :
35
44
return '4A'
36
- elif seconds
45
+ elif seconds <= 180 :
46
+ return '52'
47
+ elif seconds <= 300 :
48
+ return '5A'
49
+ elif seconds <= 420 :
50
+ return '62'
51
+ elif seconds <= 600 :
52
+ return '6A'
53
+ elif seconds <= 900 :
54
+ return '72'
55
+ elif seconds <= 1020 :
56
+ return '7A'
57
+ raise OutOfRangeException , 'That duration is too long'
37
58
38
59
39
60
class CBusPCISerial (object ):
You can’t perform that action at this time.
0 commit comments