X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fkaka%2Fcakelight%2FLedFrame.java;fp=src%2Fkaka%2Fcakelight%2FLedFrame.java;h=a4f6293d6e2d8ecdff9bf70b00364b891a86bfaa;hb=03b67a7377d6d23d517d33e47f338bb7859596ed;hp=0000000000000000000000000000000000000000;hpb=03670958a5eab132a4f1a6ae5ae58b88f55bfe2f;p=kaka%2Fcakelight.git diff --git a/src/kaka/cakelight/LedFrame.java b/src/kaka/cakelight/LedFrame.java new file mode 100644 index 0000000..a4f6293 --- /dev/null +++ b/src/kaka/cakelight/LedFrame.java @@ -0,0 +1,21 @@ +package kaka.cakelight; + +import javafx.scene.paint.Color; + +public class LedFrame { + private Color[] leds; + + public static LedFrame from(Configuration config) { + LedFrame frame = new LedFrame(); + frame.leds = new Color[config.leds.cols * 2 + config.leds.rows * 2]; + return frame; + } + + public void setLedColor(int led, Color color) { + leds[led] = color; + } + + public Color getLedColor(int led) { + return leds[led]; + } +}