Merge pull request #126 from AdrianLxM/patch-12

Extended restricted by MAXBOLUS DanaR-plugin
This commit is contained in:
Milos Kozak 2017-01-13 19:41:49 +01:00 committed by GitHub
commit 6015930b41

View file

@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.DanaR.comm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.BuildConfig;
import info.nightscout.androidaps.Config;
import info.nightscout.androidaps.MainApp;
@ -21,7 +22,7 @@ public class MsgSetExtendedBolusStart extends MessageBase {
if (halfhours > 16) halfhours = 16;
amount = MainApp.getConfigBuilder().applyBolusConstraints(amount);
if (amount < 0d) amount = 0d;
if (amount > 10d) amount = 10d;
if (amount > BuildConfig.MAXBOLUS) amount = BuildConfig.MAXBOLUS;
AddParamInt((int) (amount * 100));
AddParamByte(halfhours);