Fix Insight limits

This commit is contained in:
Tebbe Ubben 2019-03-31 01:37:28 +01:00
parent c12ec4817f
commit ae60d68719
3 changed files with 17 additions and 2 deletions

View file

@ -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), //

View file

@ -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), //

View file

@ -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<Double> applyExtendedBolusConstraints(Constraint<Double> insulin) {
return applyBolusConstraints(insulin);
}
@Override
public void onStateChanged(InsightState state) {
if (state == InsightState.CONNECTED) {