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) {
|
||||
int pktAddress = podState.getAddress();
|
||||
int msgAddress = podState.getAddress();
|
||||
if (packetAddress != null) {
|
||||
pktAddress = packetAddress;
|
||||
if(packetAddress == null) {
|
||||
packetAddress = podState.getAddress();
|
||||
}
|
||||
if (messageAddress != null) {
|
||||
msgAddress = messageAddress;
|
||||
if(messageAddress == null) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue