diff --git a/examples/SK6812_lowlevel.py b/examples/SK6812_lowlevel.py index ff9177a..3c3b259 100644 --- a/examples/SK6812_lowlevel.py +++ b/examples/SK6812_lowlevel.py @@ -45,14 +45,6 @@ # that you delete its memory by calling delete_ws2811_t when it's not needed. leds = ws.new_ws2811_t() -# Initialize all channels to off -for channum in range(2): - channel = ws.ws2811_channel_get(leds, channum) - ws.ws2811_channel_t_count_set(channel, 0) - ws.ws2811_channel_t_gpionum_set(channel, 0) - ws.ws2811_channel_t_invert_set(channel, 0) - ws.ws2811_channel_t_brightness_set(channel, 0) - channel = ws.ws2811_channel_get(leds, LED_CHANNEL) ws.ws2811_channel_t_count_set(channel, LED_COUNT) diff --git a/examples/lowlevel.py b/examples/lowlevel.py index 71b77b8..2fec6df 100644 --- a/examples/lowlevel.py +++ b/examples/lowlevel.py @@ -40,14 +40,6 @@ # that you delete its memory by calling delete_ws2811_t when it's not needed. leds = ws.new_ws2811_t() -# Initialize all channels to off -for channum in range(2): - channel = ws.ws2811_channel_get(leds, channum) - ws.ws2811_channel_t_count_set(channel, 0) - ws.ws2811_channel_t_gpionum_set(channel, 0) - ws.ws2811_channel_t_invert_set(channel, 0) - ws.ws2811_channel_t_brightness_set(channel, 0) - channel = ws.ws2811_channel_get(leds, LED_CHANNEL) ws.ws2811_channel_t_count_set(channel, LED_COUNT) diff --git a/library/rpi_ws281x/rpi_ws281x.py b/library/rpi_ws281x/rpi_ws281x.py index f9d6a8a..6cc62ab 100644 --- a/library/rpi_ws281x/rpi_ws281x.py +++ b/library/rpi_ws281x/rpi_ws281x.py @@ -65,14 +65,6 @@ def __init__(self, num, pin, freq_hz=800000, dma=10, invert=False, # Create ws2811_t structure and fill in parameters. self._leds = ws.new_ws2811_t() - # Initialize the channels to zero - for channum in range(2): - chan = ws.ws2811_channel_get(self._leds, channum) - ws.ws2811_channel_t_count_set(chan, 0) - ws.ws2811_channel_t_gpionum_set(chan, 0) - ws.ws2811_channel_t_invert_set(chan, 0) - ws.ws2811_channel_t_brightness_set(chan, 0) - # Initialize the channel in use self._channel = ws.ws2811_channel_get(self._leds, channel)