Added Medtrum pump type etc
This commit is contained in:
parent
18be54f489
commit
37a6fa9220
5 changed files with 29 additions and 2 deletions
|
@ -26,6 +26,7 @@ enum class PumpCapability {
|
||||||
YpsomedCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), // BasalRates (separately grouped)
|
YpsomedCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), // BasalRates (separately grouped)
|
||||||
DiaconnCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), //
|
DiaconnCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, Refill, ReplaceBattery, TDD, ManualTDDLoad)), //
|
||||||
EopatchCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, BasalRate30min)),
|
EopatchCapabilities(arrayOf(Bolus, ExtendedBolus, TempBasal, BasalProfileSet, BasalRate30min)),
|
||||||
|
MedtrumCapabilities(arrayOf(Bolus, TempBasal, BasalProfileSet, BasalRate30min)), // Technically the pump supports ExtendedBolus, but not implemented (yet)
|
||||||
BasalRate_Duration15minAllowed,
|
BasalRate_Duration15minAllowed,
|
||||||
BasalRate_Duration30minAllowed,
|
BasalRate_Duration30minAllowed,
|
||||||
BasalRate_Duration15and30minAllowed(arrayOf(BasalRate_Duration15minAllowed, BasalRate_Duration30minAllowed)),
|
BasalRate_Duration15and30minAllowed(arrayOf(BasalRate_Duration15minAllowed, BasalRate_Duration30minAllowed)),
|
||||||
|
|
|
@ -391,6 +391,26 @@ enum class PumpType {
|
||||||
isPatchPump = true,
|
isPatchPump = true,
|
||||||
maxReservoirReading = 50,
|
maxReservoirReading = 50,
|
||||||
source = Source.EOPatch2
|
source = Source.EOPatch2
|
||||||
|
),
|
||||||
|
|
||||||
|
//Medtrum Nano Pump
|
||||||
|
MEDTRUM_NANO(
|
||||||
|
description = "Medtrum Nano",
|
||||||
|
manufacturer = ManufacturerType.Medtrum,
|
||||||
|
model = "Nano",
|
||||||
|
bolusSize = 0.05,
|
||||||
|
specialBolusSize = null,
|
||||||
|
extendedBolusSettings = DoseSettings(0.05, 30, 8 * 60, 0.05, 30.0),
|
||||||
|
pumpTempBasalType = PumpTempBasalType.Absolute,
|
||||||
|
tbrSettings = DoseSettings(0.05, 30, 12 * 60, 0.0, 25.0),
|
||||||
|
specialBasalDurations = PumpCapability.BasalRate_Duration30minAllowed,
|
||||||
|
baseBasalMinValue = 0.05,
|
||||||
|
baseBasalMaxValue = 25.0,
|
||||||
|
baseBasalStep = 0.05,
|
||||||
|
baseBasalSpecialSteps = null,
|
||||||
|
pumpCapability = PumpCapability.MedtrumCapabilities,
|
||||||
|
isPatchPump = true,
|
||||||
|
source = Source.Medtrum
|
||||||
);
|
);
|
||||||
|
|
||||||
val description: String
|
val description: String
|
||||||
|
@ -458,6 +478,7 @@ enum class PumpType {
|
||||||
OmnipodEros,
|
OmnipodEros,
|
||||||
OmnipodDash,
|
OmnipodDash,
|
||||||
EOPatch2,
|
EOPatch2,
|
||||||
|
Medtrum,
|
||||||
MDI,
|
MDI,
|
||||||
VirtualPump,
|
VirtualPump,
|
||||||
Unknown
|
Unknown
|
||||||
|
|
|
@ -59,6 +59,7 @@ fun PumpType.Companion.fromDbPumpType(pt: InterfaceIDs.PumpType): PumpType =
|
||||||
InterfaceIDs.PumpType.USER -> PumpType.USER
|
InterfaceIDs.PumpType.USER -> PumpType.USER
|
||||||
InterfaceIDs.PumpType.DIACONN_G8 -> PumpType.DIACONN_G8
|
InterfaceIDs.PumpType.DIACONN_G8 -> PumpType.DIACONN_G8
|
||||||
InterfaceIDs.PumpType.EOPATCH2 -> PumpType.EOFLOW_EOPATCH2
|
InterfaceIDs.PumpType.EOPATCH2 -> PumpType.EOFLOW_EOPATCH2
|
||||||
|
InterfaceIDs.PumpType.MEDTRUM -> PumpType.MEDTRUM_NANO
|
||||||
InterfaceIDs.PumpType.CACHE -> PumpType.CACHE
|
InterfaceIDs.PumpType.CACHE -> PumpType.CACHE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,5 +118,6 @@ fun PumpType.toDbPumpType(): InterfaceIDs.PumpType =
|
||||||
PumpType.USER -> InterfaceIDs.PumpType.USER
|
PumpType.USER -> InterfaceIDs.PumpType.USER
|
||||||
PumpType.DIACONN_G8 -> InterfaceIDs.PumpType.DIACONN_G8
|
PumpType.DIACONN_G8 -> InterfaceIDs.PumpType.DIACONN_G8
|
||||||
PumpType.EOFLOW_EOPATCH2 -> InterfaceIDs.PumpType.EOPATCH2
|
PumpType.EOFLOW_EOPATCH2 -> InterfaceIDs.PumpType.EOPATCH2
|
||||||
|
PumpType.MEDTRUM_NANO -> InterfaceIDs.PumpType.MEDTRUM
|
||||||
PumpType.CACHE -> InterfaceIDs.PumpType.CACHE
|
PumpType.CACHE -> InterfaceIDs.PumpType.CACHE
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ data class InterfaceIDs(
|
||||||
MDI,
|
MDI,
|
||||||
DIACONN_G8,
|
DIACONN_G8,
|
||||||
EOPATCH2,
|
EOPATCH2,
|
||||||
|
MEDTRUM,
|
||||||
USER,
|
USER,
|
||||||
CACHE;
|
CACHE;
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,8 @@ class MedtrumPumpPlugin @Inject constructor(
|
||||||
.description(R.string.medtrum_pump_description), injector, aapsLogger, rh, commandQueue
|
.description(R.string.medtrum_pump_description), injector, aapsLogger, rh, commandQueue
|
||||||
), Pump {
|
), Pump {
|
||||||
|
|
||||||
|
private var mPumpType: PumpType = PumpType.MEDTRUM_NANO
|
||||||
|
private val mPumpDescription = PumpDescription(mPumpType)
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
super.onStart()
|
super.onStart()
|
||||||
|
@ -175,7 +177,7 @@ class MedtrumPumpPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun model(): PumpType {
|
override fun model(): PumpType {
|
||||||
return PumpType.GENERIC_AAPS // TODO
|
return mPumpType
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun serialNumber(): String {
|
override fun serialNumber(): String {
|
||||||
|
@ -183,7 +185,7 @@ class MedtrumPumpPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override val pumpDescription: PumpDescription
|
override val pumpDescription: PumpDescription
|
||||||
get() = PumpDescription(PumpType.GENERIC_AAPS) // TODO
|
get() = mPumpDescription
|
||||||
|
|
||||||
override fun shortStatus(veryShort: Boolean): String {
|
override fun shortStatus(veryShort: Boolean): String {
|
||||||
return ""// TODO
|
return ""// TODO
|
||||||
|
|
Loading…
Reference in a new issue