From deb228948d0ad1c268ebdaf5f7710b7d7757cd2c Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Wed, 18 Jul 2018 16:45:27 -0400 Subject: [PATCH] Added ability to display when we receive the final transmission frame of a message --- mainwindow.cpp | 16 ++++++++++++++++ mainwindow.h | 3 +++ varicode.h | 11 +++++++++++ 3 files changed, 30 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 2c95278..aa63fbc 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3176,6 +3176,7 @@ void MainWindow::readFromStdout() //readFromStdout ActivityDetail d; d.isLowConfidence = decodedtext.isLowConfidence(); d.isFree = !decodedtext.isStandardMessage(); + d.bits = decodedtext.bits(); d.firstCall = decodedtext.CQersCall(); if(d.firstCall.isEmpty()){ auto words = decodedtext.messageWords(); @@ -3333,6 +3334,7 @@ void MainWindow::readFromStdout() //readFromStdout // TODO: jsherer - parse decode... RXDetail d; d.isFree = !decodedtext.isStandardMessage(); + d.bits = decodedtext.bits(); d.freq = audioFreq; d.text = decodedtext.message(); d.utcTimestamp = QDateTime::currentDateTimeUtc(); @@ -5546,6 +5548,7 @@ bool MainWindow::prepareNextMessageFrame() { QString frame = popMessageFrame(); if(frame.isEmpty()){ + m_i3bit = Varicode::FT8; ui->nextFreeTextMsg->clear(); return false; } else { @@ -5553,6 +5556,12 @@ bool MainWindow::prepareNextMessageFrame() int count = m_txFrameCount; int sent = count - m_txFrameQueue.count(); + + m_i3bit = Varicode::FT8Call; + if(count == sent){ + m_i3bit = Varicode::FT8CallLast; + } + ui->startTxButton->setText(QString("Sending (%1/%2)").arg(sent).arg(count)); if(ui->beaconButton->isChecked()){ @@ -7959,6 +7968,9 @@ void MainWindow::displayActivity(bool force){ if(item.isLowConfidence){ item.text = QString("[%1]").arg(item.text); } + if(item.bits == Varicode::FT8CallLast){ + item.text = QString("%1 \u220E ").arg(item.text); + } text.append(item.text); snr = item.snr; age = since(item.utcTimestamp); @@ -8063,6 +8075,10 @@ void MainWindow::displayActivity(bool force){ RXDetail d = m_rxFrameQueue.first(); m_rxFrameQueue.removeFirst(); + if(d.bits == Varicode::FT8CallLast){ + d.text = QString("%1 \u220E ").arg(d.text); + } + int freq = d.freq/10*10; int block = m_rxFrameBlockNumbers.contains(freq) ? m_rxFrameBlockNumbers[freq] : -1; block = logRxTxMessageText(d.utcTimestamp, d.isFree, d.text, d.freq, false, block); diff --git a/mainwindow.h b/mainwindow.h index 06c7597..f83e403 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -656,6 +656,7 @@ private: { bool isFree; bool isLowConfidence; + int bits; QString firstCall; QString secondCall; int freq; @@ -667,6 +668,8 @@ private: struct RXDetail { bool isFree; + bool isLowConfidence; + int bits; int freq; QString text; QDateTime utcTimestamp; diff --git a/varicode.h b/varicode.h index 57bcd99..1f97868 100644 --- a/varicode.h +++ b/varicode.h @@ -15,6 +15,17 @@ class Varicode { public: + enum FrameType{ + FT8 = 0, // [000] + FT8Fox = 1, // [001] + FT8Call = 2, // [010] + FT8CallLast = 3, // [011] <- used to indicate last frame in transmission + FT8CallReservedA = 4, // [100] + FT8CallReservedB = 5, // [101] + FT8CallReservedC = 6, // [110] + FT8CallReservedD = 7, // [111] + }; + //Varicode(); static QStringList parseCallsigns(QString const &input);