From 8f259042d612289c86d1aba1be5df84b4f8d4650 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 7 Oct 2017 22:24:42 +0200 Subject: [PATCH 1/3] fix NPE --- .../androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java index 0355e055e1..3965ef5326 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpPlugin.java @@ -207,7 +207,7 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface { public double getBaseBasalRate() { Profile profile = MainApp.getConfigBuilder().getProfile(); if (profile != null) - return profile.getBasal(); + return profile.getBasal() != null ? profile.getBasal() : 0d; else return 0d; } From 70fefa9b703a451a6696f811532fe3d39e43486c Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 9 Oct 2017 21:03:25 +0200 Subject: [PATCH 2/3] NSTreatmentDialog: use same format for ES reason field as for profile. --- .../careportal_newnstreatment_dialog.xml | 97 +++++++++++-------- app/src/main/res/values/strings.xml | 1 + 2 files changed, 55 insertions(+), 43 deletions(-) diff --git a/app/src/main/res/layout/careportal_newnstreatment_dialog.xml b/app/src/main/res/layout/careportal_newnstreatment_dialog.xml index 5128262950..eafdfa689d 100644 --- a/app/src/main/res/layout/careportal_newnstreatment_dialog.xml +++ b/app/src/main/res/layout/careportal_newnstreatment_dialog.xml @@ -197,6 +197,60 @@ + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - eatingsoon_target activity_duration activity_target + Target From 62803f2a4debc129131261694e565bbd72d36149 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 9 Oct 2017 21:18:55 +0200 Subject: [PATCH 3/3] Use existing string resource. --- app/src/main/res/layout/careportal_newnstreatment_dialog.xml | 2 +- app/src/main/res/values/strings.xml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/res/layout/careportal_newnstreatment_dialog.xml b/app/src/main/res/layout/careportal_newnstreatment_dialog.xml index eafdfa689d..c933c4366e 100644 --- a/app/src/main/res/layout/careportal_newnstreatment_dialog.xml +++ b/app/src/main/res/layout/careportal_newnstreatment_dialog.xml @@ -234,7 +234,7 @@ eatingsoon_target activity_duration activity_target - Target