Make openapsama_current_basal_safety_multiplier Double instead of Integer
This commit is contained in:
parent
4b630a1ac6
commit
805548dd1e
4 changed files with 7 additions and 7 deletions
|
@ -130,7 +130,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
|||
if (profile == null) return absoluteRate;
|
||||
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);
|
||||
// Check percentRate but absolute rate too, because we know real current basal in pump
|
||||
Double origRate = absoluteRate;
|
||||
|
@ -168,7 +168,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
|||
|
||||
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);
|
||||
// Check percentRate but absolute rate too, because we know real current basal in pump
|
||||
Double origRate = absoluteRate;
|
||||
|
|
|
@ -206,7 +206,7 @@ public class DetermineBasalAdapterAMAJS {
|
|||
mProfile.put("carb_ratio", profile.getIc());
|
||||
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("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("current_basal", basalrate);
|
||||
mProfile.put("temptargetSet", tempTargetSet);
|
||||
|
|
|
@ -230,7 +230,7 @@ public class DetermineBasalAdapterSMBJS {
|
|||
mProfile.put("carb_ratio", profile.getIc());
|
||||
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("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("low_temptarget_lowers_sensitivity", SMBDefaults.low_temptarget_lowers_sensitivity);
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/openapsama_current_basal_safety_multiplier"
|
||||
validate:maxNumber="10"
|
||||
validate:minNumber="1"
|
||||
validate:testType="numericRange" />
|
||||
validate:floatmaxNumber="10"
|
||||
validate:floatminNumber="1"
|
||||
validate:testType="floatNumericRange" />
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
android:defaultValue="1.2"
|
||||
android:dialogMessage="@string/openapsama_autosens_max_summary"
|
||||
|
|
Loading…
Reference in a new issue