fix merge conflict
This commit is contained in:
commit
5f146f90de
2 changed files with 7 additions and 5 deletions
|
@ -28,6 +28,7 @@ public class Constants {
|
||||||
|
|
||||||
public static final long remoteBolusMinDistance = 15 * 60 * 1000L;
|
public static final long remoteBolusMinDistance = 15 * 60 * 1000L;
|
||||||
|
|
||||||
|
|
||||||
// AMA
|
// AMA
|
||||||
public static final int MAX_DAILY_SAFETY_MULTIPLIER = 3;
|
public static final int MAX_DAILY_SAFETY_MULTIPLIER = 3;
|
||||||
public static final int CURRENT_BASAL_SAFETY_MULTIPLIER = 4;
|
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 AUTOSENS_MIN = 0.7d;
|
||||||
public static final double MIN_5M_CARBIMPACT = 3d;
|
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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,6 @@ import info.nightscout.utils.ToastUtils;
|
||||||
*/
|
*/
|
||||||
public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInterface {
|
public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInterface {
|
||||||
public static final String SETTINGS_PREFIX = "CircadianPercentageProfile";
|
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 Logger log = LoggerFactory.getLogger(CircadianPercentageProfilePlugin.class);
|
||||||
|
|
||||||
private static boolean fragmentEnabled = true;
|
private static boolean fragmentEnabled = true;
|
||||||
|
@ -261,13 +259,13 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
|
||||||
}
|
}
|
||||||
|
|
||||||
private void performLimitCheck() {
|
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");
|
String msg = String.format(MainApp.sResources.getString(R.string.openapsma_valueoutofrange), "Profile-Percentage");
|
||||||
log.error(msg);
|
log.error(msg);
|
||||||
MainApp.getConfigBuilder().uploadError(msg);
|
MainApp.getConfigBuilder().uploadError(msg);
|
||||||
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), msg, R.raw.error);
|
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), msg, R.raw.error);
|
||||||
percentage = Math.max(percentage, MIN_PERCENTAGE);
|
percentage = Math.max(percentage, Constants.CPP_MIN_PERCENTAGE);
|
||||||
percentage = Math.min(percentage, MAX_PERCENTAGE);
|
percentage = Math.min(percentage, Constants.CPP_MAX_PERCENTAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue