always report active profile

This commit is contained in:
Milos Kozak 2016-11-10 13:15:23 +01:00
parent 770f44118b
commit 156f42da5f
2 changed files with 6 additions and 3 deletions

View file

@ -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);

View file

@ -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);