aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-05-24 17:01:08 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-05-24 17:01:13 +0200
commit928177125654c1e596ec3450a68882c031ebb929 (patch)
tree530008cac4080d73ae67b2f8aca369cadcaef8d2 /Transceiver52M
parentdcbcfa58e4132ba526cfd845cfeec7b38c8ff5d5 (diff)
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
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/device/lms/LMSDevice.cpp8
1 files changed, 5 insertions, 3 deletions
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 @@ void LMSDevice::update_stream_stats(size_t chan, bool * underrun, bool * overrun
}
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;
}
}