⚡ tempbasal max rate is applied from 6U/hr to 15U/hr in pump firmware version 3.0 above
This commit is contained in:
parent
2c89d8f240
commit
4c6d6ab0f6
|
@ -304,7 +304,7 @@ enum class PumpType {
|
|||
specialBolusSize = null,
|
||||
extendedBolusSettings = DoseSettings(0.05, 10, 5 * 60, 0.05),
|
||||
pumpTempBasalType = PumpTempBasalType.Absolute,
|
||||
tbrSettings = DoseSettings(0.01, 30, 24 * 60, 0.0, 6.0),
|
||||
tbrSettings = DoseSettings(0.01, 30, 24 * 60, 0.0, 15.0),
|
||||
specialBasalDurations = PumpCapability.BasalRate_Duration30minAllowed,
|
||||
baseBasalMinValue = 0.05,
|
||||
baseBasalMaxValue = 3.0,
|
||||
|
|
|
@ -291,7 +291,7 @@ class DiaconnG8Plugin @Inject constructor(
|
|||
@Synchronized
|
||||
override fun setTempBasalAbsolute(absoluteRate: Double, durationInMinutes: Int, profile: Profile, enforceNew: Boolean, tbrType: PumpSync.TemporaryBasalType): PumpEnactResult {
|
||||
val result = PumpEnactResult(injector)
|
||||
var absoluteAfterConstrain = constraintChecker.applyBasalConstraints(Constraint(absoluteRate), profile).value()
|
||||
val absoluteAfterConstrain = constraintChecker.applyBasalConstraints(Constraint(absoluteRate), profile).value()
|
||||
val doTempOff = baseBasalRate - absoluteAfterConstrain == 0.0
|
||||
val doLowTemp = absoluteAfterConstrain < baseBasalRate
|
||||
val doHighTemp = absoluteAfterConstrain > baseBasalRate
|
||||
|
@ -312,7 +312,7 @@ class DiaconnG8Plugin @Inject constructor(
|
|||
|
||||
if (doLowTemp || doHighTemp) {
|
||||
// Check if some temp is already in progress
|
||||
if(absoluteAfterConstrain > 6.0) absoluteAfterConstrain = 6.0 // pumpLimit
|
||||
//if(absoluteAfterConstrain > 6.0) absoluteAfterConstrain = 6.0 // pumpLimit
|
||||
//val activeTemp = activePluginProvider.activeTreatments.getTempBasalFromHistory(System.currentTimeMillis())
|
||||
if (diaconnG8Pump.isTempBasalInProgress) {
|
||||
aapsLogger.debug(LTag.PUMP, "setTempBasalAbsolute: currently running")
|
||||
|
|
|
@ -259,9 +259,9 @@ class DiaconnG8Pump @Inject constructor(
|
|||
// 7. Tempbasal status
|
||||
var tbStatus = 0 // 임시기저 상태 (1 : running, 2:not running )
|
||||
var tbTime = 0 // 임시기저 시간
|
||||
var tbInjectRateRatio = 0 // 임시기저 주입량/률 1000(0.00U)~1600(6.00U), 50000(0%)~50200(200%), 50000이상이면 주입률로 판정
|
||||
var tbInjectRateRatio = 0 // 임시기저 주입량/률 1000(0.00U)~1600(6.00U), 50000(0%)~50250(250%), 50000이상이면 주입률로 판정
|
||||
var tbElapsedTime = 0 // 임시기저 경과 시간(0~1425분)
|
||||
var tbInjectAbsoluteValue = 0.0 // 임시기저 주입량/률 1000(0.00U)~1600(6.00U)
|
||||
var tbInjectAbsoluteValue = 0.0 // 임시기저 주입량/률 1000(0.00U)~2500(15.00U)
|
||||
|
||||
// 8. Basal status
|
||||
var baseStatus = 0 // 주입상태
|
||||
|
|
|
@ -569,7 +569,7 @@ class BigLogInquireResponsePacket(
|
|||
absoluteRate = pumpDesc.pumpType.determineCorrectBasalSize(diaconnG8Pump.baseAmount * (tempBasalPercent / 100.0))
|
||||
}
|
||||
|
||||
if (logItem.getTbInjectRateRatio() in 1000..1600) {
|
||||
if (logItem.getTbInjectRateRatio() in 1000..2500) {
|
||||
absoluteRate = (logItem.getTbInjectRateRatio() - 1000) / 100.0
|
||||
}
|
||||
|
||||
|
@ -604,7 +604,7 @@ class BigLogInquireResponsePacket(
|
|||
val tempBasalPercent = logItem.getTbInjectRateRatio() - 50000
|
||||
absoluteRate = diaconnG8Pump.baseAmount * (tempBasalPercent / 100.0)
|
||||
}
|
||||
if (logItem.getTbInjectRateRatio() in 1000..1600) {
|
||||
if (logItem.getTbInjectRateRatio() in 1000..2500) {
|
||||
absoluteRate = (logItem.getTbInjectRateRatio() - 1000) / 100.0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue