Skip to content

Commit e7f01dd

Browse files
committed
Added setGamma
1 parent d708b3b commit e7f01dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/rpi_ws281x/rpi_ws281x.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ def _cleanup(self):
115115
self._channel = None
116116
# Note that ws2811_fini will free the memory used by led_data internally.
117117

118+
def setGamma(self, gamma):
119+
if type(gamma) is list and len(gamma) == 256:
120+
self._gamma = gamma
121+
ws.ws2811_channel_t_gamma_set(self._channel, self._gamma)
122+
118123
def begin(self):
119124
"""Initialize library, must be called once before other functions are
120125
called.

0 commit comments

Comments
 (0)