From b1486c5ed6f6b8cbd9b5441d21efc7b422bbe4c1 Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Sun, 18 Aug 2019 09:16:16 +0100 Subject: [PATCH 1/3] - fixing the problem with minimal bolus that can be used for Medtronic Pumps. --- .../plugins/pump/medtronic/driver/MedtronicPumpStatus.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.java index ff7ff9f608..29387b0724 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.java @@ -182,6 +182,7 @@ public class MedtronicPumpStatus extends PumpStatus { } else { this.pumpType = medtronicPumpMap.get(pumpTypePart); this.medtronicDeviceType = medtronicDeviceTypeMap.get(pumpTypePart); + this.pumpDescription.setPumpDescription(this.pumpType); if (pumpTypePart.startsWith("7")) this.reservoirFullUnits = 300; From 7946e3ad737476a85d60cac21ac54bcb6a92bda4 Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Tue, 20 Aug 2019 09:00:34 +0100 Subject: [PATCH 2/3] - changed bolus configuration for 523 and 554 --- .../androidaps/plugins/pump/common/defs/DoseStepSize.java | 3 +++ .../androidaps/plugins/pump/common/defs/PumpType.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java index c22f73ab3d..61e7327478 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java @@ -26,6 +26,9 @@ public enum DoseStepSize new DoseStepSizeEntry(0f, 1f, 0.025f), // new DoseStepSizeEntry(1f, 10f, 0.05f), // new DoseStepSizeEntry(10f, Double.MAX_VALUE, 0.1f)), // + MedtronicVeoBolus( // + new DoseStepSizeEntry(0f, 1f, 0.025f), // + new DoseStepSizeEntry(1f, Double.MAX_VALUE, 0.05f)) // ; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java index e031cdde9e..c7b94ec6ee 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java @@ -107,7 +107,7 @@ public enum PumpType { Medtronic_515_715("Medtronic 515/715", "515/715", Medtronic_512_712), Medtronic_522_722("Medtronic 522/722", "522/722", Medtronic_512_712), - Medtronic_523_723_Revel("Medtronic 523/723 (Revel)", ManufacturerType.Medtronic, "523/723 (Revel)", 0.05d, null, // + Medtronic_523_723_Revel("Medtronic 523/723 (Revel)", ManufacturerType.Medtronic, "523/723 (Revel)", 0.025d, DoseStepSize.MedtronicVeoBolus, // new DoseSettings(0.05d, 30, 8 * 60, 0.05d), // PumpTempBasalType.Absolute, // new DoseSettings(0.05d, 30, 24*60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, // From b48fec462406ecce59c53d00a84ec0bd61a22787 Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Wed, 28 Aug 2019 19:29:18 +0100 Subject: [PATCH 3/3] - changed bolus step to 0.05 for 523 and 554 --- .../pump/common/defs/DoseStepSize.java | 28 ++++++------------- .../plugins/pump/common/defs/PumpType.java | 27 ++++++++---------- 2 files changed, 19 insertions(+), 36 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java index 61e7327478..86a67ffc3d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/DoseStepSize.java @@ -4,8 +4,7 @@ package info.nightscout.androidaps.plugins.pump.common.defs; * Created by andy on 02/05/2018. */ -public enum DoseStepSize -{ +public enum DoseStepSize { ComboBasal( // new DoseStepSizeEntry(0f, 1f, 0.01f), // @@ -26,31 +25,25 @@ public enum DoseStepSize new DoseStepSizeEntry(0f, 1f, 0.025f), // new DoseStepSizeEntry(1f, 10f, 0.05f), // new DoseStepSizeEntry(10f, Double.MAX_VALUE, 0.1f)), // - MedtronicVeoBolus( // - new DoseStepSizeEntry(0f, 1f, 0.025f), // - new DoseStepSizeEntry(1f, Double.MAX_VALUE, 0.05f)) // - ; DoseStepSizeEntry[] entries; - DoseStepSize(DoseStepSizeEntry...entries) - { + DoseStepSize(DoseStepSizeEntry... entries) { this.entries = entries; } - public double getStepSizeForAmount(double amount) - { + public double getStepSizeForAmount(double amount) { for (DoseStepSizeEntry entry : entries) { if (entry.from <= amount && entry.to > amount) return entry.value; } // should never come to this - return entries[entries.length-1].value; + return entries[entries.length - 1].value; } @@ -64,12 +57,9 @@ public enum DoseStepSize sb.append(entry.from); sb.append("-"); - if (entry.to == Double.MAX_VALUE) - { + if (entry.to == Double.MAX_VALUE) { sb.append("~}"); - } - else - { + } else { sb.append(entry.to); sb.append("}, "); } @@ -79,15 +69,13 @@ public enum DoseStepSize } - static class DoseStepSizeEntry - { + static class DoseStepSizeEntry { double from; double to; double value; // to = this value is not included, but would actually mean <, so for rates between 0.025-0.975 u/h, we would have [from=0, to=10] - DoseStepSizeEntry(double from, double to, double value) - { + DoseStepSizeEntry(double from, double to, double value) { this.from = from; this.to = to; this.value = value; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java index c7b94ec6ee..9e47bf71dd 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java @@ -13,7 +13,7 @@ import info.nightscout.androidaps.utils.Round; /** * Created by andy on 02/05/2018. - * + *

* Most of this defintions is intended for VirtualPump only, but they can be used by other plugins. */ @@ -60,7 +60,7 @@ public enum PumpType { 0.02d, 0.01d, DoseStepSize.InsightBolus, PumpCapability.InsightCapabilities), // // Animas - AnimasVibe("Animas Vibe",ManufacturerType.Animas, "Vibe", 0.05d, null, // AnimasBolus? + AnimasVibe("Animas Vibe", ManufacturerType.Animas, "Vibe", 0.05d, null, // AnimasBolus? new DoseSettings(0.05d, 30, 12 * 60, 0.05d), // PumpTempBasalType.Percent, // new DoseSettings(10, 30, 24 * 60, 0d, 300d), PumpCapability.BasalRate_Duration30minAllowed, // @@ -101,16 +101,16 @@ public enum PumpType { Medtronic_512_712("Medtronic 512/712", ManufacturerType.Medtronic, "512/712", 0.1d, null, // new DoseSettings(0.05d, 30, 8 * 60, 0.05d), // PumpTempBasalType.Absolute, // - new DoseSettings(0.05d, 30, 24*60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, // + new DoseSettings(0.05d, 30, 24 * 60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, // 0.05d, 0.05d, null, PumpCapability.MedtronicCapabilities), // Medtronic_515_715("Medtronic 515/715", "515/715", Medtronic_512_712), Medtronic_522_722("Medtronic 522/722", "522/722", Medtronic_512_712), - Medtronic_523_723_Revel("Medtronic 523/723 (Revel)", ManufacturerType.Medtronic, "523/723 (Revel)", 0.025d, DoseStepSize.MedtronicVeoBolus, // + Medtronic_523_723_Revel("Medtronic 523/723 (Revel)", ManufacturerType.Medtronic, "523/723 (Revel)", 0.05d, null, // new DoseSettings(0.05d, 30, 8 * 60, 0.05d), // PumpTempBasalType.Absolute, // - new DoseSettings(0.05d, 30, 24*60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, // + new DoseSettings(0.05d, 30, 24 * 60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, // 0.025d, 0.025d, DoseStepSize.MedtronicVeoBasal, PumpCapability.MedtronicCapabilities), // Medtronic_554_754_Veo("Medtronic 554/754 (Veo)", "554/754 (Veo)", Medtronic_523_723_Revel), // TODO @@ -133,8 +133,7 @@ public enum PumpType { TandemTSlimX2("Tandem t:slim X2", "t:slim X2", TandemTSlim), // // MDI - MDI("MDI", ManufacturerType.AndroidAPS, "MDI") - ; + MDI("MDI", ManufacturerType.AndroidAPS, "MDI"); private String description; @@ -164,24 +163,21 @@ public enum PumpType { } - PumpType(String description, String model, PumpType parent) - { + PumpType(String description, String model, PumpType parent) { this.description = description; this.parent = parent; this.model = model; } - PumpType(String description, ManufacturerType manufacturer, String model) - { + PumpType(String description, ManufacturerType manufacturer, String model) { this.description = description; this.manufacturer = manufacturer; this.model = model; } - PumpType(String description, String model, PumpType parent, PumpCapability pumpCapability) - { + PumpType(String description, String model, PumpType parent, PumpCapability pumpCapability) { this.description = description; this.parent = parent; this.pumpCapability = pumpCapability; @@ -190,9 +186,8 @@ public enum PumpType { PumpType(String description, ManufacturerType manufacturer, String model, double bolusSize, DoseStepSize specialBolusSize, // DoseSettings extendedBolusSettings, // - PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, // - double baseBasalMinValue, double baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability) - { + PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, // + double baseBasalMinValue, double baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability) { this(description, manufacturer, model, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, specialBasalDurations, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability); }