Merge pull request #181 from LadyViktoria/dev
fix key for openapsama_current_basal_safety_multiplier
This commit is contained in:
commit
404d585838
|
@ -223,7 +223,7 @@ public class DetermineBasalAdapterAMAJS {
|
||||||
mProfile.add("carb_ratio", profile.getIc(profile.secondsFromMidnight()));
|
mProfile.add("carb_ratio", profile.getIc(profile.secondsFromMidnight()));
|
||||||
mProfile.add("sens", NSProfile.toMgdl(profile.getIsf(NSProfile.secondsFromMidnight()).doubleValue(), units));
|
mProfile.add("sens", NSProfile.toMgdl(profile.getIsf(NSProfile.secondsFromMidnight()).doubleValue(), units));
|
||||||
mProfile.add("max_daily_safety_multiplier", SafeParse.stringToInt(preferences.getString("openapsama_max_daily_safety_multiplier", "3")));
|
mProfile.add("max_daily_safety_multiplier", SafeParse.stringToInt(preferences.getString("openapsama_max_daily_safety_multiplier", "3")));
|
||||||
mProfile.add("current_basal_safety_multiplier", SafeParse.stringToInt(preferences.getString("openapsama_max_basal_safety_multiplier", "4")));
|
mProfile.add("current_basal_safety_multiplier", SafeParse.stringToInt(preferences.getString("openapsama_current_basal_safety_multiplier", "4")));
|
||||||
mProfile.add("skip_neutral_temps", true);
|
mProfile.add("skip_neutral_temps", true);
|
||||||
mProfile.add("current_basal", pump.getBaseBasalRate());
|
mProfile.add("current_basal", pump.getBaseBasalRate());
|
||||||
mProfile.add("temptargetSet", tempTargetSet);
|
mProfile.add("temptargetSet", tempTargetSet);
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
||||||
if (profile == null) return absoluteRate;
|
if (profile == null) return absoluteRate;
|
||||||
if (absoluteRate < 0) absoluteRate = 0d;
|
if (absoluteRate < 0) absoluteRate = 0d;
|
||||||
|
|
||||||
Integer maxBasalMult = SafeParse.stringToInt(SP.getString("openapsama_max_basal_safety_multiplier", "4"));
|
Integer maxBasalMult = SafeParse.stringToInt(SP.getString("openapsama_current_basal_safety_multiplier", "4"));
|
||||||
Integer maxBasalFromDaily = SafeParse.stringToInt(SP.getString("openapsama_max_daily_safety_multiplier", "3"));
|
Integer maxBasalFromDaily = SafeParse.stringToInt(SP.getString("openapsama_max_daily_safety_multiplier", "3"));
|
||||||
// Check percentRate but absolute rate too, because we know real current basal in pump
|
// Check percentRate but absolute rate too, because we know real current basal in pump
|
||||||
Double origRate = absoluteRate;
|
Double origRate = absoluteRate;
|
||||||
|
@ -142,7 +142,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
||||||
|
|
||||||
if (absoluteRate < 0) absoluteRate = 0d;
|
if (absoluteRate < 0) absoluteRate = 0d;
|
||||||
|
|
||||||
Integer maxBasalMult = SafeParse.stringToInt(SP.getString("openapsama_max_basal_safety_multiplier", "4"));
|
Integer maxBasalMult = SafeParse.stringToInt(SP.getString("openapsama_current_basal_safety_multiplier", "4"));
|
||||||
Integer maxBasalFromDaily = SafeParse.stringToInt(SP.getString("openapsama_max_daily_safety_multiplier", "3"));
|
Integer maxBasalFromDaily = SafeParse.stringToInt(SP.getString("openapsama_max_daily_safety_multiplier", "3"));
|
||||||
// Check percentRate but absolute rate too, because we know real current basal in pump
|
// Check percentRate but absolute rate too, because we know real current basal in pump
|
||||||
Double origRate = absoluteRate;
|
Double origRate = absoluteRate;
|
||||||
|
|
Loading…
Reference in a new issue