ConfigBuilder.applyAPSRequest: set new TBR if current TBR expires before next loop iteration.
This commit is contained in:
parent
5d077c329a
commit
7163fbae54
|
@ -579,7 +579,9 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
|||
if (Config.logCongigBuilderActions)
|
||||
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.absolute = getTempBasalAbsoluteRateHistory();
|
||||
result.duration = getTempBasalFromHistory(System.currentTimeMillis()).getPlannedRemainingMinutes();
|
||||
|
|
Loading…
Reference in a new issue