Merge pull request #500 from jotomo/prevent-gaps-in-tbr
ConfigBuilder.applyAPSRequest: set new TBR if current TBR expires bef…
This commit is contained in:
commit
62527ab33b
|
@ -584,7 +584,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