migrate CPP->LP working

This commit is contained in:
AdrianLxM 2017-10-12 12:44:17 +02:00
parent 6f97e52a07
commit 944e334231

View file

@ -258,6 +258,7 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
try { try {
JSONArray jsonArray = new JSONArray(); JSONArray jsonArray = new JSONArray();
double last = -1d; double last = -1d;
for (int i = 0; i < 24; i++) { for (int i = 0; i < 24; i++) {
double value = SP.getDouble(SETTINGS_PREFIX + type + i, defaultValue); double value = SP.getDouble(SETTINGS_PREFIX + type + i, defaultValue);
String time; String time;
@ -267,8 +268,8 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
jsonArray.put(new JSONObject().put("time", time).put("timeAsSeconds", i * 60 * 60).put("value", value)); jsonArray.put(new JSONObject().put("time", time).put("timeAsSeconds", i * 60 * 60).put("value", value));
} }
last = value; last = value;
return jsonArray.toString();
} }
return jsonArray.toString();
} catch (JSONException e) { } catch (JSONException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception", e);
} }