From 336315823e8febb8e8bf8c8fdc3586fd50da5f93 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Fri, 14 Jul 2017 21:49:43 +0200 Subject: [PATCH] ComboPlugin.getBaseBasalRate: return profile value. --- .../androidaps/plugins/PumpCombo/ComboPlugin.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 3b5bcb11a9..e545cd5509 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -230,18 +230,22 @@ public class ComboPlugin implements PluginBase, PumpInterface { // TODO @Override public void refreshDataFromPump(String reason) { -// this is called regulary from keepalive + log.debug("RefreshDataFromPump called"); + + // this is called regulary from keepalive // TODO how often is this called? use this to run checks regularly, e.g. // recheck active TBR, basal rate to ensure nothing broke? } - // TODO + // TODO uses profile values for the time being + // this get's called mulitple times a minute, must absolutely be cached @Override public double getBaseBasalRate() { - // TODO this is simple to read, w/o causing vibrations, it's BASAL_RATE in the main menu - // and/or read this from a cached basal rate profile - return 0.5d; + Profile profile = MainApp.getConfigBuilder().getProfile(); + Double basal = profile.getBasal(); + log.debug("getBaseBasalrate returning " + basal); + return basal; } // TODO rewrite this crap into something comprehensible