From 9e6b647139261a75ba7158cdf0aa11bea4a8b943 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Tue, 7 Aug 2018 09:19:18 -0400 Subject: [PATCH] Long checksums for hash buffered messages. Display a newline if we reach the last frame and the frame is not buffered --- mainwindow.cpp | 13 ++++++++++--- mainwindow.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index f4a0721..27fc90c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3243,8 +3243,7 @@ void MainWindow::readFromStdout() //readFromStdout d.text = decodedtext.message(); d.utcTimestamp = QDateTime::currentDateTimeUtc(); d.snr = decodedtext.snr(); - m_bandActivity[offset].append(d); - m_rxActivityQueue.append(d); + d.isBuffered = false; // if we have any "first" frame, and a buffer is already established, clear it... if(d.bits == Varicode::FT8CallFirst && m_messageBuffer.contains(d.freq/10*10)){ @@ -3255,9 +3254,12 @@ void MainWindow::readFromStdout() //readFromStdout // if we have a data frame, and a message buffer has been established, buffer it... if(m_messageBuffer.contains(d.freq/10*10) && !decodedtext.isCompound() && !decodedtext.isDirectedMessage()){ qDebug() << "buffering data" << (d.freq/10*10) << d.text; + d.isBuffered = true; m_messageBuffer[d.freq/10*10].msgs.append(d); } + m_rxActivityQueue.append(d); + m_bandActivity[offset].append(d); while(m_bandActivity[offset].count() > 10){ m_bandActivity[offset].removeFirst(); } @@ -5932,7 +5934,7 @@ QStringList MainWindow::buildFT8MessageFrames(QString const& text){ line = lstrip(line); qDebug() << "before:" << line; - bool shouldUseLargeChecksum = false; + bool shouldUseLargeChecksum = true; if(shouldUseLargeChecksum && dirCmd == "#"){ line = line + " " + Varicode::checksum32(line); } else { @@ -8332,6 +8334,11 @@ void MainWindow::processRxActivity() { displayTextForFreq(d.text, d.freq, d.utcTimestamp, false, false, false); + if(isLast && !d.isBuffered){ + // buffered commands need the rxFrameBlockNumbers cache so it can fixup its display + // all other "last" data frames can clear the rxFrameBlockNumbers cache so the next message will be on a new line. + m_rxFrameBlockNumbers.remove(freq); + } } } diff --git a/mainwindow.h b/mainwindow.h index d5647ec..d2db513 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -671,6 +671,7 @@ private: bool isLowConfidence; bool isCompound; bool isDirected; + bool isBuffered; int bits; int freq; QString text;