55# the SWIG interface file instead.
66
77from sys import version_info as _swig_python_version_info
8-
98if _swig_python_version_info < (2 , 7 , 0 ):
109 raise RuntimeError ("Python 2.7 or later required" )
1110
2019except ImportError :
2120 import __builtin__
2221
23-
2422def _swig_repr (self ):
2523 try :
2624 strthis = "proxy of " + self .this .__repr__ ()
2725 except __builtin__ .Exception :
2826 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 ,)
3428
3529
3630def _swig_setattr_nondynamic_instance_variable (set ):
@@ -43,7 +37,6 @@ def set_instance_attr(self, name, value):
4337 set (self , name , value )
4438 else :
4539 raise AttributeError ("You cannot add instance attributes to %s" % self )
46-
4740 return set_instance_attr
4841
4942
@@ -53,22 +46,18 @@ def set_class_attr(cls, name, value):
5346 set (cls , name , value )
5447 else :
5548 raise AttributeError ("You cannot add class attributes to %s" % cls )
56-
5749 return set_class_attr
5850
5951
6052def _swig_add_metaclass (metaclass ):
6153 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
62-
6354 def wrapper (cls ):
6455 return metaclass (cls .__name__ , cls .__bases__ , cls .__dict__ .copy ())
65-
6656 return wrapper
6757
6858
6959class _SwigNonDynamicMeta (type ):
7060 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
71-
7261 __setattr__ = _swig_setattr_nondynamic_class_variable (type .__setattr__ )
7362
7463
@@ -89,83 +78,42 @@ class _SwigNonDynamicMeta(type):
8978WS2812_STRIP = _rpi_ws281x .WS2812_STRIP
9079SK6812_STRIP = _rpi_ws281x .SK6812_STRIP
9180SK6812W_STRIP = _rpi_ws281x .SK6812W_STRIP
92-
93-
9481class 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" )
9883 __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 )
13595
13696 def __init__ (self ):
13797 _rpi_ws281x .ws2811_channel_t_swiginit (self , _rpi_ws281x .new_ws2811_channel_t ())
138-
13998 __swig_destroy__ = _rpi_ws281x .delete_ws2811_channel_t
14099
141-
142100# Register ws2811_channel_t in _rpi_ws281x:
143101_rpi_ws281x .ws2811_channel_t_swigregister (ws2811_channel_t )
144102
145-
146103class 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" )
150105 __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 )
155107 device = property (_rpi_ws281x .ws2811_t_device_get , _rpi_ws281x .ws2811_t_device_set )
156108 rpi_hw = property (_rpi_ws281x .ws2811_t_rpi_hw_get , _rpi_ws281x .ws2811_t_rpi_hw_set )
157109 freq = property (_rpi_ws281x .ws2811_t_freq_get , _rpi_ws281x .ws2811_t_freq_set )
158110 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 )
162112
163113 def __init__ (self ):
164114 _rpi_ws281x .ws2811_t_swiginit (self , _rpi_ws281x .new_ws2811_t ())
165-
166115 __swig_destroy__ = _rpi_ws281x .delete_ws2811_t
167116
168-
169117# Register ws2811_t in _rpi_ws281x:
170118_rpi_ws281x .ws2811_t_swigregister (ws2811_t )
171119
@@ -186,38 +134,34 @@ def __init__(self):
186134WS2811_ERROR_SPI_TRANSFER = _rpi_ws281x .WS2811_ERROR_SPI_TRANSFER
187135WS2811_RETURN_STATE_COUNT = _rpi_ws281x .WS2811_RETURN_STATE_COUNT
188136
189-
190137def ws2811_init (ws2811 ):
191138 return _rpi_ws281x .ws2811_init (ws2811 )
192139
193-
194140def ws2811_fini (ws2811 ):
195141 return _rpi_ws281x .ws2811_fini (ws2811 )
196142
197-
198143def ws2811_render (ws2811 ):
199144 return _rpi_ws281x .ws2811_render (ws2811 )
200145
201-
202146def ws2811_wait (ws2811 ):
203147 return _rpi_ws281x .ws2811_wait (ws2811 )
204148
205-
206149def ws2811_get_return_t_str (state ):
207150 return _rpi_ws281x .ws2811_get_return_t_str (state )
208151
209-
210152def ws2811_set_custom_gamma_factor (ws2811 , gamma_factor ):
211153 return _rpi_ws281x .ws2811_set_custom_gamma_factor (ws2811 , gamma_factor )
212154
213-
214155def ws2811_led_get (channel , lednum ):
215156 return _rpi_ws281x .ws2811_led_get (channel , lednum )
216157
217-
218158def ws2811_led_set (channel , lednum , color ):
219159 return _rpi_ws281x .ws2811_led_set (channel , lednum , color )
220160
221-
222161def ws2811_channel_get (ws , channelnum ):
223162 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