Run in video mode unless arguments are supplied
authorTomas Wenström <tomas.wenstrom@gmail.com>
Wed, 3 May 2017 12:23:36 +0000 (14:23 +0200)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Wed, 3 May 2017 12:23:36 +0000 (14:23 +0200)
src/kaka/cakelight/Main.java

index 59e03ff..56761f2 100644 (file)
@@ -14,7 +14,11 @@ public class Main {
        log("Running with config:\n" + config);
 
        CakeLight cakelight = new CakeLight(config, new LedController(config));
-       cakelight.setMode(new AmbientMode(args));
+       if (args.length > 0) {
+           cakelight.setMode(new AmbientMode(args));
+       } else {
+           cakelight.setMode(new VideoMode());
+       }
        cakelight.startLoop();
        Runtime.getRuntime().addShutdownHook(new Thread(Main::printTimeStats));
     }