Merge pull request #126 from AdrianLxM/patch-12
Extended restricted by MAXBOLUS DanaR-plugin
This commit is contained in:
commit
6015930b41
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.DanaR.comm;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.BuildConfig;
|
||||||
import info.nightscout.androidaps.Config;
|
import info.nightscout.androidaps.Config;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ public class MsgSetExtendedBolusStart extends MessageBase {
|
||||||
if (halfhours > 16) halfhours = 16;
|
if (halfhours > 16) halfhours = 16;
|
||||||
amount = MainApp.getConfigBuilder().applyBolusConstraints(amount);
|
amount = MainApp.getConfigBuilder().applyBolusConstraints(amount);
|
||||||
if (amount < 0d) amount = 0d;
|
if (amount < 0d) amount = 0d;
|
||||||
if (amount > 10d) amount = 10d;
|
if (amount > BuildConfig.MAXBOLUS) amount = BuildConfig.MAXBOLUS;
|
||||||
|
|
||||||
AddParamInt((int) (amount * 100));
|
AddParamInt((int) (amount * 100));
|
||||||
AddParamByte(halfhours);
|
AddParamByte(halfhours);
|
||||||
|
|
Loading…
Reference in a new issue