public class LedConfiguration {
public int cols;
public int rows;
- public int level;
+ public int brightness;
public LedType type;
private LedConfiguration(Properties prop) {
cols = Integer.parseInt(get(prop, "leds.cols"));
rows = Integer.parseInt(get(prop, "leds.rows"));
- level = Math.max(1, Math.min(31, Integer.parseInt(get(prop, "leds.level", "31"))));
+ brightness = Math.max(1, Math.min(31, Integer.parseInt(get(prop, "leds.brightness", "31"))));
switch (get(prop, "leds.type", "").toUpperCase()) {
case "WS2801":
type = LedType.WS2801;
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.level)); // Initiate the first byte of each LED
+ 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
break;
}