Skip to content

Commit

Permalink
Merge pull request #1021 from slaclab/udp_segment_size
Browse files Browse the repository at this point in the history
Fix RSSI sgement size calculation
  • Loading branch information
slacrherbst authored Aug 17, 2024
2 parents 1b6aebd + f1675cb commit d19e4b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/pyrogue/protocols/_Network.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def __init__(self,*, port, host='127.0.0.1', jumbo=False, wait=True, packVer=1,

if server:
self._udp = rogue.protocols.udp.Server(port,jumbo)
self._rssi = rogue.protocols.rssi.Server(self._udp.maxPayload())
self._rssi = rogue.protocols.rssi.Server(self._udp.maxPayload()-8)
else:
self._udp = rogue.protocols.udp.Client(host,port,jumbo)
self._rssi = rogue.protocols.rssi.Client(self._udp.maxPayload())
self._rssi = rogue.protocols.rssi.Client(self._udp.maxPayload()-8)

if packVer == 2:
self._pack = rogue.protocols.packetizer.CoreV2(False,True,enSsi) # ibCRC = False, obCRC = True
Expand Down
2 changes: 1 addition & 1 deletion src/rogue/protocols/udp/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void rpu::Client::runThread(std::weak_ptr<int> lockPtr) {
if (res > 0) {
// Message was too big
if (res > avail) {
udpLog_->warning("Receive data was too large. Dropping.");
udpLog_->warning("Receive data was too large. Rx=%i, avail=%i Dropping.", res, avail);
} else {
buff->setPayload(res);
sendFrame(frame);
Expand Down

0 comments on commit d19e4b2

Please sign in to comment.