From 90b8b8ed00df3887264bd38ee1acac1edfe9270d Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Fri, 12 Nov 2021 18:15:03 +0100 Subject: [PATCH 1/2] create new string for "Delivering .." --- .../plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt | 2 +- omnipod-dash/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index ce3a4a3e7b..02158e0aa5 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -694,7 +694,7 @@ class OmnipodDashPumpPlugin @Inject constructor( } val percent = (waited.toFloat() / estimatedDeliveryTimeSeconds) * 100 updateBolusProgressDialog( - rh.gs(R.string.bolusdelivering, requestedBolusAmount), + rh.gs(R.string.dash_bolusdelivering, requestedBolusAmount), percent.toInt() ) } diff --git a/omnipod-dash/src/main/res/values/strings.xml b/omnipod-dash/src/main/res/values/strings.xml index 1b6f4dbb45..607f6ebdc5 100644 --- a/omnipod-dash/src/main/res/values/strings.xml +++ b/omnipod-dash/src/main/res/values/strings.xml @@ -46,4 +46,5 @@ Unknown state for the command Rate: %1$.2f U, duration: %2$d minutes %1$.2f U + Delivering %1$.2f U From b0b287303afb68b178603527fa0da25f7c1db6a3 Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Fri, 12 Nov 2021 18:15:52 +0100 Subject: [PATCH 2/2] Revert "do not stop the fake tbr on pod activation" This reverts commit 041f1a962e931f22f54f5b418ed239810163d3a8. --- .../viewmodel/action/DashInsertCannulaViewModel.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt index 3bea03140f..743e96adbf 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt @@ -21,6 +21,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.BasalValuesRecord import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.InitialResult import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.ResolvedResult +import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.Constants import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.I8n import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.mapProfileToBasalProgram import info.nightscout.androidaps.utils.FabricPrivacy @@ -94,6 +95,15 @@ class DashInsertCannulaViewModel @Inject constructor( onComplete = { logger.debug("Pod activation part 2 completed") podStateManager.basalProgram = basalProgram + + pumpSync.syncStopTemporaryBasalWithPumpId( + timestamp = System.currentTimeMillis(), + endPumpId = System.currentTimeMillis(), + pumpType = PumpType.OMNIPOD_DASH, + pumpSerial = Constants.PUMP_SERIAL_FOR_FAKE_TBR // cancel the fake TBR with the same pump + // serial that it was created with + ) + pumpSync.connectNewPump() pumpSync.insertTherapyEventIfNewWithTimestamp(