From db936dffc19bcdd03fd3a84c6337764b3f4ff981 Mon Sep 17 00:00:00 2001 From: Brian Moran Date: Mon, 28 Nov 2022 22:08:08 -0800 Subject: [PATCH 1/7] fix for FH issue found by K8H where TX queues not kept full (n=2,3) --- widgets/mainwindow.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 11d82d18a..537b6b376 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -9554,15 +9554,23 @@ list1Done: m_foxQSO[hc].tFoxRrpt = -1; //Have not received R+rpt m_foxQSO[hc].tFoxTxRR73 = -1; //Have not sent RR73 rm_tb4(hc); //Remove this Hound from tb4 - if(list2.size()==m_Nslots) goto list2Done; - if(m_foxQSO.count()>=2*m_Nslots) goto list2Done; + + if(list2.size()==m_Nslots) { + break; + } + + if(m_foxQSO.count()>=5*3 /* could have 5 slots * 3 states ([0-2],4,5) */) { + break; + } } list2Done: + n1=list1.size(); n2=list2.size(); n3=qMax(n1,n2); if(n3>m_Nslots) n3=m_Nslots; + for(int i=0; i Date: Tue, 6 Dec 2022 14:54:24 +0100 Subject: [PATCH 2/7] Ensure that "Start new period decodes at top" still works after several hours. Patch from Mike W9MDB. --- widgets/displaytext.cpp | 21 +++++++++++++++++++-- widgets/displaytext.h | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index bdbad0e69..48b914d12 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -19,6 +19,7 @@ #include "Network/LotWUsers.hpp" #include "models/DecodeHighlightingModel.hpp" #include "logbook/logbook.h" +#include "Logger.hpp" #include "qt_helpers.hpp" #include "moc_displaytext.cpp" @@ -212,9 +213,25 @@ void DisplayText::insertText(QString const& text, QColor bg, QColor fg void DisplayText::extend_vertical_scrollbar (int min, int max) { - if (high_volume_ - && m_config && m_config->decodes_from_top ()) + static int mod_last; + static int height; + if (high_volume_ && m_config && m_config->decodes_from_top ()) { + auto m = modified_vertical_scrollbar_max_; + if (m != mod_last) { height = m - mod_last;mod_last = m; } + //auto vp_margins2 = viewportMargins (); + if (height == 0 && m > viewport()->height()) height = abs( - viewport()->height()); + //LOG_INFO ("scrollbar min=" << min << " max=" << max << " mod=" << modified_vertical_scrollbar_max_ << " height=" << viewport()->height() << " top=" << vp_margins2.top() << " bottom=" << vp_margins2.bottom()) << " height=" << height << " mod_last=" << mod_last; + if (max > 60000) + { + QString tmp = toPlainText(); + while (tmp != NULL && tmp.length() > 100 && max > 50000) + { + tmp.remove(0, tmp.indexOf("\n")+1); + max -= height; + } + setPlainText(tmp); + } if (max && max != modified_vertical_scrollbar_max_) { auto vp_margins = viewportMargins (); diff --git a/widgets/displaytext.h b/widgets/displaytext.h index b0db7ca8b..9ceeeeffd 100644 --- a/widgets/displaytext.h +++ b/widgets/displaytext.h @@ -66,7 +66,7 @@ private: QHash> highlighted_calls_; bool high_volume_; QMetaObject::Connection vertical_scroll_connection_; - int modified_vertical_scrollbar_max_; + long long modified_vertical_scrollbar_max_; }; #endif // DISPLAYTEXT_H From c6d13a79845acb2abc1cd201962ced183acb4f9c Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Tue, 6 Dec 2022 15:25:16 +0100 Subject: [PATCH 3/7] Minor code correction. --- widgets/mainwindow.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 537b6b376..7af96b87e 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3895,12 +3895,11 @@ void MainWindow::readFromStdout() //readFromStdout bool bProcessMsgNormally=ui->respondComboBox->currentText()=="CQ: First" or (ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) or (m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible()); - if (decodedtext.messageWords().length() >= 2) { - QString t=decodedtext.messageWords()[2]; - if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true; - } - else { - bProcessMsgNormally=true; + if (decodedtext.messageWords().length() >= 3) { + QString t=decodedtext.messageWords()[2]; + if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true; + } else { + bProcessMsgNormally=true; } if(bProcessMsgNormally) { m_bDoubleClicked=true; From 2bbcd1010aa7f1957ad76b2d370ed15a9c6b7e64 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Wed, 7 Dec 2022 00:23:10 +0100 Subject: [PATCH 4/7] Prevent a crash when clicking on a message without word 3 in Fieldday or FT Roundup mode. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7af96b87e..1c049b5e1 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4589,7 +4589,7 @@ void MainWindow::guiUpdate() if(m_ntx==2 or m_ntx==3) { QStringList t=ui->tx2->text().split(' ', SkipEmptyParts); int n=t.size(); - m_xSent=t.at(n-2) + " " + t.at(n-1); + if (n > 3) m_xSent=t.at(n-2) + " " + t.at(n-1); } } } From 83b833a4f7488d30e25c092ea99d8710e1b59241 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Wed, 7 Dec 2022 11:10:07 +0100 Subject: [PATCH 5/7] Prevent a crash when clicking on a message with "m_baseCall <...>" in EU VHF contest mode. --- widgets/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 1c049b5e1..fb50d804e 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -5373,6 +5373,10 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie MessageBox::information_message (this, tr ("Should you switch to RTTY contest mode?")); } + if(SpecOp::EU_VHF==m_specOp and message.string().contains("<...>")) { + return; + } + if(SpecOp::EU_VHF==m_specOp and message_words.at(2).contains(m_baseCall) and (!message_words.at(3).contains(qso_partner_base_call)) and (!m_bDoubleClicked)) { return; From f21d2ca9b13e3e75eeac86f65d58f45d89abf8fe Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Wed, 7 Dec 2022 11:34:12 +0100 Subject: [PATCH 6/7] Improved protection against crashes caused by double-clicking messages with <...> in certain QSO situations. --- widgets/mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index fb50d804e..17b7dacf1 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -5373,9 +5373,9 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie MessageBox::information_message (this, tr ("Should you switch to RTTY contest mode?")); } - if(SpecOp::EU_VHF==m_specOp and message.string().contains("<...>")) { - return; - } + // This is necessary to prevent crashes caused by double-clicking messages with <...> in certain QSO situations. + if((SpecOp::EU_VHF==m_specOp or SpecOp::RTTY==m_specOp or SpecOp::FIELD_DAY==m_specOp) + and message.string().contains("<...>")) return; if(SpecOp::EU_VHF==m_specOp and message_words.at(2).contains(m_baseCall) and (!message_words.at(3).contains(qso_partner_base_call)) and (!m_bDoubleClicked)) { From 3fd9d5e97697aa7d2d1b636e8fed285446bc43b0 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 13 Dec 2022 11:18:16 -0500 Subject: [PATCH 7/7] Show dB for waterfall mouse position only when in TotalPower mode. --- widgets/plotter.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp index 189f42d40..da211a228 100644 --- a/widgets/plotter.cpp +++ b/widgets/plotter.cpp @@ -772,14 +772,18 @@ int CPlotter::rxFreq() {return m_rxFreq;} //rxFreq void CPlotter::mouseMoveEvent (QMouseEvent * event) { int x=event->x(); - int y=event->y(); - float pdB=10.0*(m_h-y)/m_vpixperdiv + 20.0; - if(y<(m_h-m_h2)) { - QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x)))); + if (!m_bTotalPower){ + QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x)))); } else { - QString t; - t=t.asprintf("%4.1f dB",pdB); - QToolTip::showText(event->globalPos(),t); + int y=event->y(); + float pdB=10.0*(m_h-y)/m_vpixperdiv + 20.0; + if(y<(m_h-m_h2)) { + QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x)))); + } else { + QString t; + t=t.asprintf("%4.1f dB",pdB); + QToolTip::showText(event->globalPos(),t); + } } QWidget::mouseMoveEvent(event); }