Added a LED controller that consumes LED frames from the modes
[kaka/cakelight.git] / src / kaka / cakelight / LedFrame.java
CommitLineData
03b67a73
TW
1package kaka.cakelight;
2
3import javafx.scene.paint.Color;
4
5public class LedFrame {
6 private Color[] leds;
7
8 public static LedFrame from(Configuration config) {
9 LedFrame frame = new LedFrame();
10 frame.leds = new Color[config.leds.cols * 2 + config.leds.rows * 2];
11 return frame;
12 }
13
14 public void setLedColor(int led, Color color) {
15 leds[led] = color;
16 }
17
18 public Color getLedColor(int led) {
19 return leds[led];
20 }
21}