Bugfix - switched min/max
[kaka/cakelight.git] / src / kaka / cakelight / Configuration.java
index 4d727cc..286da18 100644 (file)
@@ -104,7 +104,7 @@ public class Configuration {
         private LedConfiguration(Properties prop) {
             cols = Integer.parseInt(get(prop, "leds.cols"));
             rows = Integer.parseInt(get(prop, "leds.rows"));
-            level = Math.min(0, Math.max(31, Integer.parseInt(get(prop, "leds.level", "31"))));
+            level = Math.max(1, Math.min(31, Integer.parseInt(get(prop, "leds.level", "31"))));
             switch (get(prop, "leds.type", "").toUpperCase()) {
                 case "WS2801":
                     type = LedType.WS2801;