Skip to content

Commit

Permalink
Merge pull request #1 from loupeteam/feature/disable-receiving
Browse files Browse the repository at this point in the history
Add DisableReceiving option bit to PAR
  • Loading branch information
DavidWLoupe authored Dec 7, 2022
2 parents efbb3b0 + e03492e commit 209e3c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions RevisionHistory.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.3.1 - Add DisableReceiving option bit to PAR
0.3 - Add Interface structure and move things around
0.2 - Seperate send, receive, and open/close.
Optimize send and receive timing.
Expand Down
1 change: 1 addition & 0 deletions UDPCommMgr.typ
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ TYPE
ReceiveFlags : UINT;
pReceiveData : UDINT;
MaxReceiveLength : UDINT;
DisableReceiving : BOOL;
END_STRUCT;
UDPCommMgr_IN_CMD_typ : STRUCT
Enable : BOOL;
Expand Down
2 changes: 1 addition & 1 deletion UDPCommReceive.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ unsigned short UDPCommReceive(struct UDPCommMgr_typ* t)
t->Internal.FUB.Receive.pIpAddr = (UDINT)&(t->Internal.ReceivedFromIPAddress);

// Check for !Enable
if (!t->IN.CMD.Enable) {
if (!t->IN.CMD.Enable || t->IN.PAR.DisableReceiving) {
t->Internal.FUB.Receive.enable = 0;
}

Expand Down

0 comments on commit 209e3c3

Please sign in to comment.