lms: Fix stream_stats checks with droppedPackets
Existing code had a typo (value was assigned from wrong variable).
Furthermore, it was experimentally found that:
while underrun/overrun are documented as "FIFO overrun
count" in LimeSuite.h, it seems droppedPackets ("Number of dropped
packets by HW") is not actually an incrementing counter like the others,
but simply a value set every time LMS_RecvStream() is called. Since we
are actually interested in keeping the count over time, adjust code to
achieve that.
Change-Id: Id93d33400e11360b9536f56a31904328549cfbbf
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index c320540..a1ca983 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -597,12 +597,14 @@
}
m_last_rx_overruns[chan] = status.overrun;
- if (status.droppedPackets > m_last_rx_dropped[chan]) {
+ if (status.droppedPackets) {
LOGCHAN(chan, DDEV, ERROR) << "recv Dropped packets by HW! ("
<< m_last_rx_dropped[chan] << " -> "
- << status.droppedPackets << ")";
+ << m_last_rx_dropped[chan] +
+ status.droppedPackets
+ << ")";
}
- m_last_rx_dropped[chan] = m_last_rx_overruns[chan];
+ m_last_rx_dropped[chan] += status.droppedPackets;
}
}