Skip to content

Commit 0fc6c16

Browse files
committed
MultiColor bounding
1 parent 8ead5cc commit 0fc6c16

File tree

4 files changed

+4
-34
lines changed

4 files changed

+4
-34
lines changed

.idea/workspace.xml

Lines changed: 1 addition & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/com/github/iamniklas/liocore/led/LEDDataBundle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class LEDDataBundle {
3939
public Integer modulo;
4040
public Boolean moduloInvert;
4141

42-
42+
4343
public transient LEDStripManager ledStrip;
4444
public transient ProcedureCalls procedureCalls;
4545

src/main/java/com/github/iamniklas/liocore/procedures/variants/MonoColorProcedure.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public void start() {
1919
@Override
2020
public void update() {
2121
strip.setAllPixels(LIOColor.fromRGB(ledUpdateModel.bundle.color));
22-
postUpdate();
2322
}
2423

2524
@Override

src/main/java/com/github/iamniklas/liocore/procedures/variants/MultiColorProcedure.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.iamniklas.liocore.procedures.variants;
22

33
import com.github.iamniklas.liocore.led.LEDDataBundle;
4+
import com.github.iamniklas.liocore.led.LEDStripManager;
45
import com.github.iamniklas.liocore.led.colorspace.LIOColor;
56
import com.github.iamniklas.liocore.led.json.LEDJsonProcedure;
67
import com.github.iamniklas.liocore.led.json.interpreter.FileVersions;
@@ -26,10 +27,9 @@ public void start() {
2627

2728
@Override
2829
public void update() {
29-
for (int i = 0; i < ledUpdateModel.bundle.colors.size(); i++) {
30+
for (int i = 0; i < Math.min(ledUpdateModel.bundle.colors.size(), LEDStripManager.ledCount); i++) {
3031
strip.setPixel(i, LIOColor.fromRGB(ledUpdateModel.bundle.colors.get(step)));
3132
}
32-
postUpdate();
3333
}
3434

3535
@Override

0 commit comments

Comments
 (0)