VirtualPump plugin remove init

This commit is contained in:
Milos Kozak 2021-03-31 22:59:05 +02:00
parent a5ea0d9027
commit cacf239d17

View file

@ -74,29 +74,27 @@ open class VirtualPumpPlugin @Inject constructor(
var pumpType: PumpType? = null var pumpType: PumpType? = null
private set private set
private var lastDataTime: Long = 0 private var lastDataTime: Long = 0
override val pumpDescription = PumpDescription() override val pumpDescription = PumpDescription().also {
it.isBolusCapable = true
init { it.bolusStep = 0.1
pumpDescription.isBolusCapable = true it.isExtendedBolusCapable = true
pumpDescription.bolusStep = 0.1 it.extendedBolusStep = 0.05
pumpDescription.isExtendedBolusCapable = true it.extendedBolusDurationStep = 30.0
pumpDescription.extendedBolusStep = 0.05 it.extendedBolusMaxDuration = 8 * 60.toDouble()
pumpDescription.extendedBolusDurationStep = 30.0 it.isTempBasalCapable = true
pumpDescription.extendedBolusMaxDuration = 8 * 60.toDouble() it.tempBasalStyle = PumpDescription.PERCENT or PumpDescription.ABSOLUTE
pumpDescription.isTempBasalCapable = true it.maxTempPercent = 500
pumpDescription.tempBasalStyle = PumpDescription.PERCENT or PumpDescription.ABSOLUTE it.tempPercentStep = 10
pumpDescription.maxTempPercent = 500 it.tempDurationStep = 30
pumpDescription.tempPercentStep = 10 it.tempDurationStep15mAllowed = true
pumpDescription.tempDurationStep = 30 it.tempDurationStep30mAllowed = true
pumpDescription.tempDurationStep15mAllowed = true it.tempMaxDuration = 24 * 60
pumpDescription.tempDurationStep30mAllowed = true it.isSetBasalProfileCapable = true
pumpDescription.tempMaxDuration = 24 * 60 it.basalStep = 0.01
pumpDescription.isSetBasalProfileCapable = true it.basalMinimumRate = 0.01
pumpDescription.basalStep = 0.01 it.isRefillingCapable = true
pumpDescription.basalMinimumRate = 0.01 it.storesCarbInfo = false
pumpDescription.isRefillingCapable = true it.is30minBasalRatesCapable = true
pumpDescription.storesCarbInfo = false
pumpDescription.is30minBasalRatesCapable = true
} }
fun getFakingStatus(): Boolean { fun getFakingStatus(): Boolean {