Fix generation of color smoothing parameters

Former-commit-id: 44b606e833451ee5795d92fd0bef3acb2dd8d47c
This commit is contained in:
johan 2013-11-09 11:36:08 +01:00
parent 402cb02f09
commit 90f1f282e2
3 changed files with 9 additions and 9 deletions

View File

@ -60,12 +60,12 @@
"blacklevel" : 0.0000,
"whitelevel" : 1.0000
},
// "smoothing" :
// {
// "type" : "linear",
// "time_ms" : 200,
// "updateFrequency" : 20.0000
// }
"smoothing" :
{
"type" : "none",
"time_ms" : 200,
"updateFrequency" : 20.0000
}
},
/// The configuration for each individual led. This contains the specification of the area

View File

@ -1 +1 @@
7079c4843fecd32e0914e10a06cf4fe99d89ab9d
1c3031eb536b2af5ced172f1eb071011f705cc86

View File

@ -137,10 +137,10 @@ public class ColorConfig {
private String smoothingToString() {
StringBuffer strBuf = new StringBuffer();
String preamble = (mSmoothingEnabled)? "\t\t" : "//\t\t";
String preamble = "\t\t";
strBuf.append(preamble).append("\"smoothing\" :\n");
strBuf.append(preamble).append("{\n");
strBuf.append(preamble).append(String.format(Locale.ROOT, "\t\"type\" : \"%s\",\n", mSmoothingType.name()));
strBuf.append(preamble).append(String.format(Locale.ROOT, "\t\"type\" : \"%s\",\n", (mSmoothingEnabled) ? mSmoothingType.name() : "none"));
strBuf.append(preamble).append(String.format(Locale.ROOT, "\t\"time_ms\" : %d,\n", mSmoothingTime_ms));
strBuf.append(preamble).append(String.format(Locale.ROOT, "\t\"updateFrequency\" : %.4f\n", mSmoothingUpdateFrequency_Hz));