Merge pull request #1691 from avereha/avereha/loggig

add logging
This commit is contained in:
Milos Kozak 2022-05-04 12:17:55 +02:00 committed by GitHub
commit deee2bf6f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1364,16 +1364,17 @@ class OmnipodDashPumpPlugin @Inject constructor(
private fun handleCommandConfirmation(confirmation: CommandConfirmed) {
val command = confirmation.command
val historyEntry = history.getById(command.historyId)
aapsLogger.debug(LTag.PUMPCOMM, "handling command confirmation: $confirmation")
aapsLogger.debug(LTag.PUMPCOMM, "handling command confirmation: $confirmation ${historyEntry.commandType}")
when (historyEntry.commandType) {
OmnipodCommandType.CANCEL_TEMPORARY_BASAL -> {
if (confirmation.success) {
pumpSync.syncStopTemporaryBasalWithPumpId(
val ret = pumpSync.syncStopTemporaryBasalWithPumpId(
historyEntry.createdAt,
historyEntry.pumpId(),
PumpType.OMNIPOD_DASH,
serialNumber()
)
aapsLogger.info(LTag.PUMP, "syncStopTemporaryBasalWithPumpId ret=$ret")
podStateManager.tempBasal = null
}
rxBus.send(EventDismissNotification(Notification.OMNIPOD_TBR_ALERTS))