Fixes for PodStateManager
This commit is contained in:
parent
10cde3e744
commit
31938547a5
3 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,6 @@ public class AssignAddressAction implements OmnipodAction<VersionResponse> {
|
|||
|
||||
podStateManager.setPairingParameters(assignAddressResponse.getLot(), assignAddressResponse.getTid(), //
|
||||
assignAddressResponse.getPiVersion(), assignAddressResponse.getPmVersion(), DateTimeZone.getDefault());
|
||||
podStateManager.setMessageNumber(0x00);
|
||||
|
||||
return assignAddressResponse;
|
||||
}
|
||||
|
|
|
@ -128,11 +128,11 @@ public class AapsPodStateManager implements PodStateManager {
|
|||
}
|
||||
|
||||
@Override public void increaseMessageNumber() {
|
||||
setAndStore(() -> podState.setMessageNumber(podState.getMessageNumber() + 1));
|
||||
setAndStore(() -> podState.setMessageNumber((podState.getMessageNumber() + 1) & 0b1111));
|
||||
}
|
||||
|
||||
@Override public void increasePacketNumber() {
|
||||
setAndStore(() -> podState.setPacketNumber(podState.getPacketNumber() + 1));
|
||||
setAndStore(() -> podState.setPacketNumber((podState.getPacketNumber() + 1) & 0b11111));
|
||||
}
|
||||
|
||||
@Override public synchronized void resyncNonce(int syncWord, int sentNonce, int sequenceNumber) {
|
||||
|
|
|
@ -125,6 +125,7 @@ public class RileyLinkOmnipodService extends RileyLinkService {
|
|||
omnipodUtil.setPodStateManager(instance.getPodStateManager());
|
||||
aapsOmnipodManager = instance;
|
||||
}
|
||||
omnipodUtil.notifyDeviceStatusChanged();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue