Merge pull request #721 from jamorham/floatmaxbasal
Make openapsama_current_basal_safety_multiplier Double instead of Int
This commit is contained in:
commit
bd6fab3ca3
|
@ -130,7 +130,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 = SP.getInt("openapsama_current_basal_safety_multiplier", 4);
|
Double maxBasalMult = SP.getDouble("openapsama_current_basal_safety_multiplier", 4d);
|
||||||
Integer maxBasalFromDaily = SP.getInt("openapsama_max_daily_safety_multiplier", 3);
|
Integer maxBasalFromDaily = SP.getInt("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;
|
||||||
|
@ -168,7 +168,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
||||||
|
|
||||||
if (absoluteRate < 0) absoluteRate = 0d;
|
if (absoluteRate < 0) absoluteRate = 0d;
|
||||||
|
|
||||||
Integer maxBasalMult = SP.getInt("openapsama_current_basal_safety_multiplier", 4);
|
Double maxBasalMult = SP.getDouble("openapsama_current_basal_safety_multiplier", 4d);
|
||||||
Integer maxBasalFromDaily = SP.getInt("openapsama_max_daily_safety_multiplier", 3);
|
Integer maxBasalFromDaily = SP.getInt("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;
|
||||||
|
|
|
@ -206,7 +206,7 @@ public class DetermineBasalAdapterAMAJS {
|
||||||
mProfile.put("carb_ratio", profile.getIc());
|
mProfile.put("carb_ratio", profile.getIc());
|
||||||
mProfile.put("sens", Profile.toMgdl(profile.getIsf().doubleValue(), units));
|
mProfile.put("sens", Profile.toMgdl(profile.getIsf().doubleValue(), units));
|
||||||
mProfile.put("max_daily_safety_multiplier", SP.getInt("openapsama_max_daily_safety_multiplier", 3));
|
mProfile.put("max_daily_safety_multiplier", SP.getInt("openapsama_max_daily_safety_multiplier", 3));
|
||||||
mProfile.put("current_basal_safety_multiplier", SP.getInt("openapsama_current_basal_safety_multiplier", 4));
|
mProfile.put("current_basal_safety_multiplier", SP.getDouble("openapsama_current_basal_safety_multiplier", 4d));
|
||||||
mProfile.put("skip_neutral_temps", true);
|
mProfile.put("skip_neutral_temps", true);
|
||||||
mProfile.put("current_basal", basalrate);
|
mProfile.put("current_basal", basalrate);
|
||||||
mProfile.put("temptargetSet", tempTargetSet);
|
mProfile.put("temptargetSet", tempTargetSet);
|
||||||
|
|
|
@ -230,7 +230,7 @@ public class DetermineBasalAdapterSMBJS {
|
||||||
mProfile.put("carb_ratio", profile.getIc());
|
mProfile.put("carb_ratio", profile.getIc());
|
||||||
mProfile.put("sens", Profile.toMgdl(profile.getIsf().doubleValue(), units));
|
mProfile.put("sens", Profile.toMgdl(profile.getIsf().doubleValue(), units));
|
||||||
mProfile.put("max_daily_safety_multiplier", SP.getInt("openapsama_max_daily_safety_multiplier", 3));
|
mProfile.put("max_daily_safety_multiplier", SP.getInt("openapsama_max_daily_safety_multiplier", 3));
|
||||||
mProfile.put("current_basal_safety_multiplier", SP.getInt("openapsama_current_basal_safety_multiplier", 4));
|
mProfile.put("current_basal_safety_multiplier", SP.getDouble("openapsama_current_basal_safety_multiplier", 4d));
|
||||||
|
|
||||||
mProfile.put("high_temptarget_raises_sensitivity", SMBDefaults.high_temptarget_raises_sensitivity);
|
mProfile.put("high_temptarget_raises_sensitivity", SMBDefaults.high_temptarget_raises_sensitivity);
|
||||||
mProfile.put("low_temptarget_lowers_sensitivity", SMBDefaults.low_temptarget_lowers_sensitivity);
|
mProfile.put("low_temptarget_lowers_sensitivity", SMBDefaults.low_temptarget_lowers_sensitivity);
|
||||||
|
|
|
@ -63,9 +63,9 @@
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:title="@string/openapsama_current_basal_safety_multiplier"
|
android:title="@string/openapsama_current_basal_safety_multiplier"
|
||||||
validate:maxNumber="10"
|
validate:floatmaxNumber="10"
|
||||||
validate:minNumber="1"
|
validate:floatminNumber="1"
|
||||||
validate:testType="numericRange" />
|
validate:testType="floatNumericRange" />
|
||||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||||
android:defaultValue="1.2"
|
android:defaultValue="1.2"
|
||||||
android:dialogMessage="@string/openapsama_autosens_max_summary"
|
android:dialogMessage="@string/openapsama_autosens_max_summary"
|
||||||
|
|
Loading…
Reference in a new issue