Remove next pod address after succesful pairing
This commit is contained in:
parent
e01ac6f6be
commit
b676638942
1 changed files with 8 additions and 0 deletions
|
@ -177,6 +177,9 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
|
|
||||||
Disposable disposable = delegate.pairAndPrime(address).subscribe(res -> //
|
Disposable disposable = delegate.pairAndPrime(address).subscribe(res -> //
|
||||||
handleSetupActionResult(podInitActionType, podInitReceiver, res, time, null));
|
handleSetupActionResult(podInitActionType, podInitReceiver, res, time, null));
|
||||||
|
|
||||||
|
removeNextPodAddress();
|
||||||
|
|
||||||
return new PumpEnactResult().success(true).enacted(true);
|
return new PumpEnactResult().success(true).enacted(true);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
String comment = handleAndTranslateException(ex);
|
String comment = handleAndTranslateException(ex);
|
||||||
|
@ -582,6 +585,11 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
return nextPodAddress;
|
return nextPodAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void removeNextPodAddress() {
|
||||||
|
nextPodAddress = null;
|
||||||
|
OmnipodUtil.removeNextPodAddress();
|
||||||
|
}
|
||||||
|
|
||||||
private void handleSetupActionResult(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver, SetupActionResult res, long time, Profile profile) {
|
private void handleSetupActionResult(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver, SetupActionResult res, long time, Profile profile) {
|
||||||
String comment = null;
|
String comment = null;
|
||||||
switch (res.getResultType()) {
|
switch (res.getResultType()) {
|
||||||
|
|
Loading…
Reference in a new issue