From 046fe8319307e47c1f44adc31deaf60b1923949e Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Fri, 31 Aug 2018 22:29:13 -0400 Subject: [PATCH] Fixed compound buffered commands double printing in the rx window --- mainwindow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index e0f8b70..040d052 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -9004,6 +9004,7 @@ void MainWindow::processCompoundActivity() { buffer.cmd.from = d.call; buffer.cmd.grid = d.grid; buffer.cmd.isCompound = true; + buffer.cmd.utcTimestamp = qMin(buffer.cmd.utcTimestamp, d.utcTimestamp); if ((d.bits & Varicode::FT8CallLast) == Varicode::FT8CallLast) { buffer.cmd.bits = d.bits; @@ -9014,6 +9015,7 @@ void MainWindow::processCompoundActivity() { auto d = buffer.compound.dequeue(); buffer.cmd.to = d.call; buffer.cmd.isCompound = true; + buffer.cmd.utcTimestamp = qMin(buffer.cmd.utcTimestamp, d.utcTimestamp); if ((d.bits & Varicode::FT8CallLast) == Varicode::FT8CallLast) { buffer.cmd.bits = d.bits; @@ -9025,6 +9027,18 @@ void MainWindow::processCompoundActivity() { continue; } + // fixup the datetime with the "minimum" dt seen + // this will allow us to delete the activity lines + // when the compound buffered command comes in. + auto dt = buffer.cmd.utcTimestamp; + foreach(auto c, buffer.compound){ + dt = qMin(dt, c.utcTimestamp); + } + foreach(auto m, buffer.msgs){ + dt = qMin(dt, m.utcTimestamp); + } + buffer.cmd.utcTimestamp = dt; + qDebug() << "buffered compound command ready" << buffer.cmd.from << buffer.cmd.to << buffer.cmd.cmd; m_rxCommandQueue.append(buffer.cmd);