allow some diff on profile check

This commit is contained in:
Milos Kozak 2017-01-19 18:07:16 +01:00
parent e808bcedee
commit 649cab63fc

View file

@ -252,7 +252,7 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
for (int h = 0; h < basalValues; h++) {
Double pumpValue = pump.pumpProfiles[pump.activeProfile][h];
Double profileValue = profile.getBasal(h * basalIncrement);
if (!pumpValue.equals(profileValue)) {
if (Math.abs(pumpValue - profileValue) > getPumpDescription().basalStep) {
log.debug("Diff found. Hour: " + h + " Pump: " + pumpValue + " Profile: " + profileValue);
return false;
}