Merge branch 'omnipod_eros' of https://github.com/AAPS-Omnipod/AndroidAPS into omnipod_eros

This commit is contained in:
Andy Rozman 2020-01-24 11:20:59 +00:00
commit 22b8d08449

View file

@ -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));
}