Make min SMB Bolus configurable

This commit is contained in:
Tim Gunn 2018-10-25 18:27:21 +13:00
parent ff2f6a8bfb
commit 4bc8025ad4
3 changed files with 17 additions and 2 deletions

View file

@ -257,7 +257,7 @@ public class DetermineBasalAdapterSMBJS {
mProfile.put("enableSMB_after_carbs", SP.getBoolean(R.string.key_enableSMB_after_carbs, false) && advancedFiltering); mProfile.put("enableSMB_after_carbs", SP.getBoolean(R.string.key_enableSMB_after_carbs, false) && advancedFiltering);
mProfile.put("maxSMBBasalMinutes", SP.getInt("key_smbmaxminutes", SMBDefaults.maxSMBBasalMinutes)); mProfile.put("maxSMBBasalMinutes", SP.getInt("key_smbmaxminutes", SMBDefaults.maxSMBBasalMinutes));
mProfile.put("maxUAMSMBBasalMinutes", SP.getInt("key_uamsmbmaxminutes", SMBDefaults.maxUAMSMBBasalMinutes)); mProfile.put("maxUAMSMBBasalMinutes", SP.getInt("key_uamsmbmaxminutes", SMBDefaults.maxUAMSMBBasalMinutes));
mProfile.put("bolus_increment", SMBDefaults.bolus_increment); mProfile.put("bolus_increment", SP.getDouble("key_bolus_increment", SMBDefaults.bolus_increment));
mProfile.put("carbsReqThreshold", SMBDefaults.carbsReqThreshold); mProfile.put("carbsReqThreshold", SMBDefaults.carbsReqThreshold);
mProfile.put("current_basal", basalrate); mProfile.put("current_basal", basalrate);

View file

@ -803,7 +803,8 @@
<string name="smbmaxminutes" translatable="false">45 60 75 90 105 120</string> <string name="smbmaxminutes" translatable="false">45 60 75 90 105 120</string>
<string name="smbmaxminutes_summary">Max minutes of basal to limit SMB to</string> <string name="smbmaxminutes_summary">Max minutes of basal to limit SMB to</string>
<string name="uamsmbmaxminutes" translatable="false">45 60 75 90 105 120</string> <string name="uamsmbmaxminutes" translatable="false">45 60 75 90 105 120</string>
<string name="uamsmbmaxminutes_summary">Max minutes of basal to limit SMB to when UAM is active</string> <string name="uamsmbmaxminutes_summary">Max minutes of basal to limit SMB to for UAM</string>
<string name="bolus_increment_summary">Minimum bolus that can be delivered as an SMB</string>
<string name="unsupportedfirmware">Unsupported pump firmware</string> <string name="unsupportedfirmware">Unsupported pump firmware</string>
<string name="dexcomg5_xdripupload_title">Send BG data to xDrip+</string> <string name="dexcomg5_xdripupload_title">Send BG data to xDrip+</string>
<string name="key_dexcomg5_xdripupload" translatable="false">dexcomg5_xdripupload</string> <string name="key_dexcomg5_xdripupload" translatable="false">dexcomg5_xdripupload</string>

View file

@ -93,6 +93,20 @@
validate:minNumber="15" validate:minNumber="15"
validate:testType="numericRange" /> validate:testType="numericRange" />
<com.andreabaccega.widget.ValidatingEditTextPreference
android:defaultValue="0.1"
android:digits="0123456789."
android:inputType="numberDecimal"
android:maxLines="20"
android:key="key_bolus_increment"
android:selectAllOnFocus="true"
android:singleLine="true"
android:title="@string/bolus_increment_summary"
validate:maxNumber='1'
validate:minNumber='0'
validate:testType="floatNumericRange" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/key_use_uam" android:key="@string/key_use_uam"