Merge branch 'omnipod_eros_dev' of github.com:AAPS-Omnipod/AndroidAPS into omnipod_eros_dev
This commit is contained in:
commit
674cd1c0ae
|
@ -25,4 +25,4 @@ abstract class OmnipodModule {
|
||||||
@ContributesAndroidInjector abstract fun podSessionState(): PodSessionState
|
@ContributesAndroidInjector abstract fun podSessionState(): PodSessionState
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.defs.state;
|
package info.nightscout.androidaps.plugins.pump.omnipod.defs.state;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.annotations.Expose;
|
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.DateTimeZone;
|
import org.joda.time.DateTimeZone;
|
||||||
|
@ -34,42 +33,26 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
||||||
|
|
||||||
public class PodSessionState extends PodState {
|
public class PodSessionState extends PodState {
|
||||||
|
|
||||||
@Inject AAPSLogger aapsLogger;
|
@Inject transient AAPSLogger aapsLogger;
|
||||||
@Inject SP sp;
|
@Inject transient SP sp;
|
||||||
@Inject OmnipodUtil omnipodUtil;
|
@Inject transient OmnipodUtil omnipodUtil;
|
||||||
|
|
||||||
@Expose
|
|
||||||
private final Map<AlertSlot, AlertType> configuredAlerts;
|
|
||||||
@Expose
|
|
||||||
private transient PodStateChangedHandler stateChangedHandler;
|
private transient PodStateChangedHandler stateChangedHandler;
|
||||||
@Expose
|
|
||||||
private DateTime activatedAt;
|
|
||||||
@Expose
|
|
||||||
private DateTime expiresAt;
|
|
||||||
@Expose
|
|
||||||
private final FirmwareVersion piVersion;
|
|
||||||
@Expose
|
|
||||||
private final FirmwareVersion pmVersion;
|
|
||||||
@Expose
|
|
||||||
private final int lot;
|
|
||||||
@Expose
|
|
||||||
private final int tid;
|
|
||||||
@Expose
|
|
||||||
private Double reservoirLevel;
|
|
||||||
@Expose
|
|
||||||
private boolean suspended;
|
|
||||||
|
|
||||||
@Expose
|
private final Map<AlertSlot, AlertType> configuredAlerts;
|
||||||
private DateTimeZone timeZone;
|
private DateTimeZone timeZone;
|
||||||
@Expose
|
private DateTime activatedAt;
|
||||||
|
private DateTime expiresAt;
|
||||||
|
private final FirmwareVersion piVersion;
|
||||||
|
private final FirmwareVersion pmVersion;
|
||||||
|
private final int lot;
|
||||||
|
private final int tid;
|
||||||
|
private Double reservoirLevel;
|
||||||
|
private boolean suspended;
|
||||||
private NonceState nonceState;
|
private NonceState nonceState;
|
||||||
@Expose
|
|
||||||
private SetupProgress setupProgress;
|
private SetupProgress setupProgress;
|
||||||
@Expose
|
|
||||||
private AlertSet activeAlerts;
|
private AlertSet activeAlerts;
|
||||||
@Expose
|
|
||||||
private BasalSchedule basalSchedule;
|
private BasalSchedule basalSchedule;
|
||||||
@Expose
|
|
||||||
private DeliveryStatus lastDeliveryStatus;
|
private DeliveryStatus lastDeliveryStatus;
|
||||||
|
|
||||||
public PodSessionState(DateTimeZone timeZone, int address, FirmwareVersion piVersion,
|
public PodSessionState(DateTimeZone timeZone, int address, FirmwareVersion piVersion,
|
||||||
|
|
|
@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.defs.state;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.StatusResponse;
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.StatusResponse;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoFaultEvent;
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoFaultEvent;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil;
|
|
||||||
|
|
||||||
public abstract class PodState {
|
public abstract class PodState {
|
||||||
protected final int address;
|
protected final int address;
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class OmnipodUtil {
|
||||||
.registerTypeAdapter(DateTimeZone.class, (JsonDeserializer<DateTimeZone>) (json, typeOfT, context) ->
|
.registerTypeAdapter(DateTimeZone.class, (JsonDeserializer<DateTimeZone>) (json, typeOfT, context) ->
|
||||||
DateTimeZone.forID(json.getAsString()));
|
DateTimeZone.forID(json.getAsString()));
|
||||||
|
|
||||||
return gsonBuilder.excludeFieldsWithoutExposeAnnotation().create();
|
return gsonBuilder.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ public class OmnipodUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getNextPodAddress() {
|
public Integer getNextPodAddress() {
|
||||||
if(sp.contains(OmnipodConst.Prefs.NextPodAddress)) {
|
if (sp.contains(OmnipodConst.Prefs.NextPodAddress)) {
|
||||||
int nextPodAddress = sp.getInt(OmnipodConst.Prefs.NextPodAddress, 0);
|
int nextPodAddress = sp.getInt(OmnipodConst.Prefs.NextPodAddress, 0);
|
||||||
if (OmnipodManager.isValidAddress(nextPodAddress)) {
|
if (OmnipodManager.isValidAddress(nextPodAddress)) {
|
||||||
return nextPodAddress;
|
return nextPodAddress;
|
||||||
|
|
Loading…
Reference in a new issue