From 944e334231d8b2c8ce416231a7486d7fd3fb3ddf Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 12 Oct 2017 12:44:17 +0200 Subject: [PATCH] migrate CPP->LP working --- .../CircadianPercentageProfilePlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfilePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfilePlugin.java index 1fcec2b9ff..349574debb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfilePlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfilePlugin.java @@ -258,6 +258,7 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte try { JSONArray jsonArray = new JSONArray(); double last = -1d; + for (int i = 0; i < 24; i++) { double value = SP.getDouble(SETTINGS_PREFIX + type + i, defaultValue); 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)); } last = value; - return jsonArray.toString(); } + return jsonArray.toString(); } catch (JSONException e) { log.error("Unhandled exception", e); }