- possible fix for pod not avilable notification
This commit is contained in:
parent
18145d91d9
commit
be88aa69f1
3 changed files with 8 additions and 6 deletions
|
@ -278,7 +278,7 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
|||
private void doPodCheck() {
|
||||
|
||||
if (System.currentTimeMillis() > this.nextPodCheck) {
|
||||
if (!getPodPumpStatusObject().podAvailable) {
|
||||
if (!getPodPumpStatusObject().podAvailable && getPodPumpStatusObject().podAvailibityChecked) {
|
||||
Notification notification = new Notification(Notification.OMNIPOD_POD_NOT_ATTACHED, MainApp.gs(R.string.omnipod_error_pod_not_attached), Notification.NORMAL);
|
||||
RxBus.INSTANCE.send(new EventNewNotification(notification));
|
||||
} else {
|
||||
|
|
|
@ -51,6 +51,7 @@ public class OmnipodPumpStatus extends PumpStatus {
|
|||
public String podNumber;
|
||||
public PodDeviceState podDeviceState = PodDeviceState.NeverContacted;
|
||||
public boolean podAvailable = false;
|
||||
public boolean podAvailibityChecked = false;
|
||||
public boolean ackAlertsAvailable = false;
|
||||
public String ackAlertsText = null;
|
||||
|
||||
|
|
|
@ -23,12 +23,12 @@ 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.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;
|
||||
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.AapsOmnipodManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodConst;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
|
@ -128,6 +128,7 @@ public class RileyLinkOmnipodService extends RileyLinkService {
|
|||
}
|
||||
OmnipodCommunicationService omnipodCommunicationService = new OmnipodCommunicationService(rfspy);
|
||||
omnipodCommunicationService.setPumpStatus(pumpStatus);
|
||||
pumpStatus.podAvailibityChecked = true;
|
||||
|
||||
omnipodCommunicationManager = new AapsOmnipodManager(omnipodCommunicationService, podState, pumpStatus);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue