Don't keep next Pod address in AapsOmnipodManager
This commit is contained in:
parent
5b96e18234
commit
57be461fd4
1 changed files with 1 additions and 3 deletions
|
@ -84,7 +84,6 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
|
|
||||||
private static AapsOmnipodManager instance;
|
private static AapsOmnipodManager instance;
|
||||||
private OmnipodPumpStatus pumpStatus;
|
private OmnipodPumpStatus pumpStatus;
|
||||||
private Integer nextPodAddress;
|
|
||||||
|
|
||||||
private Date lastBolusTime;
|
private Date lastBolusTime;
|
||||||
private Double lastBolusUnits;
|
private Double lastBolusUnits;
|
||||||
|
@ -99,7 +98,6 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
OmnipodUtil.setPodSessionState(podSessionState);
|
OmnipodUtil.setPodSessionState(podSessionState);
|
||||||
updatePumpStatus(podSessionState);
|
updatePumpStatus(podSessionState);
|
||||||
});
|
});
|
||||||
this.nextPodAddress = OmnipodUtil.getNextPodAddress();
|
|
||||||
this.pumpStatus = _pumpStatus;
|
this.pumpStatus = _pumpStatus;
|
||||||
instance = this;
|
instance = this;
|
||||||
}
|
}
|
||||||
|
@ -577,6 +575,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
private int obtainNextPodAddress() {
|
private int obtainNextPodAddress() {
|
||||||
|
Integer nextPodAddress = OmnipodUtil.getNextPodAddress();
|
||||||
if(nextPodAddress == null) {
|
if(nextPodAddress == null) {
|
||||||
nextPodAddress = OmnipodManager.generateRandomAddress();
|
nextPodAddress = OmnipodManager.generateRandomAddress();
|
||||||
OmnipodUtil.setNextPodAddress(nextPodAddress);
|
OmnipodUtil.setNextPodAddress(nextPodAddress);
|
||||||
|
@ -586,7 +585,6 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeNextPodAddress() {
|
private void removeNextPodAddress() {
|
||||||
nextPodAddress = null;
|
|
||||||
OmnipodUtil.removeNextPodAddress();
|
OmnipodUtil.removeNextPodAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue