Feature Request/Bug #863
- merged with dev - extended PumpType with new setting in PumpDescription - added Insight pump settings for VirtualPump
This commit is contained in:
parent
f2df13dbfb
commit
4fb8e899c2
8 changed files with 94 additions and 57 deletions
|
@ -58,24 +58,25 @@ public class PumpDescription {
|
||||||
|
|
||||||
isTempBasalCapable = true;
|
isTempBasalCapable = true;
|
||||||
tempBasalStyle = PERCENT;
|
tempBasalStyle = PERCENT;
|
||||||
|
|
||||||
maxTempPercent = 200;
|
maxTempPercent = 200;
|
||||||
tempPercentStep = 10;
|
tempPercentStep = 10;
|
||||||
|
|
||||||
maxTempAbsolute = 10;
|
maxTempAbsolute = 10;
|
||||||
tempAbsoluteStep = 0.05d;
|
tempAbsoluteStep = 0.05d;
|
||||||
|
|
||||||
tempDurationStep = 60;
|
tempDurationStep = 60;
|
||||||
tempMaxDuration = 12 * 60;
|
tempMaxDuration = 12 * 60;
|
||||||
|
tempDurationStep15mAllowed = false;
|
||||||
|
tempDurationStep30mAllowed = false;
|
||||||
|
|
||||||
isSetBasalProfileCapable = true;
|
isSetBasalProfileCapable = true;
|
||||||
basalStep = 0.01d;
|
basalStep = 0.01d;
|
||||||
basalMinimumRate = 0.04d;
|
basalMinimumRate = 0.04d;
|
||||||
|
is30minBasalRatesCapable = false;
|
||||||
|
|
||||||
isRefillingCapable = false;
|
isRefillingCapable = false;
|
||||||
|
|
||||||
storesCarbInfo = true;
|
storesCarbInfo = true;
|
||||||
|
|
||||||
|
supportsTDDs = false;
|
||||||
|
needsManualTDDLoad = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,12 @@ public enum DoseStepSize
|
||||||
new DoseStepSizeEntry(1f, 10f, 0.05f), //
|
new DoseStepSizeEntry(1f, 10f, 0.05f), //
|
||||||
new DoseStepSizeEntry(10f, Float.MAX_VALUE, 0.1f)), //
|
new DoseStepSizeEntry(10f, Float.MAX_VALUE, 0.1f)), //
|
||||||
|
|
||||||
|
InsightBolus(
|
||||||
|
new DoseStepSizeEntry(0f, 2f, 0.05f), //
|
||||||
|
new DoseStepSizeEntry(2f, 5f, 0.1f), //
|
||||||
|
new DoseStepSizeEntry(5f, 10f, 0.2f), //
|
||||||
|
new DoseStepSizeEntry(10f, Float.MAX_VALUE, 0.5f)),
|
||||||
|
|
||||||
MedtronicVeoBasal( //
|
MedtronicVeoBasal( //
|
||||||
new DoseStepSizeEntry(0f, 1f, 0.025f), //
|
new DoseStepSizeEntry(0f, 1f, 0.025f), //
|
||||||
new DoseStepSizeEntry(1f, 10f, 0.05f), //
|
new DoseStepSizeEntry(1f, 10f, 0.05f), //
|
||||||
|
|
|
@ -6,19 +6,30 @@ package info.nightscout.androidaps.plugins.PumpCommon.defs;
|
||||||
|
|
||||||
public enum PumpCapability {
|
public enum PumpCapability {
|
||||||
|
|
||||||
Bolus, //
|
Bolus, // isBolusCapable
|
||||||
ExtendedBolus, //
|
ExtendedBolus, // isExtendedBolusCapable
|
||||||
TBR, //
|
TempBasal, // isTempBasalCapable
|
||||||
BasalProfileSet, //
|
BasalProfileSet, // isSetBasalProfileCapable
|
||||||
Refill, //
|
Refill, // isRefillingCapable
|
||||||
StoreCarbInfo, //
|
StoreCarbInfo, // storesCarbInfo
|
||||||
|
TDD, // supportsTDDs
|
||||||
|
ManualTDDLoad, // needsManualTDDLoad
|
||||||
|
BasalRate30min, // is30minBasalRatesCapable
|
||||||
|
|
||||||
|
// grouped by pump
|
||||||
|
VirtualPumpCapabilities(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill), //
|
||||||
|
ComboCapabilities(Bolus, TempBasal, BasalProfileSet, Refill, StoreCarbInfo, TDD, ManualTDDLoad), //
|
||||||
|
DanaCapabilities(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, StoreCarbInfo, TDD, ManualTDDLoad), //
|
||||||
|
InsightCapabilities(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill,TDD,BasalRate30min), //
|
||||||
|
|
||||||
|
|
||||||
|
// BasalRates (separately grouped)
|
||||||
|
BasalRate_Duration15minAllowed, //
|
||||||
|
BasalRate_Duration30minAllowed, //
|
||||||
|
BasalRate_Duration15and30minAllowed(BasalRate_Duration15minAllowed, BasalRate_Duration30minAllowed), //
|
||||||
|
BasalRate_Duration15and30minNotAllowed, //
|
||||||
|
|
||||||
// grouped
|
|
||||||
VirtualPump(Bolus, ExtendedBolus, TBR, BasalProfileSet, StoreCarbInfo), //
|
|
||||||
|
|
||||||
Bolus_TBR_Basal_Refill_Carb(Bolus, TBR, BasalProfileSet, Refill, StoreCarbInfo), //
|
|
||||||
Bolus_Extended_TBR_Basal_Carb(Bolus, ExtendedBolus, TBR, BasalProfileSet, StoreCarbInfo), //
|
|
||||||
Bolus_Extended_TBR_Basal_Refill_Carb(Bolus, ExtendedBolus, TBR, BasalProfileSet, Refill, StoreCarbInfo), //
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ package info.nightscout.androidaps.plugins.PumpCommon.defs;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import info.nightscout.androidaps.interfaces.PumpDescription;
|
|
||||||
import info.nightscout.androidaps.plugins.PumpCommon.data.DoseSettings;
|
import info.nightscout.androidaps.plugins.PumpCommon.data.DoseSettings;
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,38 +19,43 @@ public enum PumpType {
|
||||||
GenericAAPS("Generic AAPS", 0.1f, null, //
|
GenericAAPS("Generic AAPS", 0.1f, null, //
|
||||||
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
PumpTempBasalType.Percent, //
|
PumpTempBasalType.Percent, //
|
||||||
new DoseSettings(10,30, 24*60, 0f, 500f), //
|
new DoseSettings(10,30, 24*60, 0f, 500f), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
0.01f, 0.01f, null, PumpCapability.VirtualPump), //
|
0.01f, 0.01f, null, PumpCapability.VirtualPumpCapabilities), //
|
||||||
|
|
||||||
// Cellnovo
|
// Cellnovo
|
||||||
|
|
||||||
Cellnovo1("Cellnovo", 0.05f, null, //
|
Cellnovo1("Cellnovo", 0.05f, null, //
|
||||||
new DoseSettings(0.05f, 30, 24*60, 1f, null),
|
new DoseSettings(0.05f, 30, 24*60, 1f, null),
|
||||||
PumpTempBasalType.Percent,
|
PumpTempBasalType.Percent,
|
||||||
new DoseSettings(5,30, 24*60, 0f, 200f), //
|
new DoseSettings(5,30, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration30minAllowed, //
|
||||||
0.05f, 0.05f, null, PumpCapability.VirtualPump), //
|
0.05f, 0.05f, null, PumpCapability.VirtualPumpCapabilities), //
|
||||||
|
|
||||||
// Accu-Chek
|
// Accu-Chek
|
||||||
|
|
||||||
AccuChekCombo("Accu-Chek Combo", 0.1f, null, //
|
AccuChekCombo("Accu-Chek Combo", 0.1f, null, //
|
||||||
new DoseSettings(0.1f, 15, 12*60, 0.1f), //
|
new DoseSettings(0.1f, 15, 12*60, 0.1f), //
|
||||||
PumpTempBasalType.Percent,
|
PumpTempBasalType.Percent,
|
||||||
new DoseSettings(10, 15, 12*60,0f, 500f), //
|
new DoseSettings(10, 15, 12*60,0f, 500f), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
0.01f, 0.1f, DoseStepSize.ComboBasal, PumpCapability.Bolus_TBR_Basal_Refill_Carb), //
|
0.01f, 0.1f, DoseStepSize.ComboBasal, PumpCapability.ComboCapabilities), //
|
||||||
|
|
||||||
AccuChekSpirit("Accu-Chek Spirit", 0.1f, null, //
|
AccuChekSpirit("Accu-Chek Spirit", 0.1f, null, //
|
||||||
new DoseSettings(0.1f, 15, 12*60, 0.1f), //
|
new DoseSettings(0.1f, 15, 12*60, 0.1f), //
|
||||||
PumpTempBasalType.Percent,
|
PumpTempBasalType.Percent,
|
||||||
new DoseSettings(10, 15, 12*60,0f, 500f), //
|
new DoseSettings(10, 15, 12*60,0f, 500f), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
0.01f, 0.1f, null, PumpCapability.VirtualPump), //
|
0.01f, 0.1f, null, PumpCapability.VirtualPumpCapabilities), //
|
||||||
|
|
||||||
|
AccuChekInsight("Accu-Chek Insight", 0.05f, DoseStepSize.InsightBolus, //
|
||||||
|
new DoseSettings(0.05f, 15, 24*60, 0.05f), //
|
||||||
|
PumpTempBasalType.Percent,
|
||||||
|
new DoseSettings(10, 15, 12*60,0f, 250f), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
|
0.02f, 0.1f, null, PumpCapability.InsightCapabilities), //
|
||||||
|
|
||||||
// Animas
|
// Animas
|
||||||
AnimasVibe("Animas Vibe", 0.05f, null, // AnimasBolus?
|
AnimasVibe("Animas Vibe", 0.05f, null, // AnimasBolus?
|
||||||
new DoseSettings(0.05f, 30, 12*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 12*60, 0.05f), //
|
||||||
PumpTempBasalType.Percent, //
|
PumpTempBasalType.Percent, //
|
||||||
new DoseSettings(10, 30, 24*60, 0f, 200f), //
|
new DoseSettings(10, 30, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration30minAllowed, //
|
||||||
0.025f, 5f, 0f, null, PumpCapability.VirtualPump), //
|
0.025f, 5f, 0f, null, PumpCapability.VirtualPumpCapabilities), //
|
||||||
|
|
||||||
AnimasPing("Animas Ping", AnimasVibe),
|
AnimasPing("Animas Ping", AnimasVibe),
|
||||||
|
|
||||||
|
@ -59,32 +63,37 @@ public enum PumpType {
|
||||||
DanaR("DanaR", 0.05f, null, //
|
DanaR("DanaR", 0.05f, null, //
|
||||||
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
PumpTempBasalType.Percent, //
|
PumpTempBasalType.Percent, //
|
||||||
new DoseSettings(10f, 60, 24*60, 0f, 200f), //
|
new DoseSettings(10f, 60, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration15and30minNotAllowed, //
|
||||||
0.04f, 0.01f, null, PumpCapability.Bolus_Extended_TBR_Basal_Refill_Carb),
|
0.04f, 0.01f, null, PumpCapability.DanaCapabilities),
|
||||||
|
|
||||||
DanaRKorean("DanaR Korean", 0.05f, null, //
|
DanaRKorean("DanaR Korean", 0.05f, null, //
|
||||||
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
PumpTempBasalType.Percent, //
|
PumpTempBasalType.Percent, //
|
||||||
new DoseSettings(10f, 60, 24*60, 0f, 200f), //
|
new DoseSettings(10f, 60, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration15and30minNotAllowed, //
|
||||||
0.1f, 0.01f, null, PumpCapability.Bolus_Extended_TBR_Basal_Refill_Carb),
|
0.1f, 0.01f, null, PumpCapability.DanaCapabilities),
|
||||||
|
|
||||||
DanaRS("DanaRS", DanaR),
|
DanaRS("DanaRS", 0.05f, null, //
|
||||||
DanaRv2("DanaRv2", DanaR),
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
|
PumpTempBasalType.Percent, //
|
||||||
|
new DoseSettings(10f, 60, 24*60, 0f, 200f), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
|
0.04f, 0.01f, null, PumpCapability.DanaCapabilities),
|
||||||
|
|
||||||
|
DanaRv2("DanaRv2", DanaRS),
|
||||||
|
|
||||||
|
|
||||||
// Insulet
|
// Insulet
|
||||||
Insulet_Omnipod("Insulet Omnipod", 0.05f, null, //
|
Insulet_Omnipod("Insulet Omnipod", 0.05f, null, //
|
||||||
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
PumpTempBasalType.Absolute, //
|
PumpTempBasalType.Absolute, //
|
||||||
new DoseSettings(0.05f, 30, 12*60, 0f, 5.0f), // cannot exceed max basal rate 30u/hr
|
new DoseSettings(0.05f, 30, 12*60, 0f, 5.0f), PumpCapability.BasalRate_Duration30minAllowed, // cannot exceed max basal rate 30u/hr
|
||||||
0.05f, 0.05f, null, PumpCapability.VirtualPump),
|
0.05f, 0.05f, null, PumpCapability.VirtualPumpCapabilities),
|
||||||
|
|
||||||
// Medtronic
|
// Medtronic
|
||||||
Minimed_512_712("Medtronic 512/712", 0.05f, null, //
|
Minimed_512_712("Medtronic 512/712", 0.05f, null, //
|
||||||
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
PumpTempBasalType.Absolute, //
|
PumpTempBasalType.Absolute, //
|
||||||
new DoseSettings(0.05f, 30, 24*60, 0f, 35f), //
|
new DoseSettings(0.05f, 30, 24*60, 0f, 35f), PumpCapability.BasalRate_Duration30minAllowed, //
|
||||||
0.05f, 0.05f, null, PumpCapability.VirtualPump), // TODO
|
0.05f, 0.05f, null, PumpCapability.VirtualPumpCapabilities), // TODO
|
||||||
|
|
||||||
Minimed_515_715("Medtronic 515/715", Minimed_512_712),
|
Minimed_515_715("Medtronic 515/715", Minimed_512_712),
|
||||||
Minimed_522_722("Medtronic 522/722", Minimed_512_712),
|
Minimed_522_722("Medtronic 522/722", Minimed_512_712),
|
||||||
|
@ -93,23 +102,23 @@ public enum PumpType {
|
||||||
Minimed_553_753_Revel("Medtronic 553/753 (Revel)", 0.05f, null, //
|
Minimed_553_753_Revel("Medtronic 553/753 (Revel)", 0.05f, null, //
|
||||||
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
PumpTempBasalType.Absolute, //
|
PumpTempBasalType.Absolute, //
|
||||||
new DoseSettings(0.05f, 30, 24*60, 0f, 35f), //
|
new DoseSettings(0.05f, 30, 24*60, 0f, 35f), PumpCapability.BasalRate_Duration30minAllowed, //
|
||||||
0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPump), //
|
0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPumpCapabilities), //
|
||||||
|
|
||||||
Minimed_554_754_Veo("Medtronic 554/754 (Veo)", Minimed_553_753_Revel), // TODO
|
Minimed_554_754_Veo("Medtronic 554/754 (Veo)", Minimed_553_753_Revel), // TODO
|
||||||
|
|
||||||
Minimed_640G("Medtronic 640G", 0.025f, null, //
|
Minimed_640G("Medtronic 640G", 0.025f, null, //
|
||||||
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
new DoseSettings(0.05f, 30, 8*60, 0.05f), //
|
||||||
PumpTempBasalType.Absolute, //
|
PumpTempBasalType.Absolute, //
|
||||||
new DoseSettings(0.05f, 30, 24*60, 0f, 35f), //
|
new DoseSettings(0.05f, 30, 24*60, 0f, 35f), PumpCapability.BasalRate_Duration30minAllowed, //
|
||||||
0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPump), //
|
0.025f, 0.025f, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPumpCapabilities), //
|
||||||
|
|
||||||
// Tandem
|
// Tandem
|
||||||
TandemTSlim("Tandem t:slim", 0.01f, null, //
|
TandemTSlim("Tandem t:slim", 0.01f, null, //
|
||||||
new DoseSettings(0.01f,15, 8*60, 0.4f) ,
|
new DoseSettings(0.01f,15, 8*60, 0.4f),
|
||||||
PumpTempBasalType.Percent,
|
PumpTempBasalType.Percent,
|
||||||
new DoseSettings(1,15, 8*60, 0f, 250f), //
|
new DoseSettings(1,15, 8*60, 0f, 250f), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
0.1f, 0.001f, null, PumpCapability.VirtualPump),
|
0.1f, 0.001f, null, PumpCapability.VirtualPumpCapabilities),
|
||||||
|
|
||||||
TandemTFlex("Tandem t:flex", TandemTSlim), //
|
TandemTFlex("Tandem t:flex", TandemTSlim), //
|
||||||
TandemTSlimG4("Tandem t:slim G4", TandemTSlim), //
|
TandemTSlimG4("Tandem t:slim G4", TandemTSlim), //
|
||||||
|
@ -122,6 +131,7 @@ public enum PumpType {
|
||||||
private DoseSettings extendedBolusSettings;
|
private DoseSettings extendedBolusSettings;
|
||||||
private PumpTempBasalType pumpTempBasalType;
|
private PumpTempBasalType pumpTempBasalType;
|
||||||
private DoseSettings tbrSettings;
|
private DoseSettings tbrSettings;
|
||||||
|
private PumpCapability specialBasalDurations;
|
||||||
private float baseBasalMinValue; //
|
private float baseBasalMinValue; //
|
||||||
private Float baseBasalMaxValue;
|
private Float baseBasalMaxValue;
|
||||||
private float baseBasalStep; //
|
private float baseBasalStep; //
|
||||||
|
@ -156,15 +166,15 @@ public enum PumpType {
|
||||||
|
|
||||||
PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, //
|
PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, //
|
||||||
DoseSettings extendedBolusSettings, //
|
DoseSettings extendedBolusSettings, //
|
||||||
PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, //
|
PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, //
|
||||||
float baseBasalMinValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability)
|
float baseBasalMinValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability)
|
||||||
{
|
{
|
||||||
this(description, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability);
|
this(description, bolusSize, specialBolusSize, extendedBolusSettings, pumpTempBasalType, tbrSettings, specialBasalDurations, baseBasalMinValue, null, baseBasalStep, baseBasalSpecialSteps, pumpCapability);
|
||||||
}
|
}
|
||||||
|
|
||||||
PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, //
|
PumpType(String description, float bolusSize, DoseStepSize specialBolusSize, //
|
||||||
DoseSettings extendedBolusSettings, //
|
DoseSettings extendedBolusSettings, //
|
||||||
PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, //
|
PumpTempBasalType pumpTempBasalType, DoseSettings tbrSettings, PumpCapability specialBasalDurations, //
|
||||||
float baseBasalMinValue, Float baseBasalMaxValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability)
|
float baseBasalMinValue, Float baseBasalMaxValue, float baseBasalStep, DoseStepSize baseBasalSpecialSteps, PumpCapability pumpCapability)
|
||||||
{
|
{
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
@ -173,6 +183,7 @@ public enum PumpType {
|
||||||
this.extendedBolusSettings = extendedBolusSettings;
|
this.extendedBolusSettings = extendedBolusSettings;
|
||||||
this.pumpTempBasalType = pumpTempBasalType;
|
this.pumpTempBasalType = pumpTempBasalType;
|
||||||
this.tbrSettings = tbrSettings;
|
this.tbrSettings = tbrSettings;
|
||||||
|
this.specialBasalDurations = specialBasalDurations;
|
||||||
this.baseBasalMinValue = baseBasalMinValue;
|
this.baseBasalMinValue = baseBasalMinValue;
|
||||||
this.baseBasalMaxValue = baseBasalMaxValue;
|
this.baseBasalMaxValue = baseBasalMaxValue;
|
||||||
this.baseBasalStep = baseBasalStep;
|
this.baseBasalStep = baseBasalStep;
|
||||||
|
@ -299,5 +310,7 @@ public enum PumpType {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PumpCapability getSpecialBasalDurations() {
|
||||||
|
return specialBasalDurations;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,14 +11,10 @@ import info.nightscout.androidaps.plugins.PumpCommon.defs.PumpType;
|
||||||
|
|
||||||
public class PumpUtil {
|
public class PumpUtil {
|
||||||
|
|
||||||
|
|
||||||
public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType)
|
public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType)
|
||||||
{
|
{
|
||||||
setPumpDescription(pumpDescription, pumpType, false);
|
PumpCapability pumpCapability = pumpType.getPumpCapability();
|
||||||
}
|
|
||||||
|
|
||||||
public static void setPumpDescription(PumpDescription pumpDescription, PumpType pumpType, boolean isVirtualPump)
|
|
||||||
{
|
|
||||||
PumpCapability pumpCapability = isVirtualPump ? PumpCapability.VirtualPump : pumpType.getPumpCapability();
|
|
||||||
|
|
||||||
pumpDescription.isBolusCapable = pumpCapability.hasCapability(PumpCapability.Bolus);
|
pumpDescription.isBolusCapable = pumpCapability.hasCapability(PumpCapability.Bolus);
|
||||||
pumpDescription.bolusStep = pumpType.getBolusSize();
|
pumpDescription.bolusStep = pumpType.getBolusSize();
|
||||||
|
@ -28,7 +24,7 @@ public class PumpUtil {
|
||||||
pumpDescription.extendedBolusDurationStep = pumpType.getExtendedBolusSettings().getDurationStep();
|
pumpDescription.extendedBolusDurationStep = pumpType.getExtendedBolusSettings().getDurationStep();
|
||||||
pumpDescription.extendedBolusMaxDuration = pumpType.getExtendedBolusSettings().getMaxDuration();
|
pumpDescription.extendedBolusMaxDuration = pumpType.getExtendedBolusSettings().getMaxDuration();
|
||||||
|
|
||||||
pumpDescription.isTempBasalCapable = pumpCapability.hasCapability(PumpCapability.TBR);
|
pumpDescription.isTempBasalCapable = pumpCapability.hasCapability(PumpCapability.TempBasal);
|
||||||
|
|
||||||
if (pumpType.getPumpTempBasalType()==PumpTempBasalType.Percent)
|
if (pumpType.getPumpTempBasalType()==PumpTempBasalType.Percent)
|
||||||
{
|
{
|
||||||
|
@ -46,6 +42,8 @@ public class PumpUtil {
|
||||||
pumpDescription.tempDurationStep = pumpType.getTbrSettings().getDurationStep();
|
pumpDescription.tempDurationStep = pumpType.getTbrSettings().getDurationStep();
|
||||||
pumpDescription.tempMaxDuration = pumpType.getTbrSettings().getMaxDuration();
|
pumpDescription.tempMaxDuration = pumpType.getTbrSettings().getMaxDuration();
|
||||||
|
|
||||||
|
pumpDescription.tempDurationStep15mAllowed = pumpType.getSpecialBasalDurations().hasCapability(PumpCapability.BasalRate_Duration15minAllowed);
|
||||||
|
pumpDescription.tempDurationStep30mAllowed = pumpType.getSpecialBasalDurations().hasCapability(PumpCapability.BasalRate_Duration30minAllowed);
|
||||||
|
|
||||||
pumpDescription.isSetBasalProfileCapable = pumpCapability.hasCapability(PumpCapability.BasalProfileSet);
|
pumpDescription.isSetBasalProfileCapable = pumpCapability.hasCapability(PumpCapability.BasalProfileSet);
|
||||||
pumpDescription.basalStep = pumpType.getBaseBasalStep();
|
pumpDescription.basalStep = pumpType.getBaseBasalStep();
|
||||||
|
@ -53,6 +51,12 @@ public class PumpUtil {
|
||||||
|
|
||||||
pumpDescription.isRefillingCapable = pumpCapability.hasCapability(PumpCapability.Refill);
|
pumpDescription.isRefillingCapable = pumpCapability.hasCapability(PumpCapability.Refill);
|
||||||
pumpDescription.storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo);
|
pumpDescription.storesCarbInfo = pumpCapability.hasCapability(PumpCapability.StoreCarbInfo);
|
||||||
|
|
||||||
|
pumpDescription.supportsTDDs = pumpCapability.hasCapability(PumpCapability.TDD);
|
||||||
|
pumpDescription.needsManualTDDLoad = pumpCapability.hasCapability(PumpCapability.ManualTDDLoad);
|
||||||
|
|
||||||
|
pumpDescription.is30minBasalRatesCapable = pumpCapability.hasCapability(PumpCapability.BasalRate30min);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ import com.squareup.otto.Subscribe;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.db.ExtendedBolus;
|
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||||
|
|
|
@ -426,7 +426,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
||||||
// reset
|
// reset
|
||||||
pumpDescription.resetSettings();
|
pumpDescription.resetSettings();
|
||||||
|
|
||||||
PumpUtil.setPumpDescription(pumpDescription, pumpTypeNew, true);
|
PumpUtil.setPumpDescription(pumpDescription, pumpTypeNew);
|
||||||
|
|
||||||
this.pumpType = pumpTypeNew;
|
this.pumpType = pumpTypeNew;
|
||||||
|
|
||||||
|
|
|
@ -108,11 +108,12 @@
|
||||||
|
|
||||||
<string-array name="virtualPumpTypes">
|
<string-array name="virtualPumpTypes">
|
||||||
<item>Generic AAPS</item>
|
<item>Generic AAPS</item>
|
||||||
<item>Cellnovo</item>
|
|
||||||
<item>Accu-Chek Spirit</item>
|
<item>Accu-Chek Spirit</item>
|
||||||
<item>Accu-Chek Combo</item>
|
<item>Accu-Chek Combo</item>
|
||||||
|
<item>Accu-Chek Insight</item>
|
||||||
<item>Animas Ping</item>
|
<item>Animas Ping</item>
|
||||||
<item>Animas Vibe</item>
|
<item>Animas Vibe</item>
|
||||||
|
<item>Cellnovo</item>
|
||||||
<item>DanaR</item>
|
<item>DanaR</item>
|
||||||
<item>DanaR Korean</item>
|
<item>DanaR Korean</item>
|
||||||
<item>DanaRS</item>
|
<item>DanaRS</item>
|
||||||
|
|
Loading…
Reference in a new issue