5
5
# the SWIG interface file instead.
6
6
7
7
from sys import version_info as _swig_python_version_info
8
-
9
8
if _swig_python_version_info < (2 , 7 , 0 ):
10
9
raise RuntimeError ("Python 2.7 or later required" )
11
10
20
19
except ImportError :
21
20
import __builtin__
22
21
23
-
24
22
def _swig_repr (self ):
25
23
try :
26
24
strthis = "proxy of " + self .this .__repr__ ()
27
25
except __builtin__ .Exception :
28
26
strthis = ""
29
- return "<%s.%s; %s >" % (
30
- self .__class__ .__module__ ,
31
- self .__class__ .__name__ ,
32
- strthis ,
33
- )
27
+ return "<%s.%s; %s >" % (self .__class__ .__module__ , self .__class__ .__name__ , strthis ,)
34
28
35
29
36
30
def _swig_setattr_nondynamic_instance_variable (set ):
@@ -43,7 +37,6 @@ def set_instance_attr(self, name, value):
43
37
set (self , name , value )
44
38
else :
45
39
raise AttributeError ("You cannot add instance attributes to %s" % self )
46
-
47
40
return set_instance_attr
48
41
49
42
@@ -53,22 +46,18 @@ def set_class_attr(cls, name, value):
53
46
set (cls , name , value )
54
47
else :
55
48
raise AttributeError ("You cannot add class attributes to %s" % cls )
56
-
57
49
return set_class_attr
58
50
59
51
60
52
def _swig_add_metaclass (metaclass ):
61
53
"""Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
62
-
63
54
def wrapper (cls ):
64
55
return metaclass (cls .__name__ , cls .__bases__ , cls .__dict__ .copy ())
65
-
66
56
return wrapper
67
57
68
58
69
59
class _SwigNonDynamicMeta (type ):
70
60
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
71
-
72
61
__setattr__ = _swig_setattr_nondynamic_class_variable (type .__setattr__ )
73
62
74
63
@@ -89,83 +78,42 @@ class _SwigNonDynamicMeta(type):
89
78
WS2812_STRIP = _rpi_ws281x .WS2812_STRIP
90
79
SK6812_STRIP = _rpi_ws281x .SK6812_STRIP
91
80
SK6812W_STRIP = _rpi_ws281x .SK6812W_STRIP
92
-
93
-
94
81
class ws2811_channel_t (object ):
95
- thisown = property (
96
- lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag"
97
- )
82
+ thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
98
83
__repr__ = _swig_repr
99
- gpionum = property (
100
- _rpi_ws281x .ws2811_channel_t_gpionum_get ,
101
- _rpi_ws281x .ws2811_channel_t_gpionum_set ,
102
- )
103
- invert = property (
104
- _rpi_ws281x .ws2811_channel_t_invert_get , _rpi_ws281x .ws2811_channel_t_invert_set
105
- )
106
- count = property (
107
- _rpi_ws281x .ws2811_channel_t_count_get , _rpi_ws281x .ws2811_channel_t_count_set
108
- )
109
- strip_type = property (
110
- _rpi_ws281x .ws2811_channel_t_strip_type_get ,
111
- _rpi_ws281x .ws2811_channel_t_strip_type_set ,
112
- )
113
- leds = property (
114
- _rpi_ws281x .ws2811_channel_t_leds_get , _rpi_ws281x .ws2811_channel_t_leds_set
115
- )
116
- brightness = property (
117
- _rpi_ws281x .ws2811_channel_t_brightness_get ,
118
- _rpi_ws281x .ws2811_channel_t_brightness_set ,
119
- )
120
- wshift = property (
121
- _rpi_ws281x .ws2811_channel_t_wshift_get , _rpi_ws281x .ws2811_channel_t_wshift_set
122
- )
123
- rshift = property (
124
- _rpi_ws281x .ws2811_channel_t_rshift_get , _rpi_ws281x .ws2811_channel_t_rshift_set
125
- )
126
- gshift = property (
127
- _rpi_ws281x .ws2811_channel_t_gshift_get , _rpi_ws281x .ws2811_channel_t_gshift_set
128
- )
129
- bshift = property (
130
- _rpi_ws281x .ws2811_channel_t_bshift_get , _rpi_ws281x .ws2811_channel_t_bshift_set
131
- )
132
- gamma = property (
133
- _rpi_ws281x .ws2811_channel_t_gamma_get , _rpi_ws281x .ws2811_channel_t_gamma_set
134
- )
84
+ gpionum = property (_rpi_ws281x .ws2811_channel_t_gpionum_get , _rpi_ws281x .ws2811_channel_t_gpionum_set )
85
+ invert = property (_rpi_ws281x .ws2811_channel_t_invert_get , _rpi_ws281x .ws2811_channel_t_invert_set )
86
+ count = property (_rpi_ws281x .ws2811_channel_t_count_get , _rpi_ws281x .ws2811_channel_t_count_set )
87
+ strip_type = property (_rpi_ws281x .ws2811_channel_t_strip_type_get , _rpi_ws281x .ws2811_channel_t_strip_type_set )
88
+ leds = property (_rpi_ws281x .ws2811_channel_t_leds_get , _rpi_ws281x .ws2811_channel_t_leds_set )
89
+ brightness = property (_rpi_ws281x .ws2811_channel_t_brightness_get , _rpi_ws281x .ws2811_channel_t_brightness_set )
90
+ wshift = property (_rpi_ws281x .ws2811_channel_t_wshift_get , _rpi_ws281x .ws2811_channel_t_wshift_set )
91
+ rshift = property (_rpi_ws281x .ws2811_channel_t_rshift_get , _rpi_ws281x .ws2811_channel_t_rshift_set )
92
+ gshift = property (_rpi_ws281x .ws2811_channel_t_gshift_get , _rpi_ws281x .ws2811_channel_t_gshift_set )
93
+ bshift = property (_rpi_ws281x .ws2811_channel_t_bshift_get , _rpi_ws281x .ws2811_channel_t_bshift_set )
94
+ gamma = property (_rpi_ws281x .ws2811_channel_t_gamma_get , _rpi_ws281x .ws2811_channel_t_gamma_set )
135
95
136
96
def __init__ (self ):
137
97
_rpi_ws281x .ws2811_channel_t_swiginit (self , _rpi_ws281x .new_ws2811_channel_t ())
138
-
139
98
__swig_destroy__ = _rpi_ws281x .delete_ws2811_channel_t
140
99
141
-
142
100
# Register ws2811_channel_t in _rpi_ws281x:
143
101
_rpi_ws281x .ws2811_channel_t_swigregister (ws2811_channel_t )
144
102
145
-
146
103
class ws2811_t (object ):
147
- thisown = property (
148
- lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag"
149
- )
104
+ thisown = property (lambda x : x .this .own (), lambda x , v : x .this .own (v ), doc = "The membership flag" )
150
105
__repr__ = _swig_repr
151
- render_wait_time = property (
152
- _rpi_ws281x .ws2811_t_render_wait_time_get ,
153
- _rpi_ws281x .ws2811_t_render_wait_time_set ,
154
- )
106
+ render_wait_time = property (_rpi_ws281x .ws2811_t_render_wait_time_get , _rpi_ws281x .ws2811_t_render_wait_time_set )
155
107
device = property (_rpi_ws281x .ws2811_t_device_get , _rpi_ws281x .ws2811_t_device_set )
156
108
rpi_hw = property (_rpi_ws281x .ws2811_t_rpi_hw_get , _rpi_ws281x .ws2811_t_rpi_hw_set )
157
109
freq = property (_rpi_ws281x .ws2811_t_freq_get , _rpi_ws281x .ws2811_t_freq_set )
158
110
dmanum = property (_rpi_ws281x .ws2811_t_dmanum_get , _rpi_ws281x .ws2811_t_dmanum_set )
159
- channel = property (
160
- _rpi_ws281x .ws2811_t_channel_get , _rpi_ws281x .ws2811_t_channel_set
161
- )
111
+ channel = property (_rpi_ws281x .ws2811_t_channel_get , _rpi_ws281x .ws2811_t_channel_set )
162
112
163
113
def __init__ (self ):
164
114
_rpi_ws281x .ws2811_t_swiginit (self , _rpi_ws281x .new_ws2811_t ())
165
-
166
115
__swig_destroy__ = _rpi_ws281x .delete_ws2811_t
167
116
168
-
169
117
# Register ws2811_t in _rpi_ws281x:
170
118
_rpi_ws281x .ws2811_t_swigregister (ws2811_t )
171
119
@@ -186,38 +134,34 @@ def __init__(self):
186
134
WS2811_ERROR_SPI_TRANSFER = _rpi_ws281x .WS2811_ERROR_SPI_TRANSFER
187
135
WS2811_RETURN_STATE_COUNT = _rpi_ws281x .WS2811_RETURN_STATE_COUNT
188
136
189
-
190
137
def ws2811_init (ws2811 ):
191
138
return _rpi_ws281x .ws2811_init (ws2811 )
192
139
193
-
194
140
def ws2811_fini (ws2811 ):
195
141
return _rpi_ws281x .ws2811_fini (ws2811 )
196
142
197
-
198
143
def ws2811_render (ws2811 ):
199
144
return _rpi_ws281x .ws2811_render (ws2811 )
200
145
201
-
202
146
def ws2811_wait (ws2811 ):
203
147
return _rpi_ws281x .ws2811_wait (ws2811 )
204
148
205
-
206
149
def ws2811_get_return_t_str (state ):
207
150
return _rpi_ws281x .ws2811_get_return_t_str (state )
208
151
209
-
210
152
def ws2811_set_custom_gamma_factor (ws2811 , gamma_factor ):
211
153
return _rpi_ws281x .ws2811_set_custom_gamma_factor (ws2811 , gamma_factor )
212
154
213
-
214
155
def ws2811_led_get (channel , lednum ):
215
156
return _rpi_ws281x .ws2811_led_get (channel , lednum )
216
157
217
-
218
158
def ws2811_led_set (channel , lednum , color ):
219
159
return _rpi_ws281x .ws2811_led_set (channel , lednum , color )
220
160
221
-
222
161
def ws2811_channel_get (ws , channelnum ):
223
162
return _rpi_ws281x .ws2811_channel_get (ws , channelnum )
163
+
164
+ def ws2811_render_nogil (ws2811 ):
165
+ return _rpi_ws281x .ws2811_render_nogil (ws2811 )
166
+
167
+
0 commit comments