From d48de1b4c9e3a97f337e38fb62a86778afcee9f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomas=20Wenstr=C3=B6m?= Date: Wed, 3 May 2017 14:23:36 +0200 Subject: [PATCH] Run in video mode unless arguments are supplied --- src/kaka/cakelight/Main.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/kaka/cakelight/Main.java b/src/kaka/cakelight/Main.java index 59e03ff..56761f2 100644 --- a/src/kaka/cakelight/Main.java +++ b/src/kaka/cakelight/Main.java @@ -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)); } -- 2.11.0