Insight treat 100% TBR from absolute as cancel
This commit is contained in:
parent
1d169bc27f
commit
44ba10e00c
1 changed files with 5 additions and 0 deletions
|
@ -463,6 +463,11 @@ public class InsightPumpPlugin implements PluginBase, PumpInterface, Constraints
|
||||||
log("Calculated requested rate: " + absoluteRate + " base rate: " + base_basal + " percentage: " + amount + "%");
|
log("Calculated requested rate: " + absoluteRate + " base rate: " + base_basal + " percentage: " + amount + "%");
|
||||||
amount = (int) Math.round(((double) amount) / 10d) * 10;
|
amount = (int) Math.round(((double) amount) / 10d) * 10;
|
||||||
log("Calculated final rate: " + amount + "%");
|
log("Calculated final rate: " + amount + "%");
|
||||||
|
|
||||||
|
if (amount == 100) {
|
||||||
|
return cancelTempBasal(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (amount > 250) amount = 250;
|
if (amount > 250) amount = 250;
|
||||||
|
|
||||||
final SetTBRTaskRunner task = new SetTBRTaskRunner(connector.getServiceConnector(), amount, durationInMinutes);
|
final SetTBRTaskRunner task = new SetTBRTaskRunner(connector.getServiceConnector(), amount, durationInMinutes);
|
||||||
|
|
Loading…
Reference in a new issue