CB.applyTBRRequest: enact same-rate TBR ...

if requested duration is at least 30m longer than the currently
running TBR.
This commit is contained in:
Johannes Mockenhaupt 2018-03-19 13:33:40 +01:00
parent f918a5f303
commit ede1e719d2
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -395,6 +395,7 @@ public class ConfigBuilderPlugin implements PluginBase, ConstraintsInterface, Tr
}
} else if (activeTemp != null
&& activeTemp.getPlannedRemainingMinutes() > 5
&& request.duration - activeTemp.getPlannedRemainingMinutes() < 30
&& Math.abs(request.rate - activeTemp.tempBasalConvertedToAbsolute(now, profile)) < pump.getPumpDescription().basalStep) {
if (Config.logCongigBuilderActions)
log.debug("applyAPSRequest: Temp basal set correctly");