Skip to content

Commit

Permalink
Fixed segment size calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
slacrherbst committed Aug 17, 2024
1 parent 820cd5e commit 7d23cc1
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 7d23cc1

Please sign in to comment.