- frame.roff = 3 + 4;
- frame.goff = 2 + 4;
- frame.boff = 1 + 4;
- frame.bytes = new byte[4 + config.leds.getCount() * frame.stride + 4];
- Arrays.fill(frame.bytes, 4, frame.bytes.length - 5, (byte)(0b11100000 | config.leds.brightness)); // Initiate the first byte of each LED
- Arrays.fill(frame.bytes, frame.bytes.length - 5, frame.bytes.length - 1, (byte)0xff); // Initiate the end frame with ones
+ frame.roff = 3;
+ frame.goff = 2;
+ frame.boff = 1;
+ frame.bytes = new byte[4 + config.leds.getCount() * frame.stride + 4 * 2]; // 1 end frame doesn't seem to work, so we add another
+ Arrays.fill(frame.bytes, 4, frame.bytes.length - 9, (byte)(0b11100000 | config.leds.brightness)); // Initiate the first byte of each LED
+ Arrays.fill(frame.bytes, frame.bytes.length - 9, frame.bytes.length, (byte)0xff); // Initiate the end frame(s) with ones