First draft of a console
[kaka/cakelight.git] / src / kaka / cakelight / CakeLight.java
index 33e0035..6a00a37 100644 (file)
@@ -8,12 +8,13 @@ public class CakeLight {
     public CakeLight(Configuration config, LedController ledController) {
         this.config = config;
         this.ledController = ledController;
+        Color.calculateGammaCorrection(config.gamma);
     }
 
     public void setMode(Mode mode) {
         cleanup();
         this.mode = mode;
-        mode.setFrameListener(ledController);
+        mode.setFrameListener(ledController::onFrame);
         mode.enter(config);
     }
 
@@ -24,6 +25,7 @@ public class CakeLight {
     }
 
     public void startLoop() {
+        Console.start(this, config);
         // TODO
 //        FrameGrabber grabber = FrameGrabber.from(config);
 //        grabber.prepare();