From ae60d68719d99f476b119d8cac4232f514ca0ebe Mon Sep 17 00:00:00 2001 From: Tebbe Ubben Date: Sun, 31 Mar 2019 01:37:28 +0100 Subject: [PATCH] Fix Insight limits --- .../androidaps/plugins/pump/common/defs/DoseStepSize.java | 4 ++++ .../androidaps/plugins/pump/common/defs/PumpType.java | 8 +++++++- .../plugins/pump/insight/LocalInsightPlugin.java | 7 ++++++- 3 files changed, 17 insertions(+), 2 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 7e4bd7762e..b2ce475072 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 @@ -18,6 +18,10 @@ public enum DoseStepSize new DoseStepSizeEntry(5f, 10f, 0.2f), // new DoseStepSizeEntry(10f, Double.MAX_VALUE, 0.5f)), + InsightBasal( + new DoseStepSizeEntry(0f, 5f, 0.01f), + new DoseStepSizeEntry(5f, Double.MAX_VALUE, 0.1f)), + MedtronicVeoBasal( // new DoseStepSizeEntry(0f, 1f, 0.025f), // new DoseStepSizeEntry(1f, 10f, 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 e1e7f2bf2b..9a7e351bf1 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 @@ -49,9 +49,15 @@ public enum PumpType { AccuChekInsight("Accu-Chek Insight", 0.05d, DoseStepSize.InsightBolus, // new DoseSettings(0.05d, 15, 24*60, 0.05d), // PumpTempBasalType.Percent, - new DoseSettings(10, 15, 12*60,0d, 250d), PumpCapability.BasalRate_Duration15and30minAllowed, // + new DoseSettings(10, 15, 24*60,0d, 250d), PumpCapability.BasalRate_Duration15and30minAllowed, // 0.02d, 0.01d, null, PumpCapability.InsightCapabilities), // + AccuChekInsightBluetooth("Accu-Chek Insight", 0.01d, null, // + new DoseSettings(0.01d, 15, 24*60, 0.05d), // + PumpTempBasalType.Percent, + new DoseSettings(10, 15, 24*60,0d, 250d), PumpCapability.BasalRate_Duration15and30minAllowed, // + 0.02d, 0.01d, DoseStepSize.InsightBolus, PumpCapability.InsightCapabilities), // + // Animas AnimasVibe("Animas Vibe", 0.05d, null, // AnimasBolus? new DoseSettings(0.05d, 30, 12*60, 0.05d), // diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 11e7635272..031d2e4ddd 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -171,7 +171,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con .preferencesId(R.xml.pref_insight_local)); pumpDescription = new PumpDescription(); - pumpDescription.setPumpDescription(PumpType.AccuChekInsight); + pumpDescription.setPumpDescription(PumpType.AccuChekInsightBluetooth); } public TBROverNotificationBlock getTBROverNotificationBlock() { @@ -1537,6 +1537,11 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con return insulin; } + @Override + public Constraint applyExtendedBolusConstraints(Constraint insulin) { + return applyBolusConstraints(insulin); + } + @Override public void onStateChanged(InsightState state) { if (state == InsightState.CONNECTED) {