Dolda2000 GitWeb
/
kaka
/
cakelight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add gamma control in console
[kaka/cakelight.git]
/
src
/
kaka
/
cakelight
/
Console.java
diff --git
a/src/kaka/cakelight/Console.java
b/src/kaka/cakelight/Console.java
index
caae09b
..
43ebd13
100644
(file)
--- a/
src/kaka/cakelight/Console.java
+++ b/
src/kaka/cakelight/Console.java
@@
-33,7
+33,7
@@
public class Console extends Thread {
} else if (input.matches("(b|brightness)\\s+[0-9]+")) {
String[] split = input.split("\\s+");
config.leds.brightness = Integer.parseInt(split[1]);
} else if (input.matches("(b|brightness)\\s+[0-9]+")) {
String[] split = input.split("\\s+");
config.leds.brightness = Integer.parseInt(split[1]);
- System.out.println("setting brightness to " +
split[1]
);
+ System.out.println("setting brightness to " +
config.leds.brightness
);
} else if (input.matches("q|quit")) {
cakelight.turnOff();
System.out.println("stopping cakelight");
} else if (input.matches("q|quit")) {
cakelight.turnOff();
System.out.println("stopping cakelight");
@@
-47,6
+47,11
@@
public class Console extends Thread {
);
cakelight.setMode(new SingleColorMode(c));
System.out.println("setting color to " + c);
);
cakelight.setMode(new SingleColorMode(c));
System.out.println("setting color to " + c);
+ } else if (input.matches("g|gamma\\s+[0-9.]+")) {
+ String[] split = input.split("\\s+");
+ config.gamma = Double.parseDouble(split[1]);
+ System.out.println("setting gamma to " + config.gamma);
+ break;
}
} catch (IOException e) {
System.out.println("Error reading from command line");
}
} catch (IOException e) {
System.out.println("Error reading from command line");
@@
-54,5
+59,4
@@
public class Console extends Thread {
}
}
}
}
}
}
-
}
}