- fix for #28 serial number not shown in RL Stats dialog
This commit is contained in:
parent
d21339700d
commit
14e66a230d
2 changed files with 22 additions and 9 deletions
|
@ -1,12 +1,13 @@
|
|||
package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import org.joda.time.LocalDateTime;
|
||||
|
||||
import java.util.Locale;
|
||||
|
@ -149,6 +150,7 @@ public class RileyLinkStatusGeneral extends Fragment implements RefreshableInter
|
|||
}
|
||||
} else {
|
||||
|
||||
// if (OmnipodUtil.isOmnipodDash())
|
||||
// TODO add handling for Omnipod Dash pump status
|
||||
this.omnipodPumpStatus = OmnipodUtil.getPumpStatus();
|
||||
|
||||
|
@ -158,7 +160,7 @@ public class RileyLinkStatusGeneral extends Fragment implements RefreshableInter
|
|||
this.pumpFrequency.setText(MainApp.gs(R.string.omnipod_frequency));
|
||||
|
||||
if (omnipodPumpStatus.podAvailable) {
|
||||
this.serialNumber.setText(omnipodPumpStatus.podNumber);
|
||||
this.serialNumber.setText(omnipodPumpStatus.podSessionState.getLot());
|
||||
this.connectedDevice.setText(omnipodPumpStatus.pumpType == PumpType.Insulet_Omnipod ? "Eros Pod" : "Dash Pod");
|
||||
} else {
|
||||
this.connectedDevice.setText("-");
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.google.gson.JsonPrimitive;
|
|||
import com.google.gson.JsonSerializer;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.joda.time.format.ISODateTimeFormat;
|
||||
|
@ -20,20 +19,22 @@ import java.util.List;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.RLHistoryItem;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin;
|
||||
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.OmnipodPodType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodPumpPluginInterface;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodDeviceState;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodDeviceStatusChange;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.driver.OmnipodPumpStatus;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodPumpValuesChanged;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodDeviceStatusChange;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.service.RileyLinkOmnipodService;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod_dash.OmnipodDashPumpPlugin;
|
||||
import info.nightscout.androidaps.utils.OKDialog;
|
||||
|
||||
/**
|
||||
|
@ -205,4 +206,14 @@ public class OmnipodUtil extends RileyLinkUtil {
|
|||
public static PodSessionState getPodSessionState() {
|
||||
return omnipodPumpStatus.podSessionState;
|
||||
}
|
||||
|
||||
public static boolean isOmnipodEros() {
|
||||
return OmnipodPumpPlugin.getPlugin().isEnabled(PluginType.PUMP);
|
||||
}
|
||||
|
||||
public static boolean isOmnipodDash() {
|
||||
return OmnipodDashPumpPlugin.getPlugin().isEnabled(PluginType.PUMP);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue