MDT prefs translatable=false
This commit is contained in:
parent
156ff4ec93
commit
56d6a04e2b
|
@ -31,7 +31,7 @@ public class RileyLinkConst {
|
|||
|
||||
//public static final String PrefPrefix = "pref_rileylink_";
|
||||
//public static final String RileyLinkAddress = PrefPrefix + "mac_address"; // pref_rileylink_mac_address
|
||||
public static final int RileyLinkAddress = R.string.pref_key_rileylink_mac_address;
|
||||
public static final int RileyLinkAddress = R.string.key_rileylink_mac_address;
|
||||
public static final String LastGoodDeviceCommunicationTime = Prefix + "lastGoodDeviceCommunicationTime";
|
||||
public static final String LastGoodDeviceFrequency = Prefix + "LastGoodDeviceFrequency";
|
||||
}
|
||||
|
|
|
@ -367,7 +367,7 @@ public class RFSpy {
|
|||
RileyLinkEncodingType encoding = RileyLinkEncodingType.FourByteSixByteLocal;
|
||||
|
||||
if (RileyLinkFirmwareVersion.isSameVersion(this.firmwareVersion, RileyLinkFirmwareVersion.Version2AndHigher)) {
|
||||
if (SP.getString(MedtronicConst.Prefs.Encoding, "None").equals(MainApp.gs(R.string.medtronic_pump_encoding_4b6b_rileylink))) {
|
||||
if (SP.getString(MedtronicConst.Prefs.Encoding, "None").equals(MainApp.gs(R.string.key_medtronic_pump_encoding_4b6b_rileylink))) {
|
||||
encoding = RileyLinkEncodingType.FourByteSixByteRileyLink;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ public enum RileyLinkEncodingType {
|
|||
|
||||
None(0x00, null), // No encoding on RL
|
||||
Manchester(0x01, null), // Manchester encoding on RL (for Omnipod)
|
||||
FourByteSixByteRileyLink(0x02, R.string.medtronic_pump_encoding_4b6b_rileylink), // 4b6b encoding on RL (for Medtronic)
|
||||
FourByteSixByteLocal(0x00, R.string.medtronic_pump_encoding_4b6b_local), // No encoding on RL, but 4b6b encoding in code
|
||||
FourByteSixByteRileyLink(0x02, R.string.key_medtronic_pump_encoding_4b6b_rileylink), // 4b6b encoding on RL (for Medtronic)
|
||||
FourByteSixByteLocal(0x00, R.string.key_medtronic_pump_encoding_4b6b_local), // No encoding on RL, but 4b6b encoding in code
|
||||
;
|
||||
|
||||
public byte value;
|
||||
|
|
|
@ -212,17 +212,17 @@ public class MedtronicPumpPlugin extends PumpPluginAbstract implements PumpInter
|
|||
private void migrateSettings() {
|
||||
|
||||
if ("US (916 MHz)".equals(SP.getString(MedtronicConst.Prefs.PumpFrequency, null))) {
|
||||
SP.putString(MedtronicConst.Prefs.PumpFrequency, MainApp.gs(R.string.medtronic_pump_frequency_us_ca));
|
||||
SP.putString(MedtronicConst.Prefs.PumpFrequency, MainApp.gs(R.string.key_medtronic_pump_frequency_us_ca));
|
||||
}
|
||||
|
||||
String encoding = SP.getString(MedtronicConst.Prefs.Encoding, null);
|
||||
|
||||
if ("RileyLink 4b6b Encoding".equals(encoding)) {
|
||||
SP.putString(MedtronicConst.Prefs.Encoding, MainApp.gs(R.string.medtronic_pump_encoding_4b6b_rileylink));
|
||||
SP.putString(MedtronicConst.Prefs.Encoding, MainApp.gs(R.string.key_medtronic_pump_encoding_4b6b_rileylink));
|
||||
}
|
||||
|
||||
if ("Local 4b6b Encoding".equals(encoding)) {
|
||||
SP.putString(MedtronicConst.Prefs.Encoding, MainApp.gs(R.string.medtronic_pump_encoding_4b6b_local));
|
||||
SP.putString(MedtronicConst.Prefs.Encoding, MainApp.gs(R.string.key_medtronic_pump_encoding_4b6b_local));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ import info.nightscout.androidaps.R;
|
|||
|
||||
public enum BatteryType {
|
||||
|
||||
None(R.string.medtronic_pump_battery_no, 0, 0),
|
||||
Alkaline(R.string.medtronic_pump_battery_alkaline, 1.20d, 1.47d), //
|
||||
Lithium(R.string.medtronic_pump_battery_lithium, 1.22d, 1.64d);
|
||||
None(R.string.key_medtronic_pump_battery_no, 0, 0),
|
||||
Alkaline(R.string.key_medtronic_pump_battery_alkaline, 1.20d, 1.47d), //
|
||||
Lithium(R.string.key_medtronic_pump_battery_lithium, 1.22d, 1.64d);
|
||||
|
||||
private final String description;
|
||||
public double lowVoltage;
|
||||
|
|
|
@ -134,8 +134,8 @@ public class MedtronicPumpStatus extends PumpStatus {
|
|||
medtronicPumpMap.put("754", PumpType.Medtronic_554_754_Veo);
|
||||
|
||||
frequencies = new String[2];
|
||||
frequencies[0] = MainApp.gs(R.string.medtronic_pump_frequency_us_ca);
|
||||
frequencies[1] = MainApp.gs(R.string.medtronic_pump_frequency_worldwide);
|
||||
frequencies[0] = MainApp.gs(R.string.key_medtronic_pump_frequency_us_ca);
|
||||
frequencies[1] = MainApp.gs(R.string.key_medtronic_pump_frequency_worldwide);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,14 +22,14 @@ public class MedtronicConst {
|
|||
// public static final String Encoding = PrefPrefix + "encoding";
|
||||
// public static final String BatteryType = PrefPrefix + "battery_type";
|
||||
|
||||
public static final int PumpSerial = R.string.pref_key_medtronic_serial;
|
||||
public static final int PumpType = R.string.pref_key_medtronic_pump_type;
|
||||
public static final int PumpFrequency = R.string.pref_key_medtronic_frequency;
|
||||
public static final int MaxBolus = R.string.pref_key_medtronic_max_bolus;
|
||||
public static final int MaxBasal = R.string.pref_key_medtronic_max_basal;
|
||||
public static final int BolusDelay = R.string.pref_key_medtronic_bolus_delay;
|
||||
public static final int Encoding = R.string.pref_key_medtronic_encoding;
|
||||
public static final int BatteryType = R.string.pref_key_medtronic_battery_type;
|
||||
public static final int PumpSerial = R.string.key_medtronic_serial;
|
||||
public static final int PumpType = R.string.key_medtronic_pump_type;
|
||||
public static final int PumpFrequency = R.string.key_medtronic_frequency;
|
||||
public static final int MaxBolus = R.string.key_medtronic_max_bolus;
|
||||
public static final int MaxBasal = R.string.key_medtronic_max_basal;
|
||||
public static final int BolusDelay = R.string.key_medtronic_bolus_delay;
|
||||
public static final int Encoding = R.string.key_medtronic_encoding;
|
||||
public static final int BatteryType = R.string.key_medtronic_battery_type;
|
||||
}
|
||||
|
||||
public class Statistics {
|
||||
|
|
|
@ -176,6 +176,11 @@
|
|||
<item>@string/medtronic_pump_frequency_worldwide</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="medtronicPumpFreqValues">
|
||||
<item>@string/key_medtronic_pump_frequency_us_ca</item>
|
||||
<item>@string/key_medtronic_pump_frequency_worldwide</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="medtronicBolusDelay">
|
||||
<item>5</item>
|
||||
<item>10</item>
|
||||
|
@ -187,10 +192,21 @@
|
|||
<item>@string/medtronic_pump_encoding_4b6b_rileylink</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="medtronicEncodingValues">
|
||||
<item>@string/key_medtronic_pump_encoding_4b6b_local</item>
|
||||
<item>@string/key_medtronic_pump_encoding_4b6b_rileylink</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="medtronicBatteryType">
|
||||
<item>@string/medtronic_pump_battery_no</item>
|
||||
<item>@string/medtronic_pump_battery_alkaline</item>
|
||||
<item>@string/medtronic_pump_battery_lithium</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="medtronicBatteryTypeValues">
|
||||
<item>@string/key_medtronic_pump_battery_no</item>
|
||||
<item>@string/key_medtronic_pump_battery_alkaline</item>
|
||||
<item>@string/key_medtronic_pump_battery_lithium</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1496,15 +1496,22 @@
|
|||
<string name="description_pump_medtronic">Pump integration for Medtronic, requires RileyLink device and specific Pump Model</string>
|
||||
|
||||
<!-- MDT Configuration -->
|
||||
<string name="pref_key_medtronic_serial" translatable="false">pref_medtronic_serial</string>
|
||||
<string name="pref_key_medtronic_pump_type" translatable="false">pref_medtronic_pump_type</string>
|
||||
<string name="pref_key_medtronic_frequency" translatable="false">pref_medtronic_frequency</string>
|
||||
<string name="pref_key_medtronic_max_bolus" translatable="false">pref_medtronic_max_bolus</string>
|
||||
<string name="pref_key_medtronic_max_basal" translatable="false">pref_medtronic_max_basal</string>
|
||||
<string name="pref_key_medtronic_bolus_delay" translatable="false">pref_medtronic_bolus_delay</string>
|
||||
<string name="pref_key_medtronic_encoding" translatable="false">pref_medtronic_encoding</string>
|
||||
<string name="pref_key_medtronic_battery_type" translatable="false">pref_medtronic_battery_type</string>
|
||||
<string name="pref_key_rileylink_mac_address" translatable="false">pref_rileylink_mac_address</string>
|
||||
<string name="key_medtronic_serial" translatable="false">pref_medtronic_serial</string>
|
||||
<string name="key_medtronic_pump_type" translatable="false">pref_medtronic_pump_type</string>
|
||||
<string name="key_medtronic_frequency" translatable="false">pref_medtronic_frequency</string>
|
||||
<string name="key_medtronic_max_bolus" translatable="false">pref_medtronic_max_bolus</string>
|
||||
<string name="key_medtronic_max_basal" translatable="false">pref_medtronic_max_basal</string>
|
||||
<string name="key_medtronic_bolus_delay" translatable="false">pref_medtronic_bolus_delay</string>
|
||||
<string name="key_medtronic_encoding" translatable="false">pref_medtronic_encoding</string>
|
||||
<string name="key_medtronic_battery_type" translatable="false">pref_medtronic_battery_type</string>
|
||||
<string name="key_rileylink_mac_address" translatable="false">pref_rileylink_mac_address</string>
|
||||
<string name="key_medtronic_pump_frequency_us_ca" translatable="false">medtronic_pump_frequency_us_ca</string>
|
||||
<string name="key_medtronic_pump_frequency_worldwide" translatable="false">medtronic_pump_frequency_worldwide</string>
|
||||
<string name="key_medtronic_pump_encoding_4b6b_local" translatable="false">medtronic_pump_encoding_4b6b_local</string>
|
||||
<string name="key_medtronic_pump_encoding_4b6b_rileylink" translatable="false">medtronic_pump_encoding_4b6b_rileylink</string>
|
||||
<string name="key_medtronic_pump_battery_no" translatable="false">medtronic_pump_battery_no</string>
|
||||
<string name="key_medtronic_pump_battery_alkaline" translatable="false">medtronic_pump_battery_alkaline</string>
|
||||
<string name="key_medtronic_pump_battery_lithium" translatable="false">medtronic_pump_battery_lithium</string>
|
||||
|
||||
<string name="medtronic_serial_number">Pump Serial Number</string>
|
||||
<string name="medtronic_pump_type">Pump Type</string>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<EditTextPreference
|
||||
android:defaultValue="000000"
|
||||
android:key="@string/pref_key_medtronic_serial"
|
||||
android:key="@string/key_medtronic_serial"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="false"
|
||||
android:title="@string/medtronic_serial_number" />
|
||||
|
@ -14,21 +14,21 @@
|
|||
android:defaultValue="1"
|
||||
android:entries="@array/medtronicPumpTypeArray"
|
||||
android:entryValues="@array/medtronicPumpTypeArray"
|
||||
android:key="@string/pref_key_medtronic_pump_type"
|
||||
android:key="@string/key_medtronic_pump_type"
|
||||
android:title="@string/medtronic_pump_type" />
|
||||
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="1"
|
||||
android:defaultValue="@string/key_medtronic_pump_frequency_us_ca"
|
||||
android:entries="@array/medtronicPumpFreqArray"
|
||||
android:entryValues="@array/medtronicPumpFreqArray"
|
||||
android:key="@string/pref_key_medtronic_frequency"
|
||||
android:entryValues="@array/medtronicPumpFreqValues"
|
||||
android:key="@string/key_medtronic_frequency"
|
||||
android:selectable="true"
|
||||
android:title="@string/medtronic_pump_frequency" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="35"
|
||||
android:key="@string/pref_key_medtronic_max_basal"
|
||||
android:key="@string/key_medtronic_max_basal"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
<EditTextPreference
|
||||
android:defaultValue="25"
|
||||
android:key="@string/pref_key_medtronic_max_bolus"
|
||||
android:key="@string/key_medtronic_max_bolus"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
|
@ -48,23 +48,23 @@
|
|||
android:defaultValue="10"
|
||||
android:entries="@array/medtronicBolusDelay"
|
||||
android:entryValues="@array/medtronicBolusDelay"
|
||||
android:key="@string/pref_key_medtronic_bolus_delay"
|
||||
android:key="@string/key_medtronic_bolus_delay"
|
||||
android:selectable="true"
|
||||
android:title="@string/medtronic_pump_bolus_delay" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/medtronic_pump_encoding_4b6b_rileylink"
|
||||
android:defaultValue="@string/key_medtronic_pump_encoding_4b6b_rileylink"
|
||||
android:entries="@array/medtronicEncoding"
|
||||
android:entryValues="@array/medtronicEncoding"
|
||||
android:key="@string/pref_key_medtronic_encoding"
|
||||
android:entryValues="@array/medtronicEncodingValues"
|
||||
android:key="@string/key_medtronic_encoding"
|
||||
android:selectable="true"
|
||||
android:title="@string/medtronic_pump_encoding" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/medtronic_pump_battery_no"
|
||||
android:defaultValue="@string/key_medtronic_pump_battery_no"
|
||||
android:entries="@array/medtronicBatteryType"
|
||||
android:entryValues="@array/medtronicBatteryType"
|
||||
android:key="@string/pref_key_medtronic_battery_type"
|
||||
android:entryValues="@array/medtronicBatteryTypeValues"
|
||||
android:key="@string/key_medtronic_battery_type"
|
||||
android:selectable="true"
|
||||
android:title="@string/medtronic_pump_battery_select" />
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
android:enabled="true"
|
||||
android:summary=""
|
||||
android:title="RileyLink Configuration"
|
||||
android:key="@string/pref_key_rileylink_mac_address">
|
||||
android:key="@string/key_rileylink_mac_address">
|
||||
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEScanActivity" />
|
||||
</info.nightscout.androidaps.plugins.pump.common.ui.RileyLinkSelectPreference>
|
||||
|
||||
|
|
Loading…
Reference in a new issue