- show RL status

This commit is contained in:
Andy Rozman 2020-05-08 18:38:04 +01:00
parent 480aac2d18
commit e2e4c6a17f
2 changed files with 7 additions and 4 deletions

View file

@ -85,8 +85,9 @@ public class RileyLinkServiceData {
rileyLinkUtil.getRileyLinkHistory().add(new RLHistoryItem(rileyLinkServiceState, errorCode, targetDevice));
if (activePlugin.getActivePump().manufacturer()== ManufacturerType.Medtronic)
rxBus.send(new EventMedtronicDeviceStatusChange(newState, errorCode));
else
else {
rxBus.send(new EventOmnipodDeviceStatusChange(newState, errorCode));
}
return null;
} else {

View file

@ -20,6 +20,7 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodStatusRequest
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodDeviceState
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.PodManagementActivity
@ -61,6 +62,7 @@ class OmnipodFragment : DaggerFragment() {
@Inject lateinit var omnipodPumpStatus: OmnipodPumpStatus
@Inject lateinit var sp: SP
@Inject lateinit var omnipodUtil: OmnipodUtil
@Inject lateinit var rileyLinkServiceData: RileyLinkServiceData
private var disposable: CompositeDisposable = CompositeDisposable()
@ -207,7 +209,7 @@ class OmnipodFragment : DaggerFragment() {
private fun setDeviceStatus(event : EventOmnipodDeviceStatusChange) {
}
@ -222,8 +224,8 @@ class OmnipodFragment : DaggerFragment() {
aapsLogger.info(LTag.PUMP, "setDeviceStatus: [pumpStatus={}]", omnipodPumpStatus)
val resourceId = omnipodPumpStatus.rileyLinkServiceState.getResourceId(RileyLinkTargetDevice.Omnipod)
val rileyLinkError = omnipodPumpPlugin.rileyLinkService?.error
val resourceId = rileyLinkServiceData.rileyLinkServiceState.getResourceId(RileyLinkTargetDevice.Omnipod)
val rileyLinkError = rileyLinkServiceData.rileyLinkError
omnipod_rl_status.text =
when {