Skip to content

Commit

Permalink
Fixed detection of strip length
Browse files Browse the repository at this point in the history
  • Loading branch information
fezzik02 committed Jul 6, 2014
1 parent 12c3dac commit 95e4714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pixelpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95e4714

Please sign in to comment.