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