From 50f75e340478d403e6d2a5300f8fede31c6f85fc Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 3 Jan 2017 21:42:32 +0100 Subject: [PATCH] upload AMA result to NS too --- .../plugins/ConfigBuilder/ConfigBuilderPlugin.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java index 0a83c86296..79ab57f0f4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java @@ -43,6 +43,7 @@ import info.nightscout.androidaps.plugins.DanaR.comm.MsgError; import info.nightscout.androidaps.plugins.Loop.APSResult; import info.nightscout.androidaps.plugins.Loop.DeviceStatus; import info.nightscout.androidaps.plugins.Loop.LoopPlugin; +import info.nightscout.androidaps.plugins.OpenAPSAMA.DetermineBasalResultAMA; import info.nightscout.androidaps.plugins.OpenAPSMA.DetermineBasalResultMA; import info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog; import info.nightscout.androidaps.plugins.Actions.dialogs.NewExtendedBolusDialog; @@ -906,6 +907,12 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain deviceStatus.iob.put("time", DateUtil.toISOString(lastRun.lastAPSRun)); } + if (lastRun.request instanceof DetermineBasalResultAMA) { + DetermineBasalResultAMA result = (DetermineBasalResultAMA) lastRun.request; + deviceStatus.iob = result.iob.json(); + deviceStatus.iob.put("time", DateUtil.toISOString(lastRun.lastAPSRun)); + } + if (lastRun.setByPump != null && lastRun.setByPump.enacted) { // enacted deviceStatus.enacted = lastRun.request.json(); deviceStatus.enacted.put("rate", lastRun.setByPump.json().get("rate"));