Ejemplo n.º 1
0
 def show(self):
     """Update the display with the data from the LED buffer."""
     resp = ws.ws2811_render(self._leds)
     if resp != ws.WS2811_SUCCESS:
         message = ws.ws2811_get_return_t_str(resp)
         raise RuntimeError(
             'ws2811_render failed with code {0} ({1})'.format(
                 resp, message))
Ejemplo n.º 2
0
 def update(self):
     r = ws.ws2811_render(self._leds)
     if (r != ws.WS2811_SUCCESS):
         raise RuntimeError(ws.ws2811_get_return_t_str(r))
Ejemplo n.º 3
0
 def _c(self):
     for i in range(self.data.sz[0] * self.data.sz[1]):
         ws.ws2811_led_set(self.data.ch, i, 0)
     ws.ws2811_render(self._leds)
     ws.delete_ws2811_t(self._leds)