From 156f42da5fc625261ff1905d336118ae521d6ef8 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 10 Nov 2016 13:15:23 +0100 Subject: [PATCH] always report active profile --- .../nightscout/androidaps/plugins/DanaR/DanaRPlugin.java | 6 +++--- .../androidaps/plugins/VirtualPump/VirtualPumpPlugin.java | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java index 5b1991d0b8..d5d7966a56 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRPlugin.java @@ -602,11 +602,11 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf extended.put("TempBasalStart", getTempBasal().timeStart.toLocaleString()); extended.put("TempBasalRemaining", getTempBasal().getPlannedRemainingMinutes()); extended.put("IsExtended", getTempBasal().isExtended); - try { - extended.put("ActiveProfile", MainApp.getConfigBuilder().getActiveProfile().getProfile().getActiveProfile()); - } catch (Exception e) {} } extended.put("BaseBasalRate", getBaseBasalRate()); + try { + extended.put("ActiveProfile", MainApp.getConfigBuilder().getActiveProfile().getProfile().getActiveProfile()); + } catch (Exception e) {} pump.put("battery", battery); pump.put("status", status); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java index 4a441e1c76..a5f05acbc6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java @@ -336,6 +336,9 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface { battery.put("percent", batteryPercent); status.put("status", "normal"); extended.put("Version", BuildConfig.VERSION_NAME + "-" + BuildConfig.BUILDVERSION); + try { + extended.put("ActiveProfile", MainApp.getConfigBuilder().getActiveProfile().getProfile().getActiveProfile()); + } catch (Exception e) {} TempBasal tb; if ((tb = getTempBasal()) != null) { status.put("tempbasalpct", tb.percent);