ConfigBuilder.applyAPSRequest: set new TBR if current TBR expires before next loop iteration.
This commit is contained in:
parent
1335887957
commit
a8a7d47da2
1 changed files with 3 additions and 1 deletions
|
@ -584,7 +584,9 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
if (Config.logCongigBuilderActions)
|
if (Config.logCongigBuilderActions)
|
||||||
log.debug("applyAPSRequest: Basal set correctly");
|
log.debug("applyAPSRequest: Basal set correctly");
|
||||||
}
|
}
|
||||||
} else if (isTempBasalInProgress() && Math.abs(request.rate - getTempBasalAbsoluteRateHistory()) < getPumpDescription().basalStep) {
|
} else if (isTempBasalInProgress()
|
||||||
|
&& getTempBasalRemainingMinutesFromHistory() > 5
|
||||||
|
&& Math.abs(request.rate - getTempBasalAbsoluteRateHistory()) < getPumpDescription().basalStep) {
|
||||||
result = new PumpEnactResult();
|
result = new PumpEnactResult();
|
||||||
result.absolute = getTempBasalAbsoluteRateHistory();
|
result.absolute = getTempBasalAbsoluteRateHistory();
|
||||||
result.duration = getTempBasalFromHistory(System.currentTimeMillis()).getPlannedRemainingMinutes();
|
result.duration = getTempBasalFromHistory(System.currentTimeMillis()).getPlannedRemainingMinutes();
|
||||||
|
|
Loading…
Reference in a new issue