diff --git a/app/src/main/java/info/nightscout/androidaps/Constants.java b/app/src/main/java/info/nightscout/androidaps/Constants.java index b5c19d5823..37e358f974 100644 --- a/app/src/main/java/info/nightscout/androidaps/Constants.java +++ b/app/src/main/java/info/nightscout/androidaps/Constants.java @@ -28,6 +28,7 @@ public class Constants { public static final long remoteBolusMinDistance = 15 * 60 * 1000L; + // AMA public static final int MAX_DAILY_SAFETY_MULTIPLIER = 3; public static final int CURRENT_BASAL_SAFETY_MULTIPLIER = 4; @@ -37,4 +38,7 @@ public class Constants { public static final double AUTOSENS_MIN = 0.7d; public static final double MIN_5M_CARBIMPACT = 3d; + // Circadian Percentage Profile + public static final int CPP_MIN_PERCENTAGE = 50; + public static final int CPP_MAX_PERCENTAGE = 200; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java index 396b67fafc..019c1b9677 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfilePlugin.java @@ -26,8 +26,6 @@ import info.nightscout.utils.ToastUtils; */ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInterface { public static final String SETTINGS_PREFIX = "CircadianPercentageProfile"; - public static final int MIN_PERCENTAGE = 50; - public static final int MAX_PERCENTAGE = 200; private static Logger log = LoggerFactory.getLogger(CircadianPercentageProfilePlugin.class); private static boolean fragmentEnabled = true; @@ -261,13 +259,13 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte } private void performLimitCheck() { - if (percentage < MIN_PERCENTAGE || percentage > MAX_PERCENTAGE){ + if (percentage < Constants.CPP_MIN_PERCENTAGE || percentage > Constants.CPP_MAX_PERCENTAGE){ String msg = String.format(MainApp.sResources.getString(R.string.openapsma_valueoutofrange), "Profile-Percentage"); log.error(msg); MainApp.getConfigBuilder().uploadError(msg); ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), msg, R.raw.error); - percentage = Math.max(percentage, MIN_PERCENTAGE); - percentage = Math.min(percentage, MAX_PERCENTAGE); + percentage = Math.max(percentage, Constants.CPP_MIN_PERCENTAGE); + percentage = Math.min(percentage, Constants.CPP_MAX_PERCENTAGE); } }