Merge pull request #2452 from StephenBrown2/add_mdt_nimh

Add NiMH battery option for Medtronic pumps
This commit is contained in:
Milos Kozak 2020-03-21 15:34:54 +01:00 committed by GitHub
commit 34434ffc62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View file

@ -40,11 +40,12 @@ public class BatteryStatusDTO {
public String toString() {
return String.format(Locale.ENGLISH, "BatteryStatusDTO [voltage=%.2f, alkaline=%d, lithium=%d, niZn={}]",
return String.format(Locale.ENGLISH, "BatteryStatusDTO [voltage=%.2f, alkaline=%d, lithium=%d, niZn=%d, nimh=%d]",
voltage == null ? 0.0f : voltage,
getCalculatedPercent(BatteryType.Alkaline),
getCalculatedPercent(BatteryType.Lithium),
getCalculatedPercent(BatteryType.NiZn));
getCalculatedPercent(BatteryType.NiZn),
getCalculatedPercent(BatteryType.NiMH));
}

View file

@ -15,7 +15,8 @@ public enum BatteryType {
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), //
NiZn(R.string.key_medtronic_pump_battery_nizn, 1.40d, 1.70d) //
NiZn(R.string.key_medtronic_pump_battery_nizn, 1.40d, 1.70d), //
NiMH(R.string.key_medtronic_pump_battery_nimh, 1.10d, 1.40d) //
;
private final String description;

View file

@ -191,6 +191,7 @@
<item>@string/medtronic_pump_battery_alkaline</item>
<item>@string/medtronic_pump_battery_lithium</item>
<item>@string/medtronic_pump_battery_nizn</item>
<item>@string/medtronic_pump_battery_nimh</item>
</string-array>
<string-array name="medtronicBatteryTypeValues">
@ -198,6 +199,7 @@
<item>@string/key_medtronic_pump_battery_alkaline</item>
<item>@string/key_medtronic_pump_battery_lithium</item>
<item>@string/key_medtronic_pump_battery_nizn</item>
<item>@string/key_medtronic_pump_battery_nimh</item>
</string-array>
<string-array name="smbMaxMinutes">

View file

@ -1443,6 +1443,7 @@
<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="key_medtronic_pump_battery_nizn" translatable="false">medtronic_pump_battery_nizn</string>
<string name="key_medtronic_pump_battery_nimh" translatable="false">medtronic_pump_battery_nimh</string>
<string name="medtronic_serial_number">Pump Serial Number</string>
<string name="medtronic_pump_type">Pump Type</string>
@ -1463,6 +1464,7 @@
<string name="medtronic_pump_battery_alkaline">Alkaline (Extended view)</string>
<string name="medtronic_pump_battery_lithium">Lithium (Extended view)</string>
<string name="medtronic_pump_battery_nizn">NiZn (Extended view)</string>
<string name="medtronic_pump_battery_nimh">NiMH (Extended view)</string>
<string name="medtronic_bolus_debugging">Bolus/Treatments Debugging</string>
<!-- RL BLE Scanning -->