diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.java index cce127ffdf..6b3da92b56 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.java @@ -5,6 +5,10 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.data. import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin; import info.nightscout.androidaps.plugins.pump.medtronic.events.EventRefreshButtonState; import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtronicService; +import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil; +import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin; +import info.nightscout.androidaps.plugins.pump.omnipod.service.RileyLinkOmnipodService; +import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil; /** * Created by geoff on 7/16/16. @@ -26,9 +30,15 @@ public class ResetRileyLinkConfigurationTask extends PumpTask { @Override public void run() { RxBus.INSTANCE.send(new EventRefreshButtonState(false)); - MedtronicPumpPlugin.isBusy = true; - RileyLinkMedtronicService.getInstance().resetRileyLinkConfiguration(); - MedtronicPumpPlugin.isBusy = false; + if (MedtronicUtil.isMedtronicPump()) { + MedtronicPumpPlugin.isBusy = true; + RileyLinkMedtronicService.getInstance().resetRileyLinkConfiguration(); + MedtronicPumpPlugin.isBusy = false; + } else if (OmnipodUtil.isOmnipodEros()) { + OmnipodPumpPlugin.isBusy = true; + RileyLinkOmnipodService.getInstance().resetRileyLinkConfiguration(); + OmnipodPumpPlugin.isBusy = false; + } RxBus.INSTANCE.send(new EventRefreshButtonState(true)); }