// byte[] data = frame.getData();
// saveFile(data, "/home/kaka/test.img");
}
+
+ public void turnOff() {
+ cleanup();
+ ledController.onFrame(LedFrame.from(config));
+ }
}
config.leds.brightness = Integer.parseInt(split[1]);
System.out.println("setting brightness to " + split[1]);
} else if (input.matches("q|quit")) {
- cakelight.cleanup();
+ cakelight.turnOff();
System.out.println("stopping cakelight");
break;
}
private int stride;
private int roff, goff, boff; // RGB offsets
+ /**
+ * @return a frame initiated to black
+ */
public static LedFrame from(Configuration config) {
LedFrame frame = new LedFrame();
frame.config = config;