Merge pull request #145 from LadyViktoria/dev
Add prefernces.json to advanced settings
This commit is contained in:
commit
a6871f6b4a
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -7,3 +7,6 @@ wear/wear.iml
|
|||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
*.apk
|
||||
build/
|
||||
**/*.iml
|
||||
|
|
|
@ -105,12 +105,22 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
wearWearApp project(path: ':wear', configuration: 'fullRelease')
|
||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||
compile('com.crashlytics.sdk.android:crashlytics:2.5.7@aar') {
|
||||
transitive = true;
|
||||
}
|
||||
|
||||
compile 'com.android.support:appcompat-v7:23.4.0'
|
||||
compile 'com.android.support:support-v4:23.4.0'
|
||||
compile 'com.android.support:cardview-v7:23.4.0'
|
||||
|
@ -134,4 +144,6 @@ dependencies {
|
|||
androidTestCompile 'org.mockito:mockito-core:2.+'
|
||||
androidTestCompile "com.google.dexmaker:dexmaker:1.2"
|
||||
androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.2"
|
||||
compile(name:'android-edittext-validator-v1.3.4-mod', ext:'aar')
|
||||
|
||||
}
|
||||
|
|
BIN
app/libs/android-edittext-validator-v1.3.4-mod.aar
Normal file
BIN
app/libs/android-edittext-validator-v1.3.4-mod.aar
Normal file
Binary file not shown.
|
@ -25,19 +25,8 @@ public class Constants {
|
|||
public static final long keepAliveMsecs = 5 * 60 * 1000L;
|
||||
|
||||
// SMS COMMUNICATOR
|
||||
|
||||
public static final long remoteBolusMinDistance = 15 * 60 * 1000L;
|
||||
|
||||
|
||||
// AMA
|
||||
public static final int MAX_DAILY_SAFETY_MULTIPLIER = 3;
|
||||
public static final int CURRENT_BASAL_SAFETY_MULTIPLIER = 4;
|
||||
|
||||
public static final int BOLUSSNOOZE_DIA_ADVISOR = 2;
|
||||
public static final double AUTOSENS_MAX = 1.2d;
|
||||
public static final double AUTOSENS_MIN = 0.7d;
|
||||
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;
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.preference.PreferenceFragment;
|
|||
import android.preference.PreferenceGroup;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
|
@ -53,10 +54,10 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
|||
}
|
||||
if (pref instanceof EditTextPreference) {
|
||||
EditTextPreference editTextPref = (EditTextPreference) pref;
|
||||
if (pref.getTitle().toString().toLowerCase().contains("password"))
|
||||
{
|
||||
if (pref.getKey().contains("danar_password")) {
|
||||
pref.setSummary("******");
|
||||
} else if (editTextPref.getText() != null && !editTextPref.getText().equals("")) {
|
||||
((EditTextPreference) pref).setDialogMessage(editTextPref.getDialogMessage());
|
||||
pref.setSummary(editTextPref.getText());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package info.nightscout.androidaps.plugins.OpenAPSAMA;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -14,13 +17,14 @@ import info.nightscout.androidaps.data.IobTotal;
|
|||
import info.nightscout.androidaps.db.BgReading;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
import info.nightscout.utils.Round;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
|
||||
|
||||
public class Autosens {
|
||||
private static Logger log = LoggerFactory.getLogger(Autosens.class);
|
||||
|
||||
public static AutosensResult detectSensitivityandCarbAbsorption(List<BgReading> glucose_data, Long mealTime) {
|
||||
|
||||
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
||||
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||
|
||||
//console.error(mealTime);
|
||||
|
@ -128,7 +132,7 @@ public class Autosens {
|
|||
if (mealTime != null && bgTime > mealTime) {
|
||||
// figure out how many carbs that represents
|
||||
// but always assume at least 3mg/dL/5m (default) absorption
|
||||
double ci = Math.max(deviation, Constants.MIN_5M_CARBIMPACT);
|
||||
double ci = Math.max(deviation, SafeParse.stringToDouble(SP.getString("openapsama_min_5m_carbimpact", "3.0")));
|
||||
double absorbed = ci * profile.getIc(secondsFromMidnight) / sens;
|
||||
// and add that to the running total carbsAbsorbed
|
||||
carbsAbsorbed += absorbed;
|
||||
|
@ -178,8 +182,8 @@ public class Autosens {
|
|||
|
||||
// don't adjust more than 1.5x
|
||||
double rawRatio = ratio;
|
||||
ratio = Math.max(ratio, Constants.AUTOSENS_MIN);
|
||||
ratio = Math.min(ratio, Constants.AUTOSENS_MAX);
|
||||
ratio = Math.max(ratio, SafeParse.stringToDouble(SP.getString("openapsama_autosens_min", "0.7")));
|
||||
ratio = Math.min(ratio, SafeParse.stringToDouble(SP.getString("openapsama_autosens_max", "1.2")));
|
||||
|
||||
if (ratio != rawRatio) {
|
||||
ratioLimit = "Ratio limited from " + rawRatio + " to " + ratio;
|
||||
|
|
|
@ -27,6 +27,7 @@ import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
|||
import info.nightscout.androidaps.plugins.Loop.ScriptReader;
|
||||
import info.nightscout.androidaps.data.IobTotal;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
|
||||
public class DetermineBasalAdapterAMAJS {
|
||||
private static Logger log = LoggerFactory.getLogger(DetermineBasalAdapterAMAJS.class);
|
||||
|
@ -209,7 +210,6 @@ public class DetermineBasalAdapterAMAJS {
|
|||
|
||||
String units = profile.getUnits();
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
||||
boolean autosensAdustTargets = preferences.getBoolean("openapsama_autosens_adjusttargets", false);
|
||||
|
||||
mProfile = new V8Object(mV8rt);
|
||||
mProfile.add("max_iob", maxIob);
|
||||
|
@ -222,13 +222,13 @@ public class DetermineBasalAdapterAMAJS {
|
|||
mProfile.add("target_bg", targetBg);
|
||||
mProfile.add("carb_ratio", profile.getIc(profile.secondsFromMidnight()));
|
||||
mProfile.add("sens", NSProfile.toMgdl(profile.getIsf(NSProfile.secondsFromMidnight()).doubleValue(), units));
|
||||
mProfile.add("max_daily_safety_multiplier", Constants.MAX_DAILY_SAFETY_MULTIPLIER);
|
||||
mProfile.add("current_basal_safety_multiplier", Constants.CURRENT_BASAL_SAFETY_MULTIPLIER);
|
||||
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("skip_neutral_temps", true);
|
||||
mProfile.add("current_basal", pump.getBaseBasalRate());
|
||||
mProfile.add("temptargetSet", tempTargetSet);
|
||||
mProfile.add("autosens_adjust_targets", autosensAdustTargets);
|
||||
mProfile.add("min_5m_carbimpact", min_5m_carbimpact);
|
||||
mProfile.add("autosens_adjust_targets", preferences.getBoolean("openapsama_autosens_adjusttargets", true));
|
||||
mProfile.add("min_5m_carbimpact", SafeParse.stringToDouble(preferences.getString("openapsama_min_5m_carbimpact", "3.0")));
|
||||
mV8rt.add(PARAM_profile, mProfile);
|
||||
|
||||
mCurrentTemp = new V8Object(mV8rt);
|
||||
|
|
|
@ -235,7 +235,7 @@ public class OpenAPSAMAPlugin implements PluginBase, APSInterface {
|
|||
determineBasalAdapterAMAJS.setData(profile, maxIob, maxBasal, minBg, maxBg, targetBg, pump, iobArray, glucoseStatus, mealData,
|
||||
lastAutosensResult.ratio, //autosensDataRatio
|
||||
isTempTarget,
|
||||
Constants.MIN_5M_CARBIMPACT //min_5m_carbimpact
|
||||
SafeParse.stringToDouble(SP.getString("openapsama_min_5m_carbimpact", "3.0"))//min_5m_carbimpact
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -103,8 +103,8 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
|||
if (profile == null) return absoluteRate;
|
||||
if (absoluteRate < 0) absoluteRate = 0d;
|
||||
|
||||
Integer maxBasalMult = Constants.CURRENT_BASAL_SAFETY_MULTIPLIER;
|
||||
Integer maxBasalFromDaily = Constants.MAX_DAILY_SAFETY_MULTIPLIER;
|
||||
Integer maxBasalMult = SafeParse.stringToInt(SP.getString("openapsama_max_basal_safety_multiplier", "4"));
|
||||
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
|
||||
Double origRate = absoluteRate;
|
||||
if (absoluteRate > maxBasal) {
|
||||
|
@ -142,8 +142,8 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
|||
|
||||
if (absoluteRate < 0) absoluteRate = 0d;
|
||||
|
||||
Integer maxBasalMult = Constants.CURRENT_BASAL_SAFETY_MULTIPLIER;
|
||||
Integer maxBasalFromDaily = Constants.MAX_DAILY_SAFETY_MULTIPLIER;
|
||||
Integer maxBasalMult = SafeParse.stringToInt(SP.getString("openapsama_max_basal_safety_multiplier", "4"));
|
||||
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
|
||||
Double origRate = absoluteRate;
|
||||
if (absoluteRate > maxBasal) {
|
||||
|
@ -191,7 +191,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
|||
public Integer applyCarbsConstraints(Integer carbs) {
|
||||
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
||||
try {
|
||||
Integer maxCarbs = Integer.parseInt(SP.getString("treatmentssafety_maxcarbs", "48"));
|
||||
Integer maxCarbs = SafeParse.stringToInt(SP.getString("treatmentssafety_maxcarbs", "48"));
|
||||
|
||||
if (carbs < 0) carbs = 0;
|
||||
if (carbs > maxCarbs) carbs = maxCarbs;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package info.nightscout.androidaps.plugins.Treatments;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import com.j256.ormlite.dao.Dao;
|
||||
import com.j256.ormlite.stmt.PreparedQuery;
|
||||
import com.j256.ormlite.stmt.QueryBuilder;
|
||||
|
@ -26,6 +29,7 @@ import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
|||
import info.nightscout.androidaps.data.IobTotal;
|
||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
|
@ -121,6 +125,7 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
|
|||
|
||||
@Override
|
||||
public IobTotal getCalculationToTime(long time) {
|
||||
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
||||
IobTotal total = new IobTotal(time);
|
||||
|
||||
if (MainApp.getConfigBuilder() == null || ConfigBuilderPlugin.getActiveProfile() == null) // app not initialized yet
|
||||
|
@ -138,7 +143,7 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
|
|||
Iob tIOB = t.iobCalc(now, dia);
|
||||
total.iob += tIOB.iobContrib;
|
||||
total.activity += tIOB.activityContrib;
|
||||
Iob bIOB = t.iobCalc(now, dia / Constants.BOLUSSNOOZE_DIA_ADVISOR);
|
||||
Iob bIOB = t.iobCalc(now, dia / SafeParse.stringToInt(SP.getString("openapsama_bolussnooze_dia_divisor", "2")));
|
||||
total.bolussnooze += bIOB.iobContrib;
|
||||
}
|
||||
return total;
|
||||
|
|
|
@ -328,4 +328,8 @@
|
|||
<string name="configbuilder_shortname">"CONF"</string>
|
||||
<string name="circadian_percentage_profile_shortname">"CPP"</string>
|
||||
<string name="careportal_shortname">"CP"</string>
|
||||
<string name="error_only_numeric_digits_allowed">Bitte verwenden Sie nur Ziffern.</string>
|
||||
<string name="error_field_must_not_be_empty">Pflichtfeld</string>
|
||||
<string name="error_phone_not_valid">Telefonnummer ist nicht gültig.</string>
|
||||
<string name="error_only_numeric_digits_range_allowed">Bitte verwenden Sie nur Ziffern von %1$s - %2$s</string>
|
||||
</resources>
|
||||
|
|
|
@ -402,5 +402,8 @@
|
|||
<string name="timeshift_hint"></string>
|
||||
<string name="units">Unidades:</string>
|
||||
<string name="openapsama_autosens_adjusttargets">Reajuste objetivos por autosens</string>
|
||||
|
||||
<string name="error_only_numeric_digits_allowed">Sólo se permiten caracteres numéricos</string>
|
||||
<string name="error_only_numeric_digits_range_allowed">Sólo se permiten dígitos en el rango %1$s - %2$s</string>
|
||||
<string name="error_field_must_not_be_empty">Este campo no puede estar vacío</string>
|
||||
<string name="error_phone_not_valid">Número de teléfono inválido</string>
|
||||
</resources>
|
||||
|
|
|
@ -211,8 +211,10 @@
|
|||
<string name="el_lang">Greek</string>
|
||||
<string name="openapsma_low_summary">The minimum BG value to be in range.</string>
|
||||
<string name="openapsma_high_summary">The maximum BG value to be in range.</string>
|
||||
<string name="openapsma_maxbasal_summary">Max U/hr a Temp Basal can be set to</string>
|
||||
<string name="openapsma_maxiob_summary">Maximum basal IOB OpenAPS can deliver [U]</string>
|
||||
<string name="openapsma_maxbasal_title">Max U/hr a Temp Basal can be set to</string>
|
||||
<string name="openapsma_maxbasal_summary">This value is called max basal in OpenAPS context</string>
|
||||
<string name="openapsma_maxiob_title">Maximum basal IOB OpenAPS can deliver [U]</string>
|
||||
<string name="openapsma_maxiob_summary">This value is called Max IOB in OpenAPS context\nThis will default to zero. After several days or weeks, depending on your comfort level, you may choose to adjust this number.</string>
|
||||
<string name="bg_lang">Bulgarian</string>
|
||||
<string name="dismiss">DISMISS</string>
|
||||
<string name="language">Language</string>
|
||||
|
@ -264,6 +266,7 @@
|
|||
<string name="careportal_temporarytargetcancel">Temporary Target Cancel</string>
|
||||
<string name="danarprofile">DanaR profile settings</string>
|
||||
<string name="danarprofile_dia">DIA [h]</string>
|
||||
<string name="danarprofile_dia_summary">Duration of Insulin Activity</string>
|
||||
<string name="failedupdatebasalprofile">Failed to update basal profile</string>
|
||||
<string name="danar_history">History</string>
|
||||
<string name="danar_historyreload">Reload</string>
|
||||
|
@ -426,7 +429,6 @@
|
|||
<string name="danar_stats_tbb">Total Base Basal</string>
|
||||
<string name="danar_stats_tbb2">TBB * 2</string>
|
||||
<string name="initializing">Initializing ...</string>
|
||||
<string name="openapsama_autosens_adjusttargets">Allow autosens to adjust targets</string>
|
||||
<string name="actions_shortname">ACT</string>
|
||||
<string name="configbuilder_shortname">CONF</string>
|
||||
<string name="loop_shortname">LOOP</string>
|
||||
|
@ -453,5 +455,25 @@
|
|||
<string name="virtualpump_firmware_label">Firmware:</string>
|
||||
<string formatted="false" name="danar_model">Model: %02X Protocol: %02X Code: %02X</string>
|
||||
<string name="profile">Profile</string>
|
||||
<string name="openapsama_max_daily_safety_multiplier">max_daily_safety_multiplier</string>
|
||||
<string name="openapsama_max_daily_safety_multiplier_summary">Default value: 3\nThis is a key OpenAPS safety cap. What this does is limit your basals to be 3x (in this people) your biggest basal rate. You likely will not need to change this, but you should be aware that’s what is discussed about “3x max daily; 4x current” for safety caps.</string>
|
||||
<string name="openapsama_current_basal_safety_multiplier">current_basal_safety_multiplier</string>
|
||||
<string name="openapsama_current_basal_safety_multiplier_summary">Default value: 4\nThis is the other half of the key OpenAPS safety caps, and the other half of “3x max daily; 4x current” of the safety caps. This means your basal, regardless of max basal set on your pump, cannot be any higher than this number times the current level of your basal. This is to prevent people from getting into dangerous territory by setting excessively high max basals before understanding how the algorithm works. Again, the default is 4x; most people will never need to adjust this and are instead more likely to need to adjust other settings if they feel like they are “running into” this safety cap.</string>
|
||||
<string name="openapsama_autosens_max">autosens_max</string>
|
||||
<string name="openapsama_autosens_max_summary">Default value: 1.2\nThis is a multiplier cap for autosens (and soon autotune) to set a 20% max limit on how high the autosens ratio can be, which in turn determines how high autosens can adjust basals, how low it can adjust ISF, and how low it can set the BG target.</string>
|
||||
<string name="openapsama_autosens_min">autosens_min</string>
|
||||
<string name="openapsama_autosens_min_summary">Default value: 0.7\nThe other side of the autosens safety limits, putting a cap on how low autosens can adjust basals, and how high it can adjust ISF and BG targets.</string>
|
||||
<string name="openapsama_autosens_adjusttargets">autosens_adjust_targets</string>
|
||||
<string name="openapsama_autosens_adjusttargets_summary">Default value: true\nThis is used to allow autosens to adjust BG targets, in addition to ISF and basals.</string>
|
||||
<string name="openapsama_bolussnooze_dia_divisor">bolussnooze_dia_divisor</string>
|
||||
<string name="openapsama_bolussnooze_dia_divisor_summary">Default value: 2\nBolus snooze is enacted after you do a meal bolus, so the loop won’t counteract with low temps when you’ve just eaten. The example here and default is 2; so a 3 hour DIA means that bolus snooze will be gradually phased out over 1.5 hours (3DIA/2).</string>
|
||||
<string name="openapsama_min_5m_carbimpact">min_5m_carbimpact</string>
|
||||
<string name="openapsama_min_5m_carbimpact_summary">Default value: 3.0\nThis is a setting for default carb absorption impact per 5 minutes. The default is an expected 3mg/dl/5min. This affects how fast COB are decayed, and how much carb absorption is assumed in calculating future predicted BG, when BG is falling more than expected, or not rising as much as expected.</string>
|
||||
<string name="openapsama_link_to_preferncejson_doc_txt">Attention!\nNormally you do not have to change these values below. Please CLICK HERE and READ the text and make sure you UNDERSTAND it before change any of these values.</string>
|
||||
<string name="openapsama_link_to_preferncejson_doc">http://openaps.readthedocs.io/en/latest/docs/walkthrough/phase-3/beyond-low-glucose-suspend.html</string>
|
||||
<string name="error_only_numeric_digits_allowed">Only numeric digits are allowed.</string>
|
||||
<string name="error_only_numeric_digits_range_allowed">Only numeric digits within the range %1$s - %2$s are allowed.</string>
|
||||
<string name="error_field_must_not_be_empty">The field must not be empty</string>
|
||||
<string name="error_phone_not_valid">Phone number not valid</string>
|
||||
<string name="smscommunicator_invalidphonennumber">Invalid SMS phone number</string>
|
||||
</resources>
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.base" parent="Theme.AppCompat.NoActionBar"></style>
|
||||
<style name="AppTheme.base" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="android:textColorSecondary">@color/mdtp_white</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:key="advanced"
|
||||
android:title="@string/advancedsettings_title">
|
||||
|
@ -25,6 +26,95 @@
|
|||
android:title="@string/always_use_shortavg"
|
||||
android:summary="@string/always_use_shortavg_summary"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:title="OpenAPS preferences.json">
|
||||
<Preference
|
||||
android:summary="@string/openapsama_link_to_preferncejson_doc_txt" >
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="@string/openapsama_link_to_preferncejson_doc" />
|
||||
</Preference>
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
validate:testType="numericRange"
|
||||
validate:minNumber="1"
|
||||
validate:maxNumber="10"
|
||||
android:digits="0123456789.,"
|
||||
android:defaultValue="3"
|
||||
android:selectAllOnFocus="true"
|
||||
android:inputType="number"
|
||||
android:maxLines="20"
|
||||
android:title="@string/openapsama_max_daily_safety_multiplier"
|
||||
android:dialogMessage="@string/openapsama_max_daily_safety_multiplier_summary"
|
||||
android:key="openapsama_max_daily_safety_multiplier" />
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
validate:testType="numericRange"
|
||||
validate:minNumber="1"
|
||||
validate:maxNumber="10"
|
||||
android:digits="0123456789.,"
|
||||
android:defaultValue="4"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
android:maxLines="20"
|
||||
android:title="@string/openapsama_current_basal_safety_multiplier"
|
||||
android:dialogMessage="@string/openapsama_current_basal_safety_multiplier_summary"
|
||||
android:key="openapsama_current_basal_safety_multiplier" />
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
validate:testType="floatNumericRange"
|
||||
validate:floatminNumber="0.5"
|
||||
validate:floatmaxNumber="3"
|
||||
android:digits="0123456789.,"
|
||||
android:defaultValue="1.2"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="20"
|
||||
android:title="@string/openapsama_autosens_max"
|
||||
android:dialogMessage="@string/openapsama_autosens_max_summary"
|
||||
android:key="openapsama_autosens_max" />
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
validate:testType="floatNumericRange"
|
||||
validate:floatminNumber="0.1"
|
||||
validate:floatmaxNumber="1.0"
|
||||
android:defaultValue="0.7"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="20"
|
||||
android:title="@string/openapsama_autosens_min"
|
||||
android:dialogMessage="@string/openapsama_autosens_min_summary"
|
||||
android:key="openapsama_autosens_min" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="openapsama_autosens_adjusttargets"
|
||||
android:title="@string/openapsama_autosens_adjusttargets"
|
||||
android:summary="@string/openapsama_autosens_adjusttargets_summary"/>
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
validate:testType="numericRange"
|
||||
validate:minNumber="1"
|
||||
validate:maxNumber="5"
|
||||
android:digits="0123456789.,"
|
||||
android:defaultValue="2"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
android:maxLines="20"
|
||||
android:title="@string/openapsama_bolussnooze_dia_divisor"
|
||||
android:dialogMessage="@string/openapsama_bolussnooze_dia_divisor_summary"
|
||||
android:key="openapsama_bolussnooze_dia_divisor" />
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
validate:testType="floatNumericRange"
|
||||
validate:floatminNumber="0.1"
|
||||
validate:floatmaxNumber="5.0"
|
||||
android:defaultValue="3.0"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxLines="20"
|
||||
android:title="@string/openapsama_min_5m_carbimpact"
|
||||
android:dialogMessage="@string/openapsama_min_5m_carbimpact_summary"
|
||||
android:key="openapsama_min_5m_carbimpact" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
android:defaultValue=""
|
||||
android:key="danarprofile_dia"
|
||||
android:numeric="decimal"
|
||||
android:dialogMessage="@string/danarprofile_dia_summary"
|
||||
android:title="@string/danarprofile_dia" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
|
|
@ -9,13 +9,6 @@
|
|||
android:key="openapsama_useautosens"
|
||||
android:title="@string/openapsama_useautosens" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="openapsama_autosens_adjusttargets"
|
||||
android:dependency="openapsama_useautosens"
|
||||
android:title="@string/openapsama_autosens_adjusttargets"/>
|
||||
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
|
@ -24,11 +24,13 @@
|
|||
android:defaultValue="1"
|
||||
android:key="openapsma_max_basal"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapsma_maxbasal_summary" />
|
||||
android:dialogMessage="@string/openapsma_maxbasal_summary"
|
||||
android:title="@string/openapsma_maxbasal_title" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="1.5"
|
||||
android:key="openapsma_max_iob"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapsma_maxiob_summary" />
|
||||
android:dialogMessage="@string/openapsma_maxiob_summary"
|
||||
android:title="@string/openapsma_maxiob_title" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
Loading…
Reference in a new issue