Small cleanup
This commit is contained in:
parent
45ef41d1a3
commit
b8f2fdc7a8
1 changed files with 5 additions and 7 deletions
|
@ -263,15 +263,13 @@ public class OmnipodCommunicationService extends RileyLinkCommunicationManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private OmnipodPacket createAckPacket(PodState podState, Integer packetAddress, Integer messageAddress) {
|
private OmnipodPacket createAckPacket(PodState podState, Integer packetAddress, Integer messageAddress) {
|
||||||
int pktAddress = podState.getAddress();
|
if(packetAddress == null) {
|
||||||
int msgAddress = podState.getAddress();
|
packetAddress = podState.getAddress();
|
||||||
if (packetAddress != null) {
|
|
||||||
pktAddress = packetAddress;
|
|
||||||
}
|
}
|
||||||
if (messageAddress != null) {
|
if(messageAddress == null) {
|
||||||
msgAddress = messageAddress;
|
messageAddress = podState.getAddress();
|
||||||
}
|
}
|
||||||
return new OmnipodPacket(pktAddress, PacketType.ACK, podState.getPacketNumber(), ByteUtil.getBytesFromInt(msgAddress));
|
return new OmnipodPacket(packetAddress, PacketType.ACK, podState.getPacketNumber(), ByteUtil.getBytesFromInt(messageAddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ackUntilQuiet(PodState podState, Integer packetAddress, Integer messageAddress) {
|
private void ackUntilQuiet(PodState podState, Integer packetAddress, Integer messageAddress) {
|
||||||
|
|
Loading…
Reference in a new issue