ComboPlugin.getBaseBasalRate: return profile value.
This commit is contained in:
parent
0729d7a114
commit
336315823e
1 changed files with 9 additions and 5 deletions
|
@ -230,18 +230,22 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
// TODO
|
// TODO
|
||||||
@Override
|
@Override
|
||||||
public void refreshDataFromPump(String reason) {
|
public void refreshDataFromPump(String reason) {
|
||||||
|
log.debug("RefreshDataFromPump called");
|
||||||
|
|
||||||
// this is called regulary from keepalive
|
// this is called regulary from keepalive
|
||||||
|
|
||||||
// TODO how often is this called? use this to run checks regularly, e.g.
|
// TODO how often is this called? use this to run checks regularly, e.g.
|
||||||
// recheck active TBR, basal rate to ensure nothing broke?
|
// 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
|
@Override
|
||||||
public double getBaseBasalRate() {
|
public double getBaseBasalRate() {
|
||||||
// TODO this is simple to read, w/o causing vibrations, it's BASAL_RATE in the main menu
|
Profile profile = MainApp.getConfigBuilder().getProfile();
|
||||||
// and/or read this from a cached basal rate profile
|
Double basal = profile.getBasal();
|
||||||
return 0.5d;
|
log.debug("getBaseBasalrate returning " + basal);
|
||||||
|
return basal;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO rewrite this crap into something comprehensible
|
// TODO rewrite this crap into something comprehensible
|
||||||
|
|
Loading…
Reference in a new issue