From 95e4714b80eea83d940441fcb8f15e1be186a574 Mon Sep 17 00:00:00 2001 From: John Garcia Date: Sat, 5 Jul 2014 17:58:59 -0700 Subject: [PATCH] Fixed detection of strip length --- pixelpi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixelpi.py b/pixelpi.py index ec44091..09f69d6 100644 --- a/pixelpi.py +++ b/pixelpi.py @@ -185,7 +185,7 @@ def write_stream(pixels): pixel_out_bytes[0] = (pixel_out & 0xFF00) >> 8 pixel_out_bytes[1] = (pixel_out & 0x00FF) >> 0 spidev.write(pixel_out_bytes) - spidev.write(bytearray(args.num_leds / 8 + 1)) + spidev.write(bytearray(len(pixels) / 8 + 1)) elif args.chip_type == "LPD8806": spidev.write(pixels) spidev.write(bytearray(b'\x00\x00\x00')) # zero fill the last to prevent stray colors at the end