fix Dana BLE model detection
This commit is contained in:
parent
90baf8e0ea
commit
d0365afe89
|
@ -406,7 +406,8 @@ class DanaPump @Inject constructor(
|
||||||
0x05 -> PumpType.DANA_RS
|
0x05 -> PumpType.DANA_RS
|
||||||
0x06 -> PumpType.DANA_RS_KOREAN
|
0x06 -> PumpType.DANA_RS_KOREAN
|
||||||
0x07 -> PumpType.DANA_I
|
0x07 -> PumpType.DANA_I
|
||||||
else -> PumpType.DANA_R
|
0x09 -> PumpType.DANA_I
|
||||||
|
else -> PumpType.USER
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -137,7 +137,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
isAbsolute = false,
|
isAbsolute = false,
|
||||||
type = temporaryBasalInfo?.type,
|
type = temporaryBasalInfo?.type,
|
||||||
pumpId = pumpId,
|
pumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT TEMPSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Ratio: " + param1 + "% Duration: " + param2 + "min")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT TEMPSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Ratio: " + param1 + "% Duration: " + param2 + "min")
|
||||||
status = "TEMPSTART " + dateUtil.timeString(datetime)
|
status = "TEMPSTART " + dateUtil.timeString(datetime)
|
||||||
|
@ -147,7 +147,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
val newRecord = pumpSync.syncStopTemporaryBasalWithPumpId(
|
val newRecord = pumpSync.syncStopTemporaryBasalWithPumpId(
|
||||||
timestamp = datetime,
|
timestamp = datetime,
|
||||||
endPumpId = pumpId,
|
endPumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT TEMPSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT TEMPSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")")
|
||||||
status = "TEMPSTOP " + dateUtil.timeString(datetime)
|
status = "TEMPSTOP " + dateUtil.timeString(datetime)
|
||||||
|
@ -160,7 +160,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
duration = T.mins(param2.toLong()).msecs(),
|
duration = T.mins(param2.toLong()).msecs(),
|
||||||
isEmulatingTB = false,
|
isEmulatingTB = false,
|
||||||
pumpId = pumpId,
|
pumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT EXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT EXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
|
||||||
status = "EXTENDEDSTART " + dateUtil.timeString(datetime)
|
status = "EXTENDEDSTART " + dateUtil.timeString(datetime)
|
||||||
|
@ -170,7 +170,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
val newRecord = pumpSync.syncStopExtendedBolusWithPumpId(
|
val newRecord = pumpSync.syncStopExtendedBolusWithPumpId(
|
||||||
timestamp = datetime,
|
timestamp = datetime,
|
||||||
endPumpId = pumpId,
|
endPumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT EXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT EXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
|
||||||
status = "EXTENDEDSTOP " + dateUtil.timeString(datetime)
|
status = "EXTENDEDSTOP " + dateUtil.timeString(datetime)
|
||||||
|
@ -183,7 +183,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
amount = param1 / 100.0,
|
amount = param1 / 100.0,
|
||||||
type = detailedBolusInfo?.bolusType,
|
type = detailedBolusInfo?.bolusType,
|
||||||
pumpId = pumpId,
|
pumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT BOLUS (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Bolus: " + param1 / 100.0 + "U ")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT BOLUS (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Bolus: " + param1 / 100.0 + "U ")
|
||||||
status = "BOLUS " + dateUtil.timeString(datetime)
|
status = "BOLUS " + dateUtil.timeString(datetime)
|
||||||
|
@ -196,7 +196,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
amount = param1 / 100.0,
|
amount = param1 / 100.0,
|
||||||
type = detailedBolusInfo?.bolusType,
|
type = detailedBolusInfo?.bolusType,
|
||||||
pumpId = pumpId,
|
pumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT DUALBOLUS (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Bolus: " + param1 / 100.0 + "U Duration: " + param2 + "min")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT DUALBOLUS (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Bolus: " + param1 / 100.0 + "U Duration: " + param2 + "min")
|
||||||
status = "DUALBOLUS " + dateUtil.timeString(datetime)
|
status = "DUALBOLUS " + dateUtil.timeString(datetime)
|
||||||
|
@ -209,7 +209,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
duration = T.mins(param2.toLong()).msecs(),
|
duration = T.mins(param2.toLong()).msecs(),
|
||||||
isEmulatingTB = false,
|
isEmulatingTB = false,
|
||||||
pumpId = pumpId,
|
pumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT DUALEXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT DUALEXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
|
||||||
status = "DUALEXTENDEDSTART " + dateUtil.timeString(datetime)
|
status = "DUALEXTENDEDSTART " + dateUtil.timeString(datetime)
|
||||||
|
@ -219,7 +219,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
val newRecord = pumpSync.syncStopExtendedBolusWithPumpId(
|
val newRecord = pumpSync.syncStopExtendedBolusWithPumpId(
|
||||||
timestamp = datetime,
|
timestamp = datetime,
|
||||||
endPumpId = pumpId,
|
endPumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT DUALEXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT DUALEXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
|
||||||
status = "DUALEXTENDEDSTOP " + dateUtil.timeString(datetime)
|
status = "DUALEXTENDEDSTOP " + dateUtil.timeString(datetime)
|
||||||
|
@ -264,7 +264,7 @@ open class DanaRSPacketAPSHistoryEvents(
|
||||||
timestamp = datetime,
|
timestamp = datetime,
|
||||||
amount = param1.toDouble(),
|
amount = param1.toDouble(),
|
||||||
pumpId = pumpId,
|
pumpId = pumpId,
|
||||||
pumpType = PumpType.DANA_RS,
|
pumpType = danaPump.pumpType(),
|
||||||
pumpSerial = danaPump.serialNumber)
|
pumpSerial = danaPump.serialNumber)
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT CARBS (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Carbs: " + param1 + "g")
|
aapsLogger.debug(LTag.PUMPCOMM, "[" + pumpId + "] " + (if (newRecord) "**NEW** " else "") + "EVENT CARBS (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Carbs: " + param1 + "g")
|
||||||
status = "CARBS " + dateUtil.timeString(datetime)
|
status = "CARBS " + dateUtil.timeString(datetime)
|
||||||
|
|
Loading…
Reference in a new issue