Fix reducing duration of OpenAPS TBRs

This commit is contained in:
Johannes Mockenhaupt 2017-07-15 13:44:14 +02:00
parent e76524a539
commit eab9d8dcd7
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -331,7 +331,7 @@ public class ComboPlugin implements PluginBase, PumpInterface {
pumpEnactResult.comment = "TBR change too small, skipping";
return pumpEnactResult;
}
int stepSize = pumpDescription.tempPercentStep;
int stepSize = pumpDescription.tempDurationStep;
if (durationInMinutes > stepSize) {
log.debug("Reducing requested duration of " + durationInMinutes + "m to minimal duration supported by the pump: " + stepSize + "m");
durationInMinutes = stepSize;