Add logging in OmnipodManager.resetPodState and fix NonceState.toString
This commit is contained in:
parent
93e7eb518f
commit
f5af607125
|
@ -446,10 +446,13 @@ public class OmnipodManager {
|
|||
logCommandExecutionFinished("deactivatePod");
|
||||
}
|
||||
|
||||
resetPodState();
|
||||
resetPodState(false);
|
||||
}
|
||||
|
||||
public void resetPodState() {
|
||||
public void resetPodState(boolean forcedByUser) {
|
||||
if(isLoggingEnabled()) {
|
||||
LOG.warn("resetPodState has been called. forcedByUser={}", forcedByUser);
|
||||
}
|
||||
podState = null;
|
||||
SP.remove(OmnipodConst.Prefs.PodState);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.defs;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class NonceState {
|
||||
private final long[] table = new long[21];
|
||||
private int index;
|
||||
|
@ -44,7 +46,7 @@ public class NonceState {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "NonceState{" +
|
||||
"currentNonce=" + getCurrentNonce() +
|
||||
"table=" + Arrays.toString(table) +
|
||||
", index=" + index +
|
||||
'}';
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
|||
|
||||
@Override
|
||||
public PumpEnactResult resetPodStatus() {
|
||||
delegate.resetPodState();
|
||||
delegate.resetPodState(true);
|
||||
|
||||
reportImplicitlyCanceledTbr();
|
||||
|
||||
|
|
Loading…
Reference in a new issue