fix not enacting extended

This commit is contained in:
Milos Kozak 2017-02-10 21:45:46 +01:00
parent 40d166cb7d
commit 1e4fa1b93e
2 changed files with 2 additions and 2 deletions

View file

@ -496,7 +496,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
}
// Compare with extended rate in progress
if (Math.abs(getDanaRPump().extendedBolusAbsoluteRate - extendedRateToSet) < 0.02D) { // Allow some rounding diff
if (isExtendedBoluslInProgress() && Math.abs(getDanaRPump().extendedBolusAbsoluteRate - extendedRateToSet) < getPumpDescription().extendedBolusStep) {
// correct extended already set
result.success = true;
result.absolute = getDanaRPump().extendedBolusAbsoluteRate;

View file

@ -496,7 +496,7 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
}
// Compare with extended rate in progress
if (Math.abs(getDanaRPump().extendedBolusAbsoluteRate - extendedRateToSet) < 0.02D) { // Allow some rounding diff
if (isExtendedBoluslInProgress() && Math.abs(getDanaRPump().extendedBolusAbsoluteRate - extendedRateToSet) < getPumpDescription().extendedBolusStep) {
// correct extended already set
result.success = true;
result.absolute = getDanaRPump().extendedBolusAbsoluteRate;