diff --git a/app/libs/com.atech-software.android.library.wizardpager-1.1.0.aar b/app/libs/com.atech-software.android.library.wizardpager-1.1.0.aar
index 36f9934047..ab5d7f1c98 100644
Binary files a/app/libs/com.atech-software.android.library.wizardpager-1.1.0.aar and b/app/libs/com.atech-software.android.library.wizardpager-1.1.0.aar differ
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java
index 19a339260a..dc1dea851f 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/OmnipodPumpPlugin.java
@@ -43,7 +43,7 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ResetRileyLinkConfigurationTask;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ServiceTaskExecutor;
-import info.nightscout.androidaps.plugins.pump.omnipod.comm.AapsOmnipodManager;
+import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.ui.OmnipodUIComm;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.ui.OmnipodUITask;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommandType;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodManager.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodManager.java
index a3ab492ca9..2ed1f20606 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodManager.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodManager.java
@@ -39,10 +39,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.SetupProgress;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.schedule.BasalScheduleMapper;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState;
-import info.nightscout.androidaps.plugins.pump.omnipod.driver.db.PodDbEntry;
-import info.nightscout.androidaps.plugins.pump.omnipod.driver.db.PodDbEntryType;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodConst;
-import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil;
import info.nightscout.androidaps.utils.SP;
public class OmnipodManager {
@@ -186,10 +183,6 @@ public class OmnipodManager {
podState = null;
SP.remove(OmnipodConst.Prefs.PodState);
- addToHistory(System.currentTimeMillis(), PodDbEntryType.ResetPodState, null, null, null, null);
-
- OmnipodUtil.setPodSessionState(null);
-
return new PumpEnactResult().success(true).enacted(true);
}
@@ -361,27 +354,7 @@ public class OmnipodManager {
return new PumpEnactResult().success(false).enacted(false).comment("Pod should be initialized first");
}
- private void addToHistory(long requestTime, PodDbEntryType entryType, String shortDescription, OmnipodAction omnipodAction, Long responseTime, Object response) {
- // TODO andy
-
- PodDbEntry entry = new PodDbEntry(requestTime, entryType);
-
- if (shortDescription!=null) {
- entry.setShortDescription(shortDescription);
- }
-
- if (omnipodAction!=null) {
-
- }
-
- if (responseTime!=null) {
-
- }
-
- if (response!=null) {
-
- }
-
+ public PodSessionState getPodState() {
+ return this.podState;
}
-
}
\ No newline at end of file
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/PodManagementActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/PodManagementActivity.kt
index 4e8acdef24..bf53f4e1d7 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/PodManagementActivity.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/PodManagementActivity.kt
@@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dialogs
import android.content.Intent
import android.os.Bundle
-import android.os.SystemClock
import com.atech.android.library.wizardpager.WizardPagerActivity
import com.atech.android.library.wizardpager.WizardPagerContext
import com.atech.android.library.wizardpager.data.WizardPagerSettings
@@ -10,14 +9,10 @@ import com.atech.android.library.wizardpager.defs.WizardStepsWayType
import info.nightscout.androidaps.MainApp
import info.nightscout.androidaps.R
import info.nightscout.androidaps.activities.NoSplashActivity
-import info.nightscout.androidaps.plugins.bus.RxBus
-import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
-import info.nightscout.androidaps.plugins.pump.omnipod.comm.AapsOmnipodManager
+import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.InitPodCancelAction
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod.InitPodWizardModel
-import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.OmnipodManagerAAPS
-import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodPumpValuesChanged
-import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodRefreshButtonState
+import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.removepod.RemovePodWizardModel
import info.nightscout.androidaps.utils.OKDialog
import kotlinx.android.synthetic.main.omnipod_pod_mgmt.*
@@ -49,7 +44,7 @@ class PodManagementActivity : NoSplashActivity() {
fun initPodAction() {
- // TODO check if RL is running
+ // TODO check if RL is running and that pod is not active
val pagerSettings = WizardPagerSettings()
@@ -59,30 +54,43 @@ class PodManagementActivity : NoSplashActivity() {
pagerSettings.setNextButtonBackground(R.drawable.selectable_item_background)
pagerSettings.setBackStringResourceId(R.string.cancel)
pagerSettings.setCancelAction(InitPodCancelAction())
- pagerSettings.setTheme(R.style.AppTheme_NoActionBar)
+ val wizardPagerContext = WizardPagerContext.getInstance();
- WizardPagerContext.getInstance().pagerSettings = pagerSettings
- WizardPagerContext.getInstance().wizardModel = InitPodWizardModel(applicationContext)
+ wizardPagerContext.clearContext()
+ wizardPagerContext.pagerSettings = pagerSettings
+ wizardPagerContext.wizardModel = InitPodWizardModel(applicationContext)
+
+ val myIntent = Intent(this@PodManagementActivity, WizardPagerActivity::class.java)
+ this@PodManagementActivity.startActivity(myIntent)
+ }
+
+ fun removePodAction() {
+ // TODO check that pod is active
+
+ val pagerSettings = WizardPagerSettings()
+
+ pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext)
+ pagerSettings.setFinishStringResourceId(R.string.close)
+ pagerSettings.setFinishButtonBackground(R.drawable.finish_background)
+ pagerSettings.setNextButtonBackground(R.drawable.selectable_item_background)
+ pagerSettings.setBackStringResourceId(R.string.cancel)
+ pagerSettings.setCancelAction(InitPodCancelAction())
+
+ val wizardPagerContext = WizardPagerContext.getInstance();
+
+ wizardPagerContext.clearContext()
+ wizardPagerContext.pagerSettings = pagerSettings
+ wizardPagerContext.wizardModel = RemovePodWizardModel(applicationContext)
val myIntent = Intent(this@PodManagementActivity, WizardPagerActivity::class.java)
this@PodManagementActivity.startActivity(myIntent)
-
-
-
-
- //OKDialog.showConfirmation(this,
- // MainApp.gs(R.string.omnipod_cmd_init_pod_na), null)
- }
-
- fun removePodAction() {
- OKDialog.showConfirmation(this,
- MainApp.gs(R.string.omnipod_cmd_deactivate_pod_na), null)
-
}
fun resetPodAction() {
+ // TODO check that pod is active
+
OKDialog.showConfirmation(this,
MainApp.gs(R.string.omnipod_cmd_reset_pod_desc), Thread {
AapsOmnipodManager.getInstance().resetPodStatus()
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitPodCancelAction.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitPodCancelAction.java
index a6f443a9a2..c66da138b9 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitPodCancelAction.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitPodCancelAction.java
@@ -2,6 +2,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.initpod;
import com.atech.android.library.wizardpager.defs.action.AbstractCancelAction;
+import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager;
+
public class InitPodCancelAction extends AbstractCancelAction {
@Override
public void execute(String cancelReason) {
@@ -10,12 +12,8 @@ public class InitPodCancelAction extends AbstractCancelAction {
}
if (this.cancelActionText.equals("Cancel")) {
- // TODO
- // remove pod from SP
-
- // do refresh of tab
+ AapsOmnipodManager.getInstance().resetPodStatus();
}
-
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/pages/InitActionFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/pages/InitActionFragment.java
index 4fda8fff75..c7da0c44ab 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/pages/InitActionFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/pages/InitActionFragment.java
@@ -4,7 +4,6 @@ import android.app.Activity;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
-import android.os.SystemClock;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -27,7 +26,7 @@ import java.util.Map;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.pump.omnipod.comm.AapsOmnipodManager;
+import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitReceiver;
@@ -103,6 +102,10 @@ public class InitActionFragment extends Fragment implements PodInitReceiver {
mapCheckBoxes.put(child, checkBox1);
}
+ if (podInitActionType==PodInitActionType.DeactivatePodWizardStep) {
+ headerView.setText(R.string.omnipod_remove_pod_wizard_step2_action_header);
+ }
+
return rootView;
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/removepod/RemovePodWizardModel.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/removepod/RemovePodWizardModel.java
index 12052a4c0b..6300cf8327 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/removepod/RemovePodWizardModel.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/removepod/RemovePodWizardModel.java
@@ -32,43 +32,33 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.pages.Init
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.pages.PodInfoFragment;
public class RemovePodWizardModel extends AbstractWizardModel {
+
public RemovePodWizardModel(Context context) {
super(context);
}
@Override
protected PageList onNewRootPageList() {
- // TODO
+
return new PageList(
new DisplayTextPage(this,
- R.string.omnipod_init_pod_wizard_step1_title,
- R.string.omnipod_init_pod_wizard_step1_desc,
+ R.string.omnipod_remove_pod_wizard_step1_title,
+ R.string.omnipod_remove_pod_wizard_step1_desc,
R.style.WizardPagePodContent).setRequired(true).setCancelReason("None"),
new InitActionPage(this,
- R.string.omnipod_init_pod_wizard_step2_title,
- PodInitActionType.PairAndPrimeWizardStep
- ).setRequired(true).setCancelReason("Cancel"),
+ R.string.omnipod_remove_pod_wizard_step2_title,
+ PodInitActionType.DeactivatePodWizardStep
+ ).setRequired(true).setCancelReason("Cancel")
- new DisplayTextPage(this,
- R.string.omnipod_init_pod_wizard_step3_title,
- R.string.omnipod_init_pod_wizard_step3_desc,
- R.style.WizardPagePodContent).setRequired(true).setCancelReason("Cancel"),
-
- new InitActionPage(this,
- R.string.omnipod_init_pod_wizard_step4_title,
- PodInitActionType.FillCannulaSetBasalProfileWizardStep).setRequired(true).setCancelReason("Cancel")
-
- //new PodInfoPage(this, "Pod Info").setRequired(true)
);
}
public Fragment getReviewFragment() {
- // TODO
PodInfoFragment.isInitPod = false;
- return DisplayTextFragment.create(null, 0, 0);
+ return new PodInfoFragment();
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/AapsOmnipodManager.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java
similarity index 70%
rename from app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/AapsOmnipodManager.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java
index c11cc49eda..7e73391228 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/AapsOmnipodManager.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/AapsOmnipodManager.java
@@ -1,21 +1,27 @@
-package info.nightscout.androidaps.plugins.pump.omnipod.comm;
+package info.nightscout.androidaps.plugins.pump.omnipod.driver.comm;
import org.joda.time.DateTime;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
+import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
+import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationService;
+import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodManager;
+import info.nightscout.androidaps.plugins.pump.omnipod.comm.action.OmnipodAction;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommunicationManagerInterface;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitReceiver;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.OmnipodPumpStatus;
-import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.OmnipodManagerAAPS;
+import info.nightscout.androidaps.plugins.pump.omnipod.driver.db.PodDbEntry;
+import info.nightscout.androidaps.plugins.pump.omnipod.driver.db.PodDbEntryType;
+import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodPumpValuesChanged;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil;
public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface {
- private final OmnipodManagerAAPS delegate;
+ private final OmnipodManager delegate;
private static AapsOmnipodManager instance;
private OmnipodPumpStatus pumpStatus;
@@ -41,7 +47,10 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
// FIXME we need a basal profile here
PumpEnactResult result = delegate.insertCannula(profile);
podInitReceiver.returnInitTaskStatus(podInitActionType, result.success, (result.success ? null : result.comment));
- OmnipodUtil.setPodSessionState(delegate.podState);
+ if (result.success) {
+ OmnipodUtil.setPodSessionState(delegate.getPodState());
+ RxBus.INSTANCE.send(new EventOmnipodPumpValuesChanged());
+ }
return result;
}
return new PumpEnactResult().success(false).enacted(false).comment("Illegal PodInitActionType: " + podInitActionType.name());
@@ -54,9 +63,20 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
@Override
public PumpEnactResult deactivatePod(PodInitReceiver podInitReceiver) {
- return delegate.deactivatePod(podInitReceiver);
+
+ PumpEnactResult result = delegate.deactivatePod();
+ podInitReceiver.returnInitTaskStatus(PodInitActionType.DeactivatePodWizardStep, result.success, (result.success ? null : result.comment));
+
+ if (result.success) {
+ OmnipodUtil.setPodSessionState(null);
+ RxBus.INSTANCE.send(new EventOmnipodPumpValuesChanged());
+ }
+
+ return result;
}
+
+
@Override
public PumpEnactResult setBasalProfile(Profile basalProfile) {
return delegate.setBasalProfile(basalProfile);
@@ -64,7 +84,16 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
@Override
public PumpEnactResult resetPodStatus() {
- return delegate.resetPodState();
+
+ PumpEnactResult result = delegate.resetPodState();
+
+ //addToHistory(System.currentTimeMillis(), PodDbEntryType.ResetPodState, null, null, null, null);
+
+ OmnipodUtil.setPodSessionState(null);
+
+ RxBus.INSTANCE.send(new EventOmnipodPumpValuesChanged());
+
+ return result;
}
@Override
@@ -95,6 +124,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
@Override
public void setPumpStatus(OmnipodPumpStatus pumpStatus) {
this.pumpStatus = pumpStatus;
+ this.getCommunicationService().setPumpStatus(pumpStatus);
}
// TODO should we add this to the OmnipodCommunicationManager interface?
@@ -130,4 +160,14 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
public String getPodStateAsString() {
return delegate.getPodStateAsString();
}
+
+
+ private void addToHistory(long requestTime, PodDbEntryType entryType, String data, boolean success) {
+ // TODO andy needs to be refactored
+
+ //PodDbEntry entry = new PodDbEntry(requestTime, entryType);
+
+
+
+ }
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/OmnipodManagerAAPS.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/OmnipodManagerAAPS.java
index ecf9e76bf3..1ca3b3c1df 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/OmnipodManagerAAPS.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/comm/OmnipodManagerAAPS.java
@@ -62,7 +62,7 @@ public class OmnipodManagerAAPS extends OmnipodManager //implements OmnipodCommu
public PumpEnactResult resetPodState() {
resetPodStateInternal();
- addToHistory(System.currentTimeMillis(), PodDbEntryType.ResetPodState, null, null, null, true);
+ //addToHistory(System.currentTimeMillis(), PodDbEntryType.ResetPodState, null, null, null, true);
return new PumpEnactResult().success(true).enacted(true);
}
@@ -76,22 +76,5 @@ public class OmnipodManagerAAPS extends OmnipodManager //implements OmnipodCommu
}
- private void addToHistory(long requestTime, PodDbEntryType entryType, OmnipodAction omnipodAction, Long responseTime, Object response, boolean success) {
- // TODO andy
- PodDbEntry entry = new PodDbEntry(requestTime, entryType);
-
- if (omnipodAction!=null) {
-
- }
-
- if (responseTime!=null) {
- entry.setDateTimeResponse(responseTime);
- }
-
- if (response!=null) {
-
- }
-
- }
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/service/RileyLinkOmnipodService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/service/RileyLinkOmnipodService.java
index d7225c2d1a..a51718cb70 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/service/RileyLinkOmnipodService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/service/RileyLinkOmnipodService.java
@@ -23,7 +23,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkService;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData;
-import info.nightscout.androidaps.plugins.pump.omnipod.comm.AapsOmnipodManager;
+import info.nightscout.androidaps.plugins.pump.omnipod.driver.comm.AapsOmnipodManager;
import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationService;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommunicationManagerInterface;
@@ -121,11 +121,15 @@ public class RileyLinkOmnipodService extends RileyLinkService {
Gson gson = OmnipodUtil.getGsonInstance();
String storedPodState = SP.getString(OmnipodConst.Prefs.PodState, null);
podState = gson.fromJson(storedPodState, PodSessionState.class);
+ OmnipodUtil.setPodSessionState(podState);
} catch (Exception ex) {
LOG.error("Could not deserialize Pod state: " + ex.getClass().getSimpleName() + ": " + ex.getMessage());
}
}
- omnipodCommunicationManager = new AapsOmnipodManager(new OmnipodCommunicationService(rfspy), podState, pumpStatus);
+ OmnipodCommunicationService omnipodCommunicationService = new OmnipodCommunicationService(rfspy);
+ omnipodCommunicationService.setPumpStatus(pumpStatus);
+
+ omnipodCommunicationManager = new AapsOmnipodManager(omnipodCommunicationService, podState, pumpStatus);
} else {
omnipodCommunicationManager = AapsOmnipodManager.getInstance();
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e91968f83b..7c76bd9632 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1651,10 +1651,7 @@
Reset Pod
Pod History
- Init Pod not available at the moment.
- Deactivate Pod not available at the moment.
- Reset Pod not available at the moment.
- If you press "OK" Pod will be forcefully removed. Do this only if Deactivate Pod fails.
+ If you press "OK" Pod will be forcefully removed. Do this only if you can not communicate with Pod anymore.
Pod History not available at the moment.
Omnipod
@@ -1671,7 +1668,13 @@
Fill Cannula and Start Basal delivery
Pod Info
Pod is now active.\n\nBasal has been programmed.\n\nCheck infusion site and cannula. If cannula seems incorrectly inserted, please replace the Pod.
- Pod Info
+
+ Prepare for Pod Removal
+ \nPress Next to begin Pod removal process.\n\n\nThis will stop delivery of insulin and deactivate Pod.
+ Remove the Pod
+ We are trying to communicate with Pod.\n\nWhen all items are checked, you can press Next. If Pod removal fails and you click on Cancel, Pod will be forcefully removed from AAPS.
+
+ Pod deactivated.\n\nRemove and discard the Pod.\n\nWhen you are ready, prepare the next Pod and start Init Pod action.
Pair Pod
Prime Pod