- problem with display, pumpType was not set.

This commit is contained in:
Andy Rozman 2020-03-08 18:10:48 +00:00
parent 051e31fb4b
commit ff3409d650
3 changed files with 14 additions and 4 deletions

View file

@ -14,6 +14,7 @@ import info.nightscout.androidaps.events.EventPreferenceChange
import info.nightscout.androidaps.logging.L
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState
@ -339,7 +340,12 @@ class OmnipodFragment : Fragment() {
fun updateGUI() {
val plugin = OmnipodPumpPlugin.getPlugin()
val pumpStatus = OmnipodUtil.getPumpStatus()
val pumpType = OmnipodUtil.getPumpType()
var pumpType = OmnipodUtil.getPumpType()
if (pumpType==null) {
LOG.warn("PumpType was not set, reseting to Omnipod.")
pumpType = PumpType.Insulet_Omnipod;
}
setDeviceStatus()

View file

@ -54,6 +54,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.pod
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommandType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommunicationManagerInterface;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCustomActionType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodPodType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodPumpPluginInterface;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodStatusRequest;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState;
@ -134,8 +135,8 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
// }
// // TODO ccc
// OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros);
// OmnipodUtil.setPlugin(this);
serviceConnection = new ServiceConnection() {
@ -169,6 +170,9 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
omnipodCommunicationManager.setPumpStatus(pumpStatusLocal);
}
OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros);
OmnipodUtil.setPlugin(OmnipodPumpPlugin.this);
omnipodUIComm = new OmnipodUIComm(omnipodCommunicationManager, plugin, pumpStatusLocal);
break;
}

View file

@ -72,7 +72,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
displayConnectionMessages = false;
OmnipodUtil.setOmnipodPodType(OmnipodPodType.Dash);
//OmnipodUtil.setOmnipodPodType(OmnipodPodType.Dash);
if (omnipodCommunicationManager == null) {
omnipodCommunicationManager = OmnipodDashCommunicationManager.getInstance();