From c5bc704342adbceb101f03dd264d299d8acfbe99 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 2 Mar 2022 07:51:51 -0500 Subject: [PATCH 001/105] Starting a test implementation of "CQ: Max Pts". More to come! --- widgets/mainwindow.cpp | 21 +++++++++++++-------- widgets/mainwindow.ui | 13 +++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 04ed1539e..f3591f8ef 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -851,6 +851,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, auto dBm = int ((10. * i / 3.) + .5); ui->TxPowerComboBox->addItem (QString {"%1 dBm %2"}.arg (dBm).arg (power[i]), dBm); } + ui->respondComboBox->addItem("CQ: None"); + ui->respondComboBox->addItem("CQ: First"); + ui->respondComboBox->addItem("CQ: Max Pts"); m_dateTimeRcvdRR73=QDateTime::currentDateTimeUtc(); m_dateTimeSentTx3=QDateTime::currentDateTimeUtc(); @@ -1122,7 +1125,7 @@ void MainWindow::writeSettings() m_settings->setValue ("MsgAvgDisplayed", m_msgAvgWidget && m_msgAvgWidget->isVisible ()); m_settings->setValue ("FoxLogDisplayed", m_foxLogWindow && m_foxLogWindow->isVisible ()); m_settings->setValue ("ContestLogDisplayed", m_contestLogWindow && m_contestLogWindow->isVisible ()); - m_settings->setValue("CallFirst",ui->cbFirst->isChecked()); + m_settings->setValue("RespondCQ",ui->respondComboBox->currentIndex()); m_settings->setValue("HoundSort",ui->comboBoxHoundSort->currentIndex()); m_settings->setValue("FoxNlist",ui->sbNlist->value()); m_settings->setValue("FoxNslots",ui->sbNslots->value()); @@ -1198,7 +1201,7 @@ void MainWindow::writeSettings() void MainWindow::readSettings() { ui->cbAutoSeq->setVisible(false); - ui->cbFirst->setVisible(false); + ui->respondComboBox->setVisible(false); m_settings->beginGroup("MainWindow"); std::array the_geometries; the_geometries[0] = m_settings->value ("geometry", saveGeometry ()).toByteArray (); @@ -1220,7 +1223,7 @@ void MainWindow::readSettings() auto displayMsgAvg = m_settings->value ("MsgAvgDisplayed", false).toBool (); auto displayFoxLog = m_settings->value ("FoxLogDisplayed", false).toBool (); auto displayContestLog = m_settings->value ("ContestLogDisplayed", false).toBool (); - ui->cbFirst->setChecked(m_settings->value("CallFirst",true).toBool()); + ui->respondComboBox->setCurrentIndex(m_settings->value("RespondCQ",0).toInt()); ui->comboBoxHoundSort->setCurrentIndex(m_settings->value("HoundSort",3).toInt()); ui->sbNlist->setValue(m_settings->value("FoxNlist",12).toInt()); m_Nslots=m_settings->value("FoxNslots",5).toInt(); @@ -1953,13 +1956,13 @@ void MainWindow::on_autoButton_clicked (bool checked) { m_auto = checked; if (checked - && ui->cbFirst->isVisible () && ui->cbFirst->isChecked() + && ui->respondComboBox->isVisible () && ui->respondComboBox->currentText() != "CQ: None" && CALLING == m_QSOProgress) { m_bAutoReply = false; // ready for next m_bCallingCQ = true; // allows tail-enders to be picked up - ui->cbFirst->setStyleSheet ("QCheckBox{color:red}"); + ui->respondComboBox->setStyleSheet ("QCheckBox{color:red}"); } else { - ui->cbFirst->setStyleSheet(""); + ui->respondComboBox->setStyleSheet(""); } if (!checked) m_bCallingCQ = false; statusUpdate (); @@ -2021,12 +2024,14 @@ void MainWindow::keyPressEvent (QKeyEvent * e) on_pbBestSP_clicked(); } return; + /* case Qt::Key_C: if(m_mode=="FT4" && e->modifiers() & Qt::AltModifier) { bool b=ui->cbFirst->isChecked(); ui->cbFirst->setChecked(!b); } return; + */ case Qt::Key_D: if(m_mode != "WSPR" && e->modifiers() & Qt::ShiftModifier) { if(!m_decoderBusy) { @@ -2085,8 +2090,8 @@ void MainWindow::keyPressEvent (QKeyEvent * e) } case Qt::Key_F6: if(bAltF1F6) { - bool b=ui->cbFirst->isChecked(); - ui->cbFirst->setChecked(!b); +// bool b=ui->cbFirst->isChecked(); +// ui->cbFirst->setChecked(!b); } else { if(e->modifiers() & Qt::ShiftModifier) { on_actionDecode_remaining_files_in_directory_triggered(); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index b738dd2bf..f3b6c47dd 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -831,6 +831,19 @@ When not checked you can view the calibration results. + + + + + + + -1 + + + 3 + + + From 16d97aad3b3897d3ff5e8a1fe532633ced3f2fd3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 2 Mar 2022 14:12:07 -0500 Subject: [PATCH 002/105] Now builds OK,but mods for "CQ: Max Pts"not yet finished. --- widgets/mainwindow.cpp | 114 ++++++++++++++++++++++------------------- widgets/mainwindow.h | 3 +- widgets/mainwindow.ui | 18 +------ 3 files changed, 66 insertions(+), 69 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f3591f8ef..3b7601fa5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1955,11 +1955,12 @@ void MainWindow::on_actionAbout_triggered() //Display "About" void MainWindow::on_autoButton_clicked (bool checked) { m_auto = checked; + m_maxPoints=-1; if (checked && ui->respondComboBox->isVisible () && ui->respondComboBox->currentText() != "CQ: None" && CALLING == m_QSOProgress) { m_bAutoReply = false; // ready for next - m_bCallingCQ = true; // allows tail-enders to be picked up + m_bCallingCQ = true; // allows tail-enders to be picked up ui->respondComboBox->setStyleSheet ("QCheckBox{color:red}"); } else { ui->respondComboBox->setStyleSheet(""); @@ -2024,14 +2025,14 @@ void MainWindow::keyPressEvent (QKeyEvent * e) on_pbBestSP_clicked(); } return; - /* case Qt::Key_C: - if(m_mode=="FT4" && e->modifiers() & Qt::AltModifier) { - bool b=ui->cbFirst->isChecked(); - ui->cbFirst->setChecked(!b); +// if(m_mode=="FT4" && e->modifiers() & Qt::AltModifier) { + if(e->modifiers() & Qt::AltModifier) { + int n=ui->respondComboBox->currentIndex()+1; + if(n>2) n=0; + ui->respondComboBox->setCurrentIndex(n); } return; - */ case Qt::Key_D: if(m_mode != "WSPR" && e->modifiers() & Qt::ShiftModifier) { if(!m_decoderBusy) { @@ -2090,8 +2091,9 @@ void MainWindow::keyPressEvent (QKeyEvent * e) } case Qt::Key_F6: if(bAltF1F6) { -// bool b=ui->cbFirst->isChecked(); -// ui->cbFirst->setChecked(!b); + int n=ui->respondComboBox->currentIndex()+1; + if(n>2) n=0; + ui->respondComboBox->setCurrentIndex(n); } else { if(e->modifiers() & Qt::ShiftModifier) { on_actionDecode_remaining_files_in_directory_triggered(); @@ -3315,11 +3317,8 @@ void MainWindow::decodeDone () mswait = 1000.0 * ( 1.6 * m_TRperiod - tdone ); } m_bDecoded=m_nDecodes>0; -// qDebug() << "aa 3316" << m_saveDecoded << m_saveAll << m_bDecoded << m_nDecodes -// << m_TRperiod << tdone << mswait; if(!m_diskData and !m_saveAll) { if(m_saveDecoded and (m_nDecodes==0)) { -// qDebug() << "bb 3319" << mswait; killFileTimer.start(mswait); //Kill at 3/4 period } } @@ -3513,29 +3512,40 @@ void MainWindow::readFromStdout() //readFromStdout if (parts.size() > 6) { auto for_us = parts[5].contains (m_baseCall) || ("DE" == parts[5] && qAbs (ui->RxFreqSpinBox->value () - audioFreq) <= ftol); - if(m_baseCall == m_config.my_callsign()) - { - if (m_baseCall != parts[5]) - { - for_us=false; - } + if(m_baseCall == m_config.my_callsign()) { + if (m_baseCall != parts[5]) for_us=false; + } else { + if (m_config.my_callsign () != parts[5]) { +// Same base call as ours but different prefix or suffix. Rare but can happen with +// multi-station special events. + for_us = false; } - else - { - if (m_config.my_callsign () != parts[5]) - { - for_us = false; // same base call as ours but - // different prefix or suffix, rare - // but can happen with multi station - // special events - } + } + qDebug() << "aa" << m_bCallingCQ << m_bAutoReply << for_us; + if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { + if(ui->respondComboBox->currentText()=="CQ: First") { + m_bDoubleClicked=true; + m_bAutoReply = true; + processMessage (decodedtext); + ui->respondComboBox->setStyleSheet(""); + } + qDebug() << "bb" << m_bCallingCQ << m_bAutoReply << for_us; + if(ui->respondComboBox->currentText()=="CQ: Max Pts") { + QString deCall; + QString deGrid; + decodedtext.deCallAndGrid(/*out*/deCall,deGrid); + if(deGrid!="") { + double utch=0.0; + int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; + azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()), + const_cast ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch, + &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); + int npts=int((500+nDkm)/500); + if(npts>m_maxPoints) m_maxPoints=npts; + qDebug() << "cc" << decodedtext.string().mid(24,-1).trimmed() + << deGrid << nDkm << npts << m_maxPoints; + } } - if(m_bCallingCQ && !m_bAutoReply && for_us && ui->cbFirst->isChecked() and - SpecOp::FOX > m_config.special_op_id()) { - m_bDoubleClicked=true; - m_bAutoReply = true; - if(SpecOp::FOX != m_config.special_op_id()) processMessage (decodedtext); - ui->cbFirst->setStyleSheet(""); } if(SpecOp::FOX==m_config.special_op_id() and decodedtext.string().contains(" DE ")) for_us=true; //Hound with compound callsign if(SpecOp::FOX==m_config.special_op_id() and for_us and (audioFreq<1000)) bDisplayRight=true; @@ -3755,7 +3765,6 @@ void MainWindow::pskPost (DecodedText const& decodedtext) void MainWindow::killFile () { -// qDebug() << "cc 3725" << m_saveDecoded << m_saveAll << m_bDecoded << m_nDecodes << m_fnameWE; if (m_fnameWE.size () && !(m_saveAll || (m_saveDecoded && m_bDecoded))) { QFile f1 {m_fnameWE + ".wav"}; if(f1.exists()) f1.remove(); @@ -4188,11 +4197,12 @@ void MainWindow::guiUpdate() } m_bCallingCQ = 6 == m_ntx || m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "}); + m_maxPoints=-1; if(m_mode=="FT8" or m_mode=="FT4") { - if(m_bCallingCQ && ui->cbFirst->isVisible () && ui->cbFirst->isChecked ()) { - ui->cbFirst->setStyleSheet("QCheckBox{color:red}"); + if(m_bCallingCQ && ui->respondComboBox->isVisible() && ui->respondComboBox->currentText()!="None") { + ui->respondComboBox->setStyleSheet("QCheckBox{color:red}"); } else { - ui->cbFirst->setStyleSheet(""); + ui->respondComboBox->setStyleSheet(""); } } @@ -4485,7 +4495,7 @@ void MainWindow::startTx2() if(snr>0.0 or snr < -50.0) snr=99.0; if((m_ntx==6 or m_ntx==7) and m_config.force_call_1st()) { ui->cbAutoSeq->setChecked(true); - ui->cbFirst->setChecked(true); + ui->respondComboBox->setCurrentIndex(1); } transmit (snr); ui->signal_meter_widget->setValue(0,0); @@ -5214,6 +5224,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie } // if we get here then we are reacting to the message if (m_bAutoReply) m_bCallingCQ = CALLING == m_QSOProgress; + m_maxPoints=-1; if (ui->RxFreqSpinBox->isEnabled () and m_mode != "MSK144" and !shift) { ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq } @@ -6092,7 +6103,7 @@ void MainWindow::displayWidgets(qint64 n) if(i==24) ui->actionEnable_AP_FT8->setVisible (b); if(i==25) ui->actionEnable_AP_JT65->setVisible (b); if(i==26) ui->actionEnable_AP_DXcall->setVisible (b); - if(i==27) ui->cbFirst->setVisible(b); + if(i==27) ui->respondComboBox->setVisible(b); // if(i==28) ui->labNextCall->setVisible(b); if(i==29) ui->measure_check_box->setVisible(b); if(i==30) ui->labDXped->setVisible(b); @@ -7122,7 +7133,8 @@ void MainWindow::on_stopTxButton_clicked() //Stop Tx m_btxok=false; m_bCallingCQ = false; m_bAutoReply = false; // ready for next - ui->cbFirst->setStyleSheet (""); + m_maxPoints=-1; + ui->respondComboBox->setStyleSheet (""); } void MainWindow::rigOpen () @@ -7985,8 +7997,7 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout } m_nWSPRdecodes=0; ui->DecodeButton->setChecked (false); - if (m_uploadWSPRSpots - && m_config.is_transceiver_online ()) { // need working rig control + if(m_uploadWSPRSpots && m_config.is_transceiver_online()) { // need working rig control #if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0) uploadTimer.start(QRandomGenerator::global ()->bounded (0, 20000)); // Upload delay #else @@ -8001,7 +8012,6 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout m_decoderBusy = false; statusUpdate (); } else { - int n=t.length(); t=t.mid(0,n-2) + " "; t.remove(QRegExp("\\s+$")); @@ -8559,21 +8569,21 @@ void MainWindow::on_cbCQonly_toggled(bool) decodeBusy(true); } -void MainWindow::on_cbFirst_toggled(bool b) +void MainWindow::on_respondComboBox_currentIndexChanged (int n) { - if (b) { - if (m_auto && CALLING == m_QSOProgress) { - ui->cbFirst->setStyleSheet ("QCheckBox{color:red}"); + if(n>0) { + if(m_auto && m_QSOProgress == CALLING) { + ui->respondComboBox->setStyleSheet ("QCheckBox{color:red}"); } } else { - ui->cbFirst->setStyleSheet (""); + ui->respondComboBox->setStyleSheet (""); } } void MainWindow::on_cbAutoSeq_toggled(bool b) { - if(!b) ui->cbFirst->setChecked(false); - ui->cbFirst->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4" +// if(!b) ui->cbFirst->setChecked(false); + ui->respondComboBox->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4" or m_mode=="Q65") and b); } @@ -9318,10 +9328,10 @@ void MainWindow::chkFT4() { if(m_mode!="FT4") return; ui->cbAutoSeq->setEnabled(true); - ui->cbFirst->setVisible(true); - ui->cbFirst->setEnabled(true); + ui->respondComboBox->setVisible(true); + ui->respondComboBox->setEnabled(true); ui->labDXped->setVisible(m_config.special_op_id()!=SpecOp::NONE); - ui->cbFirst->setVisible(ui->cbAutoSeq->isChecked()); + ui->respondComboBox->setVisible(ui->cbAutoSeq->isChecked()); if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) { QString t0=""; diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 2fda134bb..34a898aaf 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -281,7 +281,7 @@ private slots: void on_cbTx6_toggled(bool b); void on_cbMenus_toggled(bool b); void on_cbCQonly_toggled(bool b); - void on_cbFirst_toggled(bool b); + void on_respondComboBox_currentIndexChanged (int n); void on_cbAutoSeq_toggled(bool b); void networkError (QString const&); void on_ClrAvgButton_clicked(); @@ -489,6 +489,7 @@ private: qint32 m_earlyDecode=41; qint32 m_earlyDecode2=47; qint32 m_nDecodes=0; + qint32 m_maxPoints=-1; bool m_btxok; //True if OK to transmit bool m_diskData; diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index f3b6c47dd..6ec5589d1 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -6,7 +6,7 @@ 0 0 - 882 + 957 658 @@ -844,19 +844,6 @@ When not checked you can view the calibration results. - - - - <html><head/><body><p>Check to call the first decoded responder to my CQ.</p></body></html> - - - Check to call the first decoded responder to my CQ. - - - Call 1st - - - @@ -2988,7 +2975,7 @@ QLabel[oob="true"] { 0 0 - 882 + 957 21 @@ -3719,7 +3706,6 @@ QLabel[oob="true"] { cbShMsgs cbFast9 cbAutoSeq - cbFirst cbTx6 cbSWL pbBestSP From 5e9645091d1d3b0d004f14236f12de45a24a57ef Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 3 Mar 2022 14:21:03 -0500 Subject: [PATCH 003/105] Perhaps "CQ: Max Pts" is working, now? Time for some tests. --- widgets/mainwindow.cpp | 43 +++++++++++++++++++++++++++++------------- widgets/mainwindow.h | 2 ++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3b7601fa5..6119584ac 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1961,9 +1961,9 @@ void MainWindow::on_autoButton_clicked (bool checked) && CALLING == m_QSOProgress) { m_bAutoReply = false; // ready for next m_bCallingCQ = true; // allows tail-enders to be picked up - ui->respondComboBox->setStyleSheet ("QCheckBox{color:red}"); +// ui->respondComboBox->setBackgroundRole(QPalette::BrightText); } else { - ui->respondComboBox->setStyleSheet(""); +// ui->respondComboBox->setBackgroundRole(QPalette::Text); } if (!checked) m_bCallingCQ = false; statusUpdate (); @@ -3521,15 +3521,13 @@ void MainWindow::readFromStdout() //readFromStdout for_us = false; } } - qDebug() << "aa" << m_bCallingCQ << m_bAutoReply << for_us; if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { if(ui->respondComboBox->currentText()=="CQ: First") { m_bDoubleClicked=true; m_bAutoReply = true; processMessage (decodedtext); - ui->respondComboBox->setStyleSheet(""); +// ui->respondComboBox->setBackgroundRole(QPalette::Text); } - qDebug() << "bb" << m_bCallingCQ << m_bAutoReply << for_us; if(ui->respondComboBox->currentText()=="CQ: Max Pts") { QString deCall; QString deGrid; @@ -3541,9 +3539,21 @@ void MainWindow::readFromStdout() //readFromStdout const_cast ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch, &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); int npts=int((500+nDkm)/500); - if(npts>m_maxPoints) m_maxPoints=npts; - qDebug() << "cc" << decodedtext.string().mid(24,-1).trimmed() - << deGrid << nDkm << npts << m_maxPoints; +// qDebug() << "aa" << decodedtext.string().mid(24,-1).trimmed() +// << deGrid << nDkm << npts << m_maxPoints; + if(npts>m_maxPoints) { + m_maxPoints=npts; + m_deCall=deCall; + m_deGrid=deGrid; + m_bDoubleClicked=true; +// m_bAutoReply = true; +// qDebug() << "bb" << m_bDoubleClicked << m_bAutoReply; + ui->dxCallEntry->setText(deCall); + ui->dxGridEntry->setText(deGrid); + genStdMsgs("-10"); + setTxMsg(3); + } +// qDebug() << "cc" << m_deCall << m_deGrid << npts << m_maxPoints; } } } @@ -4200,9 +4210,9 @@ void MainWindow::guiUpdate() m_maxPoints=-1; if(m_mode=="FT8" or m_mode=="FT4") { if(m_bCallingCQ && ui->respondComboBox->isVisible() && ui->respondComboBox->currentText()!="None") { - ui->respondComboBox->setStyleSheet("QCheckBox{color:red}"); +// ui->respondComboBox->setBackgroundRole(QPalette::BrightText); } else { - ui->respondComboBox->setStyleSheet(""); +// ui->respondComboBox->setBackgroundRole(QPalette::Text); } } @@ -7134,7 +7144,7 @@ void MainWindow::on_stopTxButton_clicked() //Stop Tx m_bCallingCQ = false; m_bAutoReply = false; // ready for next m_maxPoints=-1; - ui->respondComboBox->setStyleSheet (""); +// ui->respondComboBox->setBackgroundRole(QPalette::Text); } void MainWindow::rigOpen () @@ -7372,6 +7382,13 @@ void MainWindow::transmit (double snr) true, false, snr, m_TRperiod); } + if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::NA_VHF==m_config.special_op_id()) { + qDebug() << "dd" << m_maxPoints << m_deCall << m_deGrid; + ui->dxCallEntry->setText(m_deCall); + ui->dxGridEntry->setText(m_deGrid); + genStdMsgs("-10"); + } + if (m_mode == "FT8") { // toneSpacing=12000.0/1920.0; toneSpacing=-3; @@ -8573,10 +8590,10 @@ void MainWindow::on_respondComboBox_currentIndexChanged (int n) { if(n>0) { if(m_auto && m_QSOProgress == CALLING) { - ui->respondComboBox->setStyleSheet ("QCheckBox{color:red}"); +// ui->respondComboBox->setBackgroundRole(QPalette::BrightText); } } else { - ui->respondComboBox->setStyleSheet (""); +// ui->respondComboBox->setBackgroundRole(QPalette::Text); } } diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 34a898aaf..59b23f49c 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -641,6 +641,8 @@ private: QString m_fileDateTime; QString m_inQSOwith; QString m_BestCQpriority; + QString m_deCall; + QString m_deGrid; QSet m_pfx; QSet m_sfx; From 7d66232ec7f83d0b45441f85101cf0b66aadaca2 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 3 Mar 2022 14:44:28 -0500 Subject: [PATCH 004/105] Add a ToolTip for the new ComboBox selecting CQ rsponse type. --- widgets/mainwindow.ui | 3 +++ 1 file changed, 3 insertions(+) diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 6ec5589d1..1ba754202 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -833,6 +833,9 @@ When not checked you can view the calibration results. + + <html><head/><body><p>Select <span style=" font-weight:600;">CQ: First</span> to respond automatically to he first decoded replyto your CQ. </p><p>Select <span style=" font-weight:600;">CQ: Max Pts</span> to respond automatically to the reply yielding most points in the ARRL Digi-DX contest. </p><p>Select <span style=" font-weight:600;">CQ: None</span> to choose callers manually.</p></body></html> + From ce5ecaf99d1ff3796a969d1f20f09381881442a4 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 3 Mar 2022 15:00:38 -0500 Subject: [PATCH 005/105] Tweak the ToolTip text. --- widgets/mainwindow.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 1ba754202..9c56e5839 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -834,7 +834,7 @@ When not checked you can view the calibration results. - <html><head/><body><p>Select <span style=" font-weight:600;">CQ: First</span> to respond automatically to he first decoded replyto your CQ. </p><p>Select <span style=" font-weight:600;">CQ: Max Pts</span> to respond automatically to the reply yielding most points in the ARRL Digi-DX contest. </p><p>Select <span style=" font-weight:600;">CQ: None</span> to choose callers manually.</p></body></html> + <html><head/><body><p>Select <span style=" font-weight:600;">CQ: First</span> to respond automatically to he first decoded reply to your CQ. </p><p>Select <span style=" font-weight:600;">CQ: Max Pts</span> to respond automatically to the reply yielding most points in the ARRL International Digital Contest.</p><p>Select <span style=" font-weight:600;">CQ: None</span> to choose callers manually.</p></body></html> From 1af4e46793871102318dd052927332d7526625f7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 4 Mar 2022 14:25:29 -0500 Subject: [PATCH 006/105] Code cleanup. We're not using any text highlighting in the CQ: comboBox. --- widgets/mainwindow.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 6119584ac..ffdb8496c 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1961,9 +1961,6 @@ void MainWindow::on_autoButton_clicked (bool checked) && CALLING == m_QSOProgress) { m_bAutoReply = false; // ready for next m_bCallingCQ = true; // allows tail-enders to be picked up -// ui->respondComboBox->setBackgroundRole(QPalette::BrightText); - } else { -// ui->respondComboBox->setBackgroundRole(QPalette::Text); } if (!checked) m_bCallingCQ = false; statusUpdate (); @@ -3526,7 +3523,6 @@ void MainWindow::readFromStdout() //readFromStdout m_bDoubleClicked=true; m_bAutoReply = true; processMessage (decodedtext); -// ui->respondComboBox->setBackgroundRole(QPalette::Text); } if(ui->respondComboBox->currentText()=="CQ: Max Pts") { QString deCall; @@ -4208,13 +4204,6 @@ void MainWindow::guiUpdate() m_bCallingCQ = 6 == m_ntx || m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "}); m_maxPoints=-1; - if(m_mode=="FT8" or m_mode=="FT4") { - if(m_bCallingCQ && ui->respondComboBox->isVisible() && ui->respondComboBox->currentText()!="None") { -// ui->respondComboBox->setBackgroundRole(QPalette::BrightText); - } else { -// ui->respondComboBox->setBackgroundRole(QPalette::Text); - } - } if (m_tune) { m_currentMessage = "TUNE"; @@ -7144,7 +7133,6 @@ void MainWindow::on_stopTxButton_clicked() //Stop Tx m_bCallingCQ = false; m_bAutoReply = false; // ready for next m_maxPoints=-1; -// ui->respondComboBox->setBackgroundRole(QPalette::Text); } void MainWindow::rigOpen () @@ -8586,17 +8574,6 @@ void MainWindow::on_cbCQonly_toggled(bool) decodeBusy(true); } -void MainWindow::on_respondComboBox_currentIndexChanged (int n) -{ - if(n>0) { - if(m_auto && m_QSOProgress == CALLING) { -// ui->respondComboBox->setBackgroundRole(QPalette::BrightText); - } - } else { -// ui->respondComboBox->setBackgroundRole(QPalette::Text); - } -} - void MainWindow::on_cbAutoSeq_toggled(bool b) { // if(!b) ui->cbFirst->setChecked(false); From c952bee07e2e1c0b23b030f657f1c53e54684b9d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 4 Mar 2022 16:22:18 -0500 Subject: [PATCH 007/105] Allow "CQ: Max Pts" only in "NA VHF, ARRL Digi-DX" contest mode. --- Configuration.ui | 16 ++++++++-------- widgets/mainwindow.cpp | 19 ++++++++++++++----- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Configuration.ui b/Configuration.ui index c538b0be6..0a0860461 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2632,7 +2632,7 @@ Right click for insert and delete options. NA VHF Contest - NA VHF Contest + NA VHF, ARRL Digi-DX special_op_activity_button_group @@ -3268,13 +3268,13 @@ Right click for insert and delete options. - - - - - - - + + + + + + + diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index ffdb8496c..7c816f487 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1021,6 +1021,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } ui->pbBestSP->setVisible(m_mode=="FT4"); + int n=ui->respondComboBox->currentIndex(); + if(m_config.special_op_id()!=SpecOp::NA_VHF and n>1) n=0; + ui->respondComboBox->setCurrentIndex(n); // this must be the last statement of constructor if (!m_valid) throw std::runtime_error {"Fatal initialization exception"}; @@ -1907,6 +1910,9 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog MessageBox::information_message (this, "Fox-and-Hound operation is available only in FT8 mode.\nGo back and change your selection."); } + int n=ui->respondComboBox->currentIndex(); + if(m_config.special_op_id()!=SpecOp::NA_VHF and n>1) n=1; + ui->respondComboBox->setCurrentIndex(n); } } @@ -3535,15 +3541,11 @@ void MainWindow::readFromStdout() //readFromStdout const_cast ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch, &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); int npts=int((500+nDkm)/500); -// qDebug() << "aa" << decodedtext.string().mid(24,-1).trimmed() -// << deGrid << nDkm << npts << m_maxPoints; if(npts>m_maxPoints) { m_maxPoints=npts; m_deCall=deCall; m_deGrid=deGrid; m_bDoubleClicked=true; -// m_bAutoReply = true; -// qDebug() << "bb" << m_bDoubleClicked << m_bAutoReply; ui->dxCallEntry->setText(deCall); ui->dxGridEntry->setText(deGrid); genStdMsgs("-10"); @@ -8574,9 +8576,16 @@ void MainWindow::on_cbCQonly_toggled(bool) decodeBusy(true); } +void MainWindow::on_respondComboBox_currentIndexChanged (int n) +{ + if(m_config.special_op_id()!=SpecOp::NA_VHF and n==2) { + ui->respondComboBox->setCurrentIndex(1); + MessageBox::warning_message (this, tr ("\"CQ: Max Pts\" is available only\n in NA VHF contest mode."));\ + } +} + void MainWindow::on_cbAutoSeq_toggled(bool b) { -// if(!b) ui->cbFirst->setChecked(false); ui->respondComboBox->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4" or m_mode=="Q65") and b); } From 4e7d2829805f8b67e347c92dd9491754f5b9a510 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sun, 6 Mar 2022 14:49:35 +0100 Subject: [PATCH 008/105] Code cleanup. Remove one more line to prevent a compilation error. --- widgets/mainwindow.h | 1 - 1 file changed, 1 deletion(-) diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 59b23f49c..643d74625 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -281,7 +281,6 @@ private slots: void on_cbTx6_toggled(bool b); void on_cbMenus_toggled(bool b); void on_cbCQonly_toggled(bool b); - void on_respondComboBox_currentIndexChanged (int n); void on_cbAutoSeq_toggled(bool b); void networkError (QString const&); void on_ClrAvgButton_clicked(); From e081c15716f1cdd056ab1934064e02a7773d0463 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sun, 6 Mar 2022 17:45:59 +0100 Subject: [PATCH 009/105] Fix a typo in the ToolTip text --- widgets/mainwindow.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 9c56e5839..f70f93a93 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -834,7 +834,7 @@ When not checked you can view the calibration results. - <html><head/><body><p>Select <span style=" font-weight:600;">CQ: First</span> to respond automatically to he first decoded reply to your CQ. </p><p>Select <span style=" font-weight:600;">CQ: Max Pts</span> to respond automatically to the reply yielding most points in the ARRL International Digital Contest.</p><p>Select <span style=" font-weight:600;">CQ: None</span> to choose callers manually.</p></body></html> + <html><head/><body><p>Select <span style=" font-weight:600;">CQ: First</span> to respond automatically to the first decoded reply to your CQ. </p><p>Select <span style=" font-weight:600;">CQ: Max Pts</span> to respond automatically to the reply yielding most points in the ARRL International Digital Contest.</p><p>Select <span style=" font-weight:600;">CQ: None</span> to choose callers manually.</p></body></html> From 283d7d32e406b7af5a0a32bf1320e672d4c328e7 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Wed, 2 Mar 2022 11:15:59 -0600 Subject: [PATCH 010/105] Fix a bounds error. --- lib/ft8_decode.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 5f12c63df..b33629738 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -253,7 +253,7 @@ contains index(grid4,'-').gt.0) grid4=' ' xdt=dt0(i,jseq,0) f1=f0(i,jseq,0) - xbase=10.0**(0.1*(sbase(nint(f1/3.125))-40.0)) + xbase=10.0**(0.1*(sbase(max(1,nint(f1/3.125)))-40.0)) msg37=' ' call timer('ft8_a7d ',0) call ft8_a7d(dd,newdat,call_1,call_2,grid4,xdt,f1,xbase,nharderrors, & From d6bcf9767abd27d4d7f7339f246ff902774be987 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 8 Mar 2022 11:48:18 -0500 Subject: [PATCH 011/105] Replace a missing function declaration. --- widgets/mainwindow.h | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 643d74625..e790e70d9 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -323,6 +323,7 @@ private slots: void chk_FST4_freq_range(); void on_pbFoxReset_clicked(); void on_comboBoxHoundSort_activated (int index); + void on_respondComboBox_currentIndexChanged(int index); void not_GA_warning_message (); void checkMSK144ContestType(); void on_pbBestSP_clicked(); From bc9e8f89bc73ee72d776b9b6aacb7a16bd465d39 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 8 Mar 2022 11:48:54 -0500 Subject: [PATCH 012/105] Remove the SNR adjustment for Q65 averaged decodes. It does not seem to work as expected. --- lib/qra/q65/q65.f90 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index 65683dd71..2133294ef 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -781,9 +781,8 @@ subroutine q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2) sig_area=sum(spec(ia+nsum:ib-nsum)-1.0) w_equiv=sig_area/(smax-1.0) snr2=db(max(1.0,sig_area)) - db(2500.0/df) - if(nused.eq.2) snr2=snr2 - 1.5 - if(nused.eq.3) snr2=snr2 - 2.4 - if(nused.ge.4) snr2=snr2 - 3.0 +! NB: No adjustment to SNR is now made for nused>1, because that process did +! not seem to work as expected. return end subroutine q65_snr From 658f23b813e4ffaa0b4ee1ad2505aed7d8d182b2 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 11 Mar 2022 13:11:39 -0500 Subject: [PATCH 013/105] Starting to implement a new "ARRL_Digi" window. --- CMakeLists.txt | 2 ++ widgets/arrl_digi.cpp | 74 ++++++++++++++++++++++++++++++++++++++++++ widgets/arrl_digi.h | 34 +++++++++++++++++++ widgets/arrl_digi.ui | 42 ++++++++++++++++++++++++ widgets/mainwindow.cpp | 14 ++++++++ widgets/mainwindow.h | 3 ++ widgets/mainwindow.ui | 6 ++++ widgets/widgets.pri | 3 ++ 8 files changed, 178 insertions(+) create mode 100644 widgets/arrl_digi.cpp create mode 100644 widgets/arrl_digi.h create mode 100644 widgets/arrl_digi.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index d061b2146..730b4cc04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,6 +274,7 @@ set (wsjtx_CXXSRCS widgets/about.cpp widgets/astro.cpp widgets/messageaveraging.cpp + widgets/arrl_digi.cpp widgets/colorhighlighting.cpp WSPR/WsprTxScheduler.cpp widgets/mainwindow.cpp @@ -651,6 +652,7 @@ set (wsjtx_UISRCS widgets/echograph.ui widgets/fastgraph.ui widgets/messageaveraging.ui + widgets/arrl_digi.ui widgets/widegraph.ui widgets/logqso.ui Configuration.ui diff --git a/widgets/arrl_digi.cpp b/widgets/arrl_digi.cpp new file mode 100644 index 000000000..c7ed9fdda --- /dev/null +++ b/widgets/arrl_digi.cpp @@ -0,0 +1,74 @@ +#include "arrl_digi.h" + +#include +#include +#include + +#include "SettingsGroup.hpp" +#include "qt_helpers.hpp" +#include "ui_arrl_digi.h" + +#include "moc_arrl_digi.cpp" + +ARRL_Digi::ARRL_Digi(QSettings * settings, QFont const& font, QWidget *parent) : + QWidget(parent), + settings_ {settings}, + ui(new Ui::ARRL_Digi) +{ + ui->setupUi(this); + setWindowTitle (QApplication::applicationName () + " - " + tr ("ARRL International Digital Contest")); + ui->ARRL_DigiPlainTextEdit->setReadOnly (true); + changeFont (font); + read_settings (); + ui->header_label->setText("Points Call Grid Az S/N Freq Band"); +} + +ARRL_Digi::~ARRL_Digi() +{ + write_settings (); +} + +void ARRL_Digi::changeFont (QFont const& font) +{ + ui->header_label->setStyleSheet (font_as_stylesheet (font)); + ui->ARRL_DigiPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); + setContentFont (font); + updateGeometry (); +} + + +void ARRL_Digi::setContentFont(QFont const& font) +{ + ui->ARRL_DigiPlainTextEdit->setFont (font); + QTextCharFormat charFormat; + charFormat.setFont (font); + ui->ARRL_DigiPlainTextEdit->selectAll (); + auto cursor = ui->ARRL_DigiPlainTextEdit->textCursor (); + cursor.mergeCharFormat (charFormat); + cursor.clearSelection (); + cursor.movePosition (QTextCursor::End); + + // position so viewport scrolled to left + cursor.movePosition (QTextCursor::Up); + cursor.movePosition (QTextCursor::StartOfLine); + + ui->ARRL_DigiPlainTextEdit->setTextCursor (cursor); + ui->ARRL_DigiPlainTextEdit->ensureCursorVisible (); +} + +void ARRL_Digi::read_settings () +{ + SettingsGroup group {settings_, "ARRL_Digi"}; + restoreGeometry (settings_->value ("window/geometry").toByteArray ()); +} + +void ARRL_Digi::write_settings () +{ + SettingsGroup group {settings_, "ARRL_Digi"}; + settings_->setValue ("window/geometry", saveGeometry ()); +} + +void ARRL_Digi::displayARRL_Digi(QString const& t) +{ + ui->ARRL_DigiPlainTextEdit->setPlainText(t); +} diff --git a/widgets/arrl_digi.h b/widgets/arrl_digi.h new file mode 100644 index 000000000..443803d30 --- /dev/null +++ b/widgets/arrl_digi.h @@ -0,0 +1,34 @@ +// -*- Mode: C++ -*- +#ifndef ARRL_DIGI_H_ +#define ARRL_DIGI_H_ + +#include + +class QSettings; +class QFont; + +namespace Ui { + class ARRL_Digi; +} + +class ARRL_Digi + : public QWidget +{ + Q_OBJECT + +public: + explicit ARRL_Digi(QSettings *, QFont const&, QWidget * parent = 0); + ~ARRL_Digi(); + void displayARRL_Digi(QString const&); + void changeFont (QFont const&); + +private: + void read_settings (); + void write_settings (); + void setContentFont (QFont const&); + QSettings * settings_; + + QScopedPointer ui; +}; + +#endif diff --git a/widgets/arrl_digi.ui b/widgets/arrl_digi.ui new file mode 100644 index 000000000..9a598b236 --- /dev/null +++ b/widgets/arrl_digi.ui @@ -0,0 +1,42 @@ + + + ARRL_Digi + + + + 0 + 0 + 405 + 529 + + + + Message Averaging + + + + + + + + QPlainTextEdit::NoWrap + + + + + + + Points Call Grid AZ SNR Freq Band + + + 3 + + + + + + + + + + diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7c816f487..70d98198a 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -60,6 +60,7 @@ #include "fastgraph.h" #include "about.h" #include "messageaveraging.h" +#include "arrl_digi.h" #include "colorhighlighting.h" #include "widegraph.h" #include "sleep.h" @@ -2755,6 +2756,19 @@ void MainWindow::on_actionMessage_averaging_triggered() m_msgAvgWidget->activateWindow(); } +void MainWindow::on_actionARRL_Intl_Digi_triggered() +{ + if(m_ARRL_DigiWidget == NULL) { + m_ARRL_DigiWidget.reset (new ARRL_Digi {m_settings, m_config.decoded_text_font ()}); + + // Connect signals from Message Averaging window + connect (this, &MainWindow::finished, m_ARRL_DigiWidget.data (), &ARRL_Digi::close); + } + m_ARRL_DigiWidget->showNormal(); + m_ARRL_DigiWidget->raise(); + m_ARRL_DigiWidget->activateWindow(); +} + void MainWindow::on_actionOpen_triggered() //Open File { monitor (false); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index e790e70d9..d4a61918d 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -78,6 +78,7 @@ class WideGraph; class LogQSO; class Transceiver; class MessageAveraging; +class ARRL_Digi; class FoxLogWindow; class CabrilloLogWindow; class ColorHighlighting; @@ -267,6 +268,7 @@ private slots: void stopTuneATU(); void auto_tx_mode(bool); void on_actionMessage_averaging_triggered(); + void on_actionARRL_Intl_Digi_triggered(); void on_contest_log_action_triggered (); void on_fox_log_action_triggered (); void on_actionColors_triggered(); @@ -398,6 +400,7 @@ private: QScopedPointer m_prefixes; QScopedPointer m_mouseCmnds; QScopedPointer m_msgAvgWidget; + QScopedPointer m_ARRL_DigiWidget; QScopedPointer m_foxLogWindow; QScopedPointer m_contestLogWindow; QScopedPointer m_colorHighlighting; diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index f70f93a93..0fa1dd191 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -3016,6 +3016,7 @@ QLabel[oob="true"] { + @@ -3627,6 +3628,11 @@ QLabel[oob="true"] { Disable writing of ALL.TXT + + + ARRL Intl Digi Contest + + diff --git a/widgets/widgets.pri b/widgets/widgets.pri index 6a623d825..61a8aef1c 100644 --- a/widgets/widgets.pri +++ b/widgets/widgets.pri @@ -4,6 +4,7 @@ SOURCES += \ widgets/meterwidget.cpp widgets/signalmeter.cpp \ widgets/plotter.cpp widgets/widegraph.cpp widgets/about.cpp \ widgets/mainwindow.cpp widgets/messageaveraging.cpp \ + widgets/arrl_digi.cpp \ widgets/echoplot.cpp widgets/echograph.cpp widgets/fastgraph.cpp \ widgets/fastplot.cpp widgets/MessageBox.cpp \ widgets/colorhighlighting.cpp widgets/ExportCabrillo.cpp \ @@ -19,6 +20,7 @@ HEADERS += \ widgets/displaytext.h widgets/logqso.h widgets/LettersSpinBox.hpp \ widgets/FrequencyLineEdit.hpp widgets/FrequencyDeltaLineEdit.hpp widgets/signalmeter.h \ widgets/meterwidget.h widgets/messageaveraging.h \ + widgets/arrl_digi.h \ widgets/echoplot.h widgets/echograph.h widgets/fastgraph.h \ widgets/fastplot.h widgets/MessageBox.hpp widgets/colorhighlighting.h \ widgets/ExportCabrillo.h widgets/AbstractLogWindow.hpp \ @@ -31,6 +33,7 @@ FORMS += \ widgets/mainwindow.ui widgets/about.ui \ widgets/widegraph.ui widgets/astro.ui \ widgets/logqso.ui widgets/messageaveraging.ui \ + widgets/arrl_digi.ui \ widgets/echograph.ui widgets/fastgraph.ui \ widgets/colorhighlighting.ui widgets/ExportCabrillo.ui \ widgets/FoxLogWindow.ui widgets/CabrilloLogWindow.ui From f26b1c424f0bd4ba011d344359266afee5de77d7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 11 Mar 2022 14:46:58 -0500 Subject: [PATCH 014/105] Starting to make it an "Active Stations" window. --- widgets/arrl_digi.cpp | 2 +- widgets/mainwindow.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/widgets/arrl_digi.cpp b/widgets/arrl_digi.cpp index c7ed9fdda..b42738f28 100644 --- a/widgets/arrl_digi.cpp +++ b/widgets/arrl_digi.cpp @@ -20,7 +20,7 @@ ARRL_Digi::ARRL_Digi(QSettings * settings, QFont const& font, QWidget *parent) : ui->ARRL_DigiPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label->setText("Points Call Grid Az S/N Freq Band"); + ui->header_label->setText("Pts Call Grid Az S/N Dial Freq"); } ARRL_Digi::~ARRL_Digi() diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index d4a61918d..fd115e66d 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -673,6 +673,18 @@ private: }; QMap m_fixupQSO; //Key = HoundCall, value = info for QSO in progress + struct ActiveStation + { + QString grid4; + qint32 az; + qint32 snr; + qint64 dialFreq; + qint32 audioFreq; + qint32 points; + QDateTime decodeTime; + }; + QMap m_activeStation; + QQueue m_houndQueue; //Selected Hounds available for starting a QSO QQueue m_foxQSOinProgress; //QSOs in progress: Fox has sent a report QQueue m_foxRateQueue; From 4e96e58d57ef2cb2ebe287da45b56a15a2a47f16 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 11 Mar 2022 14:58:13 -0500 Subject: [PATCH 015/105] Starting to change arrl_digi to activeStations. --- widgets/arrl_digi.cpp | 36 ++++++++++++++++++------------------ widgets/arrl_digi.h | 12 ++++++------ widgets/arrl_digi.ui | 6 +++--- widgets/mainwindow.cpp | 12 ++++++------ widgets/mainwindow.h | 4 ++-- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/widgets/arrl_digi.cpp b/widgets/arrl_digi.cpp index b42738f28..9dc80ab3d 100644 --- a/widgets/arrl_digi.cpp +++ b/widgets/arrl_digi.cpp @@ -10,40 +10,40 @@ #include "moc_arrl_digi.cpp" -ARRL_Digi::ARRL_Digi(QSettings * settings, QFont const& font, QWidget *parent) : +ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget *parent) : QWidget(parent), settings_ {settings}, - ui(new Ui::ARRL_Digi) + ui(new Ui::ActiveStations) { ui->setupUi(this); setWindowTitle (QApplication::applicationName () + " - " + tr ("ARRL International Digital Contest")); - ui->ARRL_DigiPlainTextEdit->setReadOnly (true); + ui->ActiveStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); ui->header_label->setText("Pts Call Grid Az S/N Dial Freq"); } -ARRL_Digi::~ARRL_Digi() +ActiveStations::~ActiveStations() { write_settings (); } -void ARRL_Digi::changeFont (QFont const& font) +void ActiveStations::changeFont (QFont const& font) { ui->header_label->setStyleSheet (font_as_stylesheet (font)); - ui->ARRL_DigiPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); + ui->ActiveStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); setContentFont (font); updateGeometry (); } -void ARRL_Digi::setContentFont(QFont const& font) +void ActiveStations::setContentFont(QFont const& font) { - ui->ARRL_DigiPlainTextEdit->setFont (font); + ui->ActiveStationsPlainTextEdit->setFont (font); QTextCharFormat charFormat; charFormat.setFont (font); - ui->ARRL_DigiPlainTextEdit->selectAll (); - auto cursor = ui->ARRL_DigiPlainTextEdit->textCursor (); + ui->ActiveStationsPlainTextEdit->selectAll (); + auto cursor = ui->ActiveStationsPlainTextEdit->textCursor (); cursor.mergeCharFormat (charFormat); cursor.clearSelection (); cursor.movePosition (QTextCursor::End); @@ -52,23 +52,23 @@ void ARRL_Digi::setContentFont(QFont const& font) cursor.movePosition (QTextCursor::Up); cursor.movePosition (QTextCursor::StartOfLine); - ui->ARRL_DigiPlainTextEdit->setTextCursor (cursor); - ui->ARRL_DigiPlainTextEdit->ensureCursorVisible (); + ui->ActiveStationsPlainTextEdit->setTextCursor (cursor); + ui->ActiveStationsPlainTextEdit->ensureCursorVisible (); } -void ARRL_Digi::read_settings () +void ActiveStations::read_settings () { - SettingsGroup group {settings_, "ARRL_Digi"}; + SettingsGroup group {settings_, "ActiveStations"}; restoreGeometry (settings_->value ("window/geometry").toByteArray ()); } -void ARRL_Digi::write_settings () +void ActiveStations::write_settings () { - SettingsGroup group {settings_, "ARRL_Digi"}; + SettingsGroup group {settings_, "ActiveStations"}; settings_->setValue ("window/geometry", saveGeometry ()); } -void ARRL_Digi::displayARRL_Digi(QString const& t) +void ActiveStations::displayActiveStations(QString const& t) { - ui->ARRL_DigiPlainTextEdit->setPlainText(t); + ui->ActiveStationsPlainTextEdit->setPlainText(t); } diff --git a/widgets/arrl_digi.h b/widgets/arrl_digi.h index 443803d30..24bda01ac 100644 --- a/widgets/arrl_digi.h +++ b/widgets/arrl_digi.h @@ -8,18 +8,18 @@ class QSettings; class QFont; namespace Ui { - class ARRL_Digi; + class ActiveStations; } -class ARRL_Digi +class ActiveStations : public QWidget { Q_OBJECT public: - explicit ARRL_Digi(QSettings *, QFont const&, QWidget * parent = 0); - ~ARRL_Digi(); - void displayARRL_Digi(QString const&); + explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0); + ~ActiveStations(); + void displayActiveStations(QString const&); void changeFont (QFont const&); private: @@ -28,7 +28,7 @@ private: void setContentFont (QFont const&); QSettings * settings_; - QScopedPointer ui; + QScopedPointer ui; }; #endif diff --git a/widgets/arrl_digi.ui b/widgets/arrl_digi.ui index 9a598b236..4ab3ea464 100644 --- a/widgets/arrl_digi.ui +++ b/widgets/arrl_digi.ui @@ -1,7 +1,7 @@ - ARRL_Digi - + ActiveStations + 0 @@ -17,7 +17,7 @@ - + QPlainTextEdit::NoWrap diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 70d98198a..53a72fe0b 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2758,15 +2758,15 @@ void MainWindow::on_actionMessage_averaging_triggered() void MainWindow::on_actionARRL_Intl_Digi_triggered() { - if(m_ARRL_DigiWidget == NULL) { - m_ARRL_DigiWidget.reset (new ARRL_Digi {m_settings, m_config.decoded_text_font ()}); + if(m_ActiveStationsWidget == NULL) { + m_ActiveStationsWidget.reset (new ActiveStations {m_settings, m_config.decoded_text_font ()}); // Connect signals from Message Averaging window - connect (this, &MainWindow::finished, m_ARRL_DigiWidget.data (), &ARRL_Digi::close); + connect (this, &MainWindow::finished, m_ActiveStationsWidget.data (), &ActiveStations::close); } - m_ARRL_DigiWidget->showNormal(); - m_ARRL_DigiWidget->raise(); - m_ARRL_DigiWidget->activateWindow(); + m_ActiveStationsWidget->showNormal(); + m_ActiveStationsWidget->raise(); + m_ActiveStationsWidget->activateWindow(); } void MainWindow::on_actionOpen_triggered() //Open File diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index fd115e66d..fc28bbc34 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -78,7 +78,7 @@ class WideGraph; class LogQSO; class Transceiver; class MessageAveraging; -class ARRL_Digi; +class ActiveStations; class FoxLogWindow; class CabrilloLogWindow; class ColorHighlighting; @@ -400,7 +400,7 @@ private: QScopedPointer m_prefixes; QScopedPointer m_mouseCmnds; QScopedPointer m_msgAvgWidget; - QScopedPointer m_ARRL_DigiWidget; + QScopedPointer m_ActiveStationsWidget; QScopedPointer m_foxLogWindow; QScopedPointer m_contestLogWindow; QScopedPointer m_colorHighlighting; From f180d30126e578adfd7de4ad3e235fc58eb367f4 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 11 Mar 2022 15:03:16 -0500 Subject: [PATCH 016/105] More changes toward an "Active Stations" window. --- widgets/arrl_digi.cpp | 2 +- widgets/mainwindow.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/arrl_digi.cpp b/widgets/arrl_digi.cpp index 9dc80ab3d..361642222 100644 --- a/widgets/arrl_digi.cpp +++ b/widgets/arrl_digi.cpp @@ -16,7 +16,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui(new Ui::ActiveStations) { ui->setupUi(this); - setWindowTitle (QApplication::applicationName () + " - " + tr ("ARRL International Digital Contest")); + setWindowTitle (QApplication::applicationName () + " - " + tr ("Active Stations")); ui->ActiveStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 0fa1dd191..dd19c906d 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -3630,7 +3630,7 @@ QLabel[oob="true"] { - ARRL Intl Digi Contest + Active Stations From e8c08c24a51afcc1560bab064546bf3aa69b5fe6 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 11 Mar 2022 15:12:32 -0500 Subject: [PATCH 017/105] Change the source file names from arrl_digi.* to activeStations.* --- CMakeLists.txt | 4 ++-- widgets/{arrl_digi.cpp => activeStations.cpp} | 6 +++--- widgets/{arrl_digi.h => activeStations.h} | 0 widgets/{arrl_digi.ui => activeStations.ui} | 0 widgets/mainwindow.cpp | 2 +- widgets/widgets.pri | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) rename widgets/{arrl_digi.cpp => activeStations.cpp} (95%) rename widgets/{arrl_digi.h => activeStations.h} (100%) rename widgets/{arrl_digi.ui => activeStations.ui} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 730b4cc04..b3bee73f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,7 +274,7 @@ set (wsjtx_CXXSRCS widgets/about.cpp widgets/astro.cpp widgets/messageaveraging.cpp - widgets/arrl_digi.cpp + widgets/activeStations.cpp widgets/colorhighlighting.cpp WSPR/WsprTxScheduler.cpp widgets/mainwindow.cpp @@ -652,7 +652,7 @@ set (wsjtx_UISRCS widgets/echograph.ui widgets/fastgraph.ui widgets/messageaveraging.ui - widgets/arrl_digi.ui + widgets/activeStations.ui widgets/widegraph.ui widgets/logqso.ui Configuration.ui diff --git a/widgets/arrl_digi.cpp b/widgets/activeStations.cpp similarity index 95% rename from widgets/arrl_digi.cpp rename to widgets/activeStations.cpp index 361642222..9c6a7d061 100644 --- a/widgets/arrl_digi.cpp +++ b/widgets/activeStations.cpp @@ -1,4 +1,4 @@ -#include "arrl_digi.h" +#include "activeStations.h" #include #include @@ -6,9 +6,9 @@ #include "SettingsGroup.hpp" #include "qt_helpers.hpp" -#include "ui_arrl_digi.h" +#include "ui_activeStations.h" -#include "moc_arrl_digi.cpp" +#include "moc_activeStations.cpp" ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget *parent) : QWidget(parent), diff --git a/widgets/arrl_digi.h b/widgets/activeStations.h similarity index 100% rename from widgets/arrl_digi.h rename to widgets/activeStations.h diff --git a/widgets/arrl_digi.ui b/widgets/activeStations.ui similarity index 100% rename from widgets/arrl_digi.ui rename to widgets/activeStations.ui diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 53a72fe0b..7ba085865 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -60,7 +60,7 @@ #include "fastgraph.h" #include "about.h" #include "messageaveraging.h" -#include "arrl_digi.h" +#include "activeStations.h" #include "colorhighlighting.h" #include "widegraph.h" #include "sleep.h" diff --git a/widgets/widgets.pri b/widgets/widgets.pri index 61a8aef1c..e8bdf5402 100644 --- a/widgets/widgets.pri +++ b/widgets/widgets.pri @@ -4,7 +4,7 @@ SOURCES += \ widgets/meterwidget.cpp widgets/signalmeter.cpp \ widgets/plotter.cpp widgets/widegraph.cpp widgets/about.cpp \ widgets/mainwindow.cpp widgets/messageaveraging.cpp \ - widgets/arrl_digi.cpp \ + widgets/activeStations.cpp \ widgets/echoplot.cpp widgets/echograph.cpp widgets/fastgraph.cpp \ widgets/fastplot.cpp widgets/MessageBox.cpp \ widgets/colorhighlighting.cpp widgets/ExportCabrillo.cpp \ @@ -20,7 +20,7 @@ HEADERS += \ widgets/displaytext.h widgets/logqso.h widgets/LettersSpinBox.hpp \ widgets/FrequencyLineEdit.hpp widgets/FrequencyDeltaLineEdit.hpp widgets/signalmeter.h \ widgets/meterwidget.h widgets/messageaveraging.h \ - widgets/arrl_digi.h \ + widgets/activeStations.h \ widgets/echoplot.h widgets/echograph.h widgets/fastgraph.h \ widgets/fastplot.h widgets/MessageBox.hpp widgets/colorhighlighting.h \ widgets/ExportCabrillo.h widgets/AbstractLogWindow.hpp \ @@ -33,7 +33,7 @@ FORMS += \ widgets/mainwindow.ui widgets/about.ui \ widgets/widegraph.ui widgets/astro.ui \ widgets/logqso.ui widgets/messageaveraging.ui \ - widgets/arrl_digi.ui \ + widgets/activeStations.ui \ widgets/echograph.ui widgets/fastgraph.ui \ widgets/colorhighlighting.ui widgets/ExportCabrillo.ui \ widgets/FoxLogWindow.ui widgets/CabrilloLogWindow.ui From 114aeda3f8b5c9613b9e5af31e76b0f86ae7cbe2 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 12 Mar 2022 09:51:50 -0500 Subject: [PATCH 018/105] Starting the transition from RTTY Roundup to ARRL International Digital Contest. --- Configuration.ui | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Configuration.ui b/Configuration.ui index 0a0860461..4b574f91e 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2632,7 +2632,7 @@ Right click for insert and delete options. NA VHF Contest - NA VHF, ARRL Digi-DX + NA VHF special_op_activity_button_group @@ -3268,13 +3268,13 @@ Right click for insert and delete options. + + + - - - - + From e529ad8df94c1eca840e4e1dd748e09e0bbdfa88 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 12 Mar 2022 09:55:50 -0500 Subject: [PATCH 019/105] Change name for new window: ARRL_Digi ==> Active Stations --- widgets/mainwindow.cpp | 2 +- widgets/mainwindow.h | 2 +- widgets/mainwindow.ui | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7ba085865..1b6c0f840 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2756,7 +2756,7 @@ void MainWindow::on_actionMessage_averaging_triggered() m_msgAvgWidget->activateWindow(); } -void MainWindow::on_actionARRL_Intl_Digi_triggered() +void MainWindow::on_actionActiveStations_triggered() { if(m_ActiveStationsWidget == NULL) { m_ActiveStationsWidget.reset (new ActiveStations {m_settings, m_config.decoded_text_font ()}); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index fc28bbc34..5995f7aa7 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -268,7 +268,7 @@ private slots: void stopTuneATU(); void auto_tx_mode(bool); void on_actionMessage_averaging_triggered(); - void on_actionARRL_Intl_Digi_triggered(); + void on_actionActiveStations_triggered(); void on_contest_log_action_triggered (); void on_fox_log_action_triggered (); void on_actionColors_triggered(); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index dd19c906d..310fb6092 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -3016,7 +3016,7 @@ QLabel[oob="true"] { - + @@ -3628,7 +3628,7 @@ QLabel[oob="true"] { Disable writing of ALL.TXT - + Active Stations From b12b1dec39fa9da0bb4d98caef78bae577d65fc3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 13 Mar 2022 21:44:31 -0400 Subject: [PATCH 020/105] Change some labels from "RTTY Roundup" to "ARRL Digi". *** May not keep this! *** --- Configuration.cpp | 4 ++-- Configuration.ui | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 661a42d6e..76aad0c16 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1155,7 +1155,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network ui_->special_op_activity_button_group->setId (ui_->rbNA_VHF_Contest, static_cast (SpecialOperatingActivity::NA_VHF)); ui_->special_op_activity_button_group->setId (ui_->rbEU_VHF_Contest, static_cast (SpecialOperatingActivity::EU_VHF)); ui_->special_op_activity_button_group->setId (ui_->rbField_Day, static_cast (SpecialOperatingActivity::FIELD_DAY)); - ui_->special_op_activity_button_group->setId (ui_->rbRTTY_Roundup, static_cast (SpecialOperatingActivity::RTTY)); + ui_->special_op_activity_button_group->setId (ui_->rbARRL_Digi, static_cast (SpecialOperatingActivity::RTTY)); ui_->special_op_activity_button_group->setId (ui_->rbWW_DIGI, static_cast (SpecialOperatingActivity::WW_DIGI)); ui_->special_op_activity_button_group->setId (ui_->rbFox, static_cast (SpecialOperatingActivity::FOX)); ui_->special_op_activity_button_group->setId (ui_->rbHound, static_cast (SpecialOperatingActivity::HOUND)); @@ -1916,7 +1916,7 @@ bool Configuration::impl::validate () return false; } - if (ui_->rbRTTY_Roundup->isEnabled () && ui_->rbRTTY_Roundup->isChecked () && + if (ui_->rbARRL_Digi->isEnabled () && ui_->rbARRL_Digi->isChecked () && !ui_->RTTY_Exchange->hasAcceptableInput ()) { find_tab (ui_->RTTY_Exchange); diff --git a/Configuration.ui b/Configuration.ui index 4b574f91e..3547a7ab8 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2696,7 +2696,7 @@ Right click for insert and delete options. - + <html><head/><body><p>ARRL RTTY Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> @@ -3195,7 +3195,7 @@ Right click for insert and delete options. rbNA_VHF_Contest rbField_Day rbEU_VHF_Contest - rbRTTY_Roundup + rbARRL_Digi rbWW_DIGI Field_Day_Exchange RTTY_Exchange From 22b86544bef198577f0e4866c9ab37f7f7d30ace Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 14 Mar 2022 09:56:07 -0400 Subject: [PATCH 021/105] Revert "Change some labels from "RTTY Roundup" to "ARRL Digi". *** May not keep this! ***" This reverts commit b12b1dec39fa9da0bb4d98caef78bae577d65fc3. --- Configuration.cpp | 4 ++-- Configuration.ui | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 76aad0c16..661a42d6e 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1155,7 +1155,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network ui_->special_op_activity_button_group->setId (ui_->rbNA_VHF_Contest, static_cast (SpecialOperatingActivity::NA_VHF)); ui_->special_op_activity_button_group->setId (ui_->rbEU_VHF_Contest, static_cast (SpecialOperatingActivity::EU_VHF)); ui_->special_op_activity_button_group->setId (ui_->rbField_Day, static_cast (SpecialOperatingActivity::FIELD_DAY)); - ui_->special_op_activity_button_group->setId (ui_->rbARRL_Digi, static_cast (SpecialOperatingActivity::RTTY)); + ui_->special_op_activity_button_group->setId (ui_->rbRTTY_Roundup, static_cast (SpecialOperatingActivity::RTTY)); ui_->special_op_activity_button_group->setId (ui_->rbWW_DIGI, static_cast (SpecialOperatingActivity::WW_DIGI)); ui_->special_op_activity_button_group->setId (ui_->rbFox, static_cast (SpecialOperatingActivity::FOX)); ui_->special_op_activity_button_group->setId (ui_->rbHound, static_cast (SpecialOperatingActivity::HOUND)); @@ -1916,7 +1916,7 @@ bool Configuration::impl::validate () return false; } - if (ui_->rbARRL_Digi->isEnabled () && ui_->rbARRL_Digi->isChecked () && + if (ui_->rbRTTY_Roundup->isEnabled () && ui_->rbRTTY_Roundup->isChecked () && !ui_->RTTY_Exchange->hasAcceptableInput ()) { find_tab (ui_->RTTY_Exchange); diff --git a/Configuration.ui b/Configuration.ui index 3547a7ab8..4b574f91e 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2696,7 +2696,7 @@ Right click for insert and delete options. - + <html><head/><body><p>ARRL RTTY Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> @@ -3195,7 +3195,7 @@ Right click for insert and delete options. rbNA_VHF_Contest rbField_Day rbEU_VHF_Contest - rbARRL_Digi + rbRTTY_Roundup rbWW_DIGI Field_Day_Exchange RTTY_Exchange From 66d14975582675a10393907c5d8e002a39a5af6c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 14 Mar 2022 09:59:09 -0400 Subject: [PATCH 022/105] Revert "Starting the transition from RTTY Roundup to ARRL International Digital Contest." This reverts commit 114aeda3f8b5c9613b9e5af31e76b0f86ae7cbe2. --- Configuration.ui | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Configuration.ui b/Configuration.ui index 4b574f91e..0a0860461 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2632,7 +2632,7 @@ Right click for insert and delete options. NA VHF Contest - NA VHF + NA VHF, ARRL Digi-DX special_op_activity_button_group @@ -3268,13 +3268,13 @@ Right click for insert and delete options. - - - + + - + + From c8574b5890f73811f771dfd8cc76cfd2f2894d5d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 14 Mar 2022 10:12:22 -0400 Subject: [PATCH 023/105] Make display of Active Stations window sticky on program restart. --- widgets/mainwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 1b6c0f840..299e2a8ed 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1129,6 +1129,7 @@ void MainWindow::writeSettings() m_settings->setValue ("MsgAvgDisplayed", m_msgAvgWidget && m_msgAvgWidget->isVisible ()); m_settings->setValue ("FoxLogDisplayed", m_foxLogWindow && m_foxLogWindow->isVisible ()); m_settings->setValue ("ContestLogDisplayed", m_contestLogWindow && m_contestLogWindow->isVisible ()); + m_settings->setValue ("ActiveStationsDisplayed", m_ActiveStationsWidget && m_ActiveStationsWidget->isVisible ()); m_settings->setValue("RespondCQ",ui->respondComboBox->currentIndex()); m_settings->setValue("HoundSort",ui->comboBoxHoundSort->currentIndex()); m_settings->setValue("FoxNlist",ui->sbNlist->value()); @@ -1227,6 +1228,7 @@ void MainWindow::readSettings() auto displayMsgAvg = m_settings->value ("MsgAvgDisplayed", false).toBool (); auto displayFoxLog = m_settings->value ("FoxLogDisplayed", false).toBool (); auto displayContestLog = m_settings->value ("ContestLogDisplayed", false).toBool (); + bool displayActiveStations = m_settings->value ("ActiveStationsDisplayed", false).toBool (); ui->respondComboBox->setCurrentIndex(m_settings->value("RespondCQ",0).toInt()); ui->comboBoxHoundSort->setCurrentIndex(m_settings->value("HoundSort",3).toInt()); ui->sbNlist->setValue(m_settings->value("FoxNlist",12).toInt()); @@ -1327,6 +1329,7 @@ void MainWindow::readSettings() if(displayMsgAvg) on_actionMessage_averaging_triggered(); if (displayFoxLog) on_fox_log_action_triggered (); if (displayContestLog) on_contest_log_action_triggered (); + if(displayActiveStations) on_actionActiveStations_triggered(); } void MainWindow::checkMSK144ContestType() From d96a1a117321d60d5af10aa0fbf6e3141a2dfd26 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 14 Mar 2022 14:18:53 -0400 Subject: [PATCH 024/105] Starting to implement QMaps for activeStations and recentStations. --- widgets/mainwindow.cpp | 45 ++++++++++++++++++++++++++++++++++++++++-- widgets/mainwindow.h | 7 ++++--- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 299e2a8ed..729cbc87b 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1329,7 +1329,10 @@ void MainWindow::readSettings() if(displayMsgAvg) on_actionMessage_averaging_triggered(); if (displayFoxLog) on_fox_log_action_triggered (); if (displayContestLog) on_contest_log_action_triggered (); - if(displayActiveStations) on_actionActiveStations_triggered(); + if(displayActiveStations) { + on_actionActiveStations_triggered(); +// QFile f {m_config.writeable_data_dir ().absoluteFilePath ("activeCalls.txt")}; + } } void MainWindow::checkMSK144ContestType() @@ -3517,8 +3520,44 @@ void MainWindow::readFromStdout() //readFromStdout } } } - } + + if(m_mode=="FT8" and SpecOp::NA_VHF==m_config.special_op_id()) { +// Extract and save information that's relevant for the ARRL Digi contest + QString deCall; + QString deGrid; + decodedtext.deCallAndGrid(/*out*/deCall,deGrid); + if(deGrid.contains(grid_regexp)) { + if(!m_activeCall.contains(deCall)) { + m_activeCall[deCall]=deGrid; + double utch=0.0; + int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; + azdist_(const_cast (m_config.my_grid().left(4).toLatin1().constData()), + const_cast (deGrid.left(4).toLatin1().constData()),&utch, + &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); + int npts=int((500+nDkm)/500); + RecentCall rc; + rc.audioFreq=decodedtext.frequencyOffset(); + rc.az=nAz; + rc.decodeTime=decodedtext.timeInSeconds(); + rc.dialFreq=m_freqNominal; + rc.grid4=deGrid; + rc.points=npts; + rc.snr=decodedtext.snr(); + m_recentCall[deCall]=rc; + qDebug() << "aa" << rc.points << deCall << rc.grid4 << rc.az << rc.snr + << rc.dialFreq/1000000.0 << rc.audioFreq << rc.decodeTime; + } + } else { + if(m_activeCall.contains(deCall)) { + m_recentCall[deCall].decodeTime=decodedtext.timeInSeconds(); + RecentCall rc=m_recentCall[deCall]; + qDebug() << "bb" << rc.points << deCall << rc.grid4 << rc.az << rc.snr + << rc.dialFreq/1000000.0 << rc.audioFreq << rc.decodeTime; + } + } + } + } //Right (Rx Frequency) window @@ -3547,6 +3586,7 @@ void MainWindow::readFromStdout() //readFromStdout m_bAutoReply = true; processMessage (decodedtext); } + if(ui->respondComboBox->currentText()=="CQ: Max Pts") { QString deCall; QString deGrid; @@ -3571,6 +3611,7 @@ void MainWindow::readFromStdout() //readFromStdout // qDebug() << "cc" << m_deCall << m_deGrid << npts << m_maxPoints; } } + } if(SpecOp::FOX==m_config.special_op_id() and decodedtext.string().contains(" DE ")) for_us=true; //Hound with compound callsign if(SpecOp::FOX==m_config.special_op_id() and for_us and (audioFreq<1000)) bDisplayRight=true; diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 5995f7aa7..8cf886415 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -673,7 +673,7 @@ private: }; QMap m_fixupQSO; //Key = HoundCall, value = info for QSO in progress - struct ActiveStation + struct RecentCall { QString grid4; qint32 az; @@ -681,9 +681,10 @@ private: qint64 dialFreq; qint32 audioFreq; qint32 points; - QDateTime decodeTime; + qint32 decodeTime; }; - QMap m_activeStation; + QMap m_recentCall; + QMap m_activeCall; QQueue m_houndQueue; //Selected Hounds available for starting a QSO QQueue m_foxQSOinProgress; //QSOs in progress: Fox has sent a report From 38174ed6dcaac196f028e8cc90c7a8118b794554 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 14 Mar 2022 15:59:49 -0400 Subject: [PATCH 025/105] Use "ARRL_DIGI" rather than "NA_VHF". Needs testing! --- Configuration.cpp | 5 +- Configuration.hpp | 2 +- Configuration.ui | 377 +++++++++++++++++++++-------------------- widgets/mainwindow.cpp | 25 ++- 4 files changed, 217 insertions(+), 192 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 661a42d6e..e8285e0c9 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -903,7 +903,7 @@ QString Configuration::Field_Day_Exchange() const { return m_->FD_exchange_; } - +/* void Configuration::setEU_VHF_Contest() { m_->bSpecialOp_=true; @@ -912,6 +912,7 @@ void Configuration::setEU_VHF_Contest() m_->SelectedActivity_ = static_cast (SpecialOperatingActivity::EU_VHF); m_->write_settings(); } +*/ QString Configuration::RTTY_Exchange() const { @@ -1157,6 +1158,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network ui_->special_op_activity_button_group->setId (ui_->rbField_Day, static_cast (SpecialOperatingActivity::FIELD_DAY)); ui_->special_op_activity_button_group->setId (ui_->rbRTTY_Roundup, static_cast (SpecialOperatingActivity::RTTY)); ui_->special_op_activity_button_group->setId (ui_->rbWW_DIGI, static_cast (SpecialOperatingActivity::WW_DIGI)); + ui_->special_op_activity_button_group->setId (ui_->rbARRL_Digi, static_cast (SpecialOperatingActivity::ARRL_DIGI)); ui_->special_op_activity_button_group->setId (ui_->rbFox, static_cast (SpecialOperatingActivity::FOX)); ui_->special_op_activity_button_group->setId (ui_->rbHound, static_cast (SpecialOperatingActivity::HOUND)); @@ -2227,7 +2229,6 @@ void Configuration::impl::accept () clear_DXcall_ = ui_->cbClearDXcall->isChecked(); highlight_DXgrid_ = ui_->cbHighlightDXgrid->isChecked(); clear_DXgrid_ = ui_->cbClearDXgrid->isChecked(); - write_settings (); // make visible to all } diff --git a/Configuration.hpp b/Configuration.hpp index c4cf068ec..9f5e64edd 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -190,7 +190,7 @@ public: bool highlight_DXgrid () const; bool clear_DXgrid () const; - enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, FOX, HOUND}; + enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, ARRL_DIGI, FOX, HOUND}; SpecialOperatingActivity special_op_id () const; struct CalibrationParams diff --git a/Configuration.ui b/Configuration.ui index 0a0860461..5caff9148 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2518,74 +2518,6 @@ Right click for insert and delete options. Advanced - - - - <html><head/><body><p>User-selectable parameters for JT65 VHF/UHF/Microwave decoding.</p></body></html> - - - JT65 VHF/UHF/Microwave decoding parameters - - - - - - Random erasure patterns: - - - sbNtrials - - - - - - - <html><head/><body><p>Maximum number of erasure patterns for stochastic soft-decision Reed Solomon decoder is 10^(n/2).</p></body></html> - - - 0 - - - 12 - - - 6 - - - - - - - Aggressive decoding level: - - - sbAggressive - - - - - - - <html><head/><body><p>Higher levels will increase the probability of decoding, but will also increase probability of a false decode.</p></body></html> - - - 10 - - - - - - - Two-pass decoding - - - true - - - - - - @@ -2598,47 +2530,6 @@ Right click for insert and delete options. false - - - - <html><head/><body><p>FT8 DXpedition mode: Hound operator calling the DX.</p></body></html> - - - Hound - - - Hound - - - true - - - special_op_activity_button_group - - - - - - - - 0 - 0 - - - - <html><head/><body><p>North American VHF/UHF/Microwave contests and others in which a 4-character grid locator is the required exchange.</p></body></html> - - - NA VHF Contest - - - NA VHF, ARRL Digi-DX - - - special_op_activity_button_group - - - @@ -2680,6 +2571,28 @@ Right click for insert and delete options. + + + + + 0 + 0 + + + + <html><head/><body><p>North American VHF/UHF/Microwave contests and others in which a 4-character grid locator is the required exchange.</p></body></html> + + + NA VHF Contest + + + NA VHF + + + special_op_activity_button_group + + + @@ -2693,74 +2606,24 @@ Right click for insert and delete options. - - - - - - <html><head/><body><p>ARRL RTTY Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> - - - R T T Y Roundup - - - RTTY Roundup messages - - - special_op_activity_button_group - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - RTTY Roundup exchange - - - RTTY RU Exch: - - - RTTY_Exchange - - - - - - - - 70 - 0 - - - - <html><head/><body><p>ARRL RTTY Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> - - - NJ - - - Qt::AlignCenter - - - - - - + + + + <html><head/><body><p>FT8 DXpedition mode: Hound operator calling the DX.</p></body></html> + + + Hound + + + Hound + + + true + + + special_op_activity_button_group + + @@ -2853,6 +2716,88 @@ Right click for insert and delete options. + + + + + + <html><head/><body><p>ARRL RTTY Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> + + + R T T Y Roundup + + + RTTY Roundup messages + + + special_op_activity_button_group + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + RTTY Roundup exchange + + + RTTY RU Exch: + + + RTTY_Exchange + + + + + + + + 70 + 0 + + + + <html><head/><body><p>ARRL RTTY Roundup and similar contests. Exchange is US state, Canadian province, or &quot;DX&quot;.</p></body></html> + + + NJ + + + Qt::AlignCenter + + + + + + + + + + + ARRL International Digital Contest + + + ARRL Digi Contest + + + special_op_activity_button_group + + + @@ -3028,6 +2973,74 @@ Right click for insert and delete options. + + + + <html><head/><body><p>User-selectable parameters for JT65 VHF/UHF/Microwave decoding.</p></body></html> + + + JT65 VHF/UHF/Microwave decoding parameters + + + + + + Random erasure patterns: + + + sbNtrials + + + + + + + <html><head/><body><p>Maximum number of erasure patterns for stochastic soft-decision Reed Solomon decoder is 10^(n/2).</p></body></html> + + + 0 + + + 12 + + + 6 + + + + + + + Aggressive decoding level: + + + sbAggressive + + + + + + + <html><head/><body><p>Higher levels will increase the probability of decoding, but will also increase probability of a false decode.</p></body></html> + + + 10 + + + + + + + Two-pass decoding + + + true + + + + + + @@ -3268,13 +3281,13 @@ Right click for insert and delete options. - - - - - + + + + + diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 729cbc87b..e35130a4c 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1023,7 +1023,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, ui->pbBestSP->setVisible(m_mode=="FT4"); int n=ui->respondComboBox->currentIndex(); - if(m_config.special_op_id()!=SpecOp::NA_VHF and n>1) n=0; + if(m_config.special_op_id()!=SpecOp::ARRL_DIGI and n>1) n=0; ui->respondComboBox->setCurrentIndex(n); // this must be the last statement of constructor @@ -1918,7 +1918,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog "Fox-and-Hound operation is available only in FT8 mode.\nGo back and change your selection."); } int n=ui->respondComboBox->currentIndex(); - if(m_config.special_op_id()!=SpecOp::NA_VHF and n>1) n=1; + if(m_config.special_op_id()!=SpecOp::ARRL_DIGI and n>1) n=1; ui->respondComboBox->setCurrentIndex(n); } } @@ -3522,7 +3522,8 @@ void MainWindow::readFromStdout() //readFromStdout } } - if(m_mode=="FT8" and SpecOp::NA_VHF==m_config.special_op_id()) { + qDebug() << "aaa" << int(m_config.special_op_id()); + if(m_mode=="FT8" and SpecOp::ARRL_DIGI==m_config.special_op_id()) { // Extract and save information that's relevant for the ARRL Digi contest QString deCall; QString deGrid; @@ -4418,7 +4419,8 @@ void MainWindow::guiUpdate() (SpecOp::NA_VHF==m_config.special_op_id() or SpecOp::FIELD_DAY==m_config.special_op_id() or SpecOp::RTTY==m_config.special_op_id() or - SpecOp::WW_DIGI==m_config.special_op_id()) ) { + SpecOp::WW_DIGI==m_config.special_op_id() or + SpecOp::ARRL_DIGI==m_config.special_op_id()) ) { //We're in a contest-like mode other than EU_VHF: start QSO with Tx2. ui->tx1->setEnabled(false); ui->txb1->setEnabled(false); @@ -5035,7 +5037,9 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie && (message_words.at(3).contains(qso_partner_base_call) or m_bDoubleClicked or bEU_VHF_w2 or (m_QSOProgress==CALLING))) { if(message_words.at(4).contains(grid_regexp) and SpecOp::EU_VHF!=m_config.special_op_id()) { - if((SpecOp::NA_VHF==m_config.special_op_id() or SpecOp::WW_DIGI==m_config.special_op_id()) and bContestOK){ + if((SpecOp::NA_VHF==m_config.special_op_id() or SpecOp::WW_DIGI==m_config.special_op_id() or + SpecOp::ARRL_DIGI==m_config.special_op_id() ) + and bContestOK) { setTxMsg(3); m_QSOProgress=ROGER_REPORT; } else { @@ -5409,6 +5413,7 @@ void MainWindow::genCQMsg () if(SpecOp::FIELD_DAY == m_config.special_op_id()) m_cqStr="FD"; if(SpecOp::RTTY == m_config.special_op_id()) m_cqStr="RU"; if(SpecOp::WW_DIGI == m_config.special_op_id()) m_cqStr="WW"; + if(SpecOp::ARRL_DIGI == m_config.special_op_id()) m_cqStr="TEST"; if( tlist.at(1)==my_callsign ) { t="CQ " + m_cqStr + " " + tlist.at(1) + " " + tlist.at(2); } else { @@ -5518,6 +5523,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional) } if(SpecOp::NA_VHF==m_config.special_op_id()) sent=my_grid; if(SpecOp::WW_DIGI==m_config.special_op_id()) sent=my_grid; + if(SpecOp::ARRL_DIGI==m_config.special_op_id()) sent=my_grid; if(SpecOp::FIELD_DAY==m_config.special_op_id()) sent=m_config.Field_Day_Exchange(); if(SpecOp::RTTY==m_config.special_op_id()) { sent=rst + m_config.RTTY_Exchange(); @@ -6053,6 +6059,10 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button m_xSent=m_config.my_grid().left(4); m_xRcvd=m_hisGrid; break; + case SpecOp::ARRL_DIGI: + m_xSent=m_config.my_grid().left(4); + m_xRcvd=m_hisGrid; + break; default: break; } @@ -6396,6 +6406,7 @@ void MainWindow::on_actionFT8_triggered() if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day"; if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY"; if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI"; + if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0+="ARRL_DIGI"; if(t0=="") { ui->labDXped->setVisible(false); } else { @@ -8636,9 +8647,9 @@ void MainWindow::on_cbCQonly_toggled(bool) void MainWindow::on_respondComboBox_currentIndexChanged (int n) { - if(m_config.special_op_id()!=SpecOp::NA_VHF and n==2) { + if(m_config.special_op_id()!=SpecOp::ARRL_DIGI and n==2) { ui->respondComboBox->setCurrentIndex(1); - MessageBox::warning_message (this, tr ("\"CQ: Max Pts\" is available only\n in NA VHF contest mode."));\ + MessageBox::warning_message (this, tr ("\"CQ: Max Pts\" is available only\n in ARRL DIGI contest mode."));\ } } From 04836a447d407ff0666f080326b7de2bbb815ee5 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 16 Mar 2022 11:26:11 -0400 Subject: [PATCH 026/105] Much of the code for helping S+P in ARRL_DIGI contest is now in place. More to come! --- widgets/mainwindow.cpp | 100 ++++++++++++++++++++++++++++------------- widgets/mainwindow.h | 16 ++++--- 2 files changed, 80 insertions(+), 36 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index e35130a4c..834caf029 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3362,6 +3362,37 @@ void MainWindow::decodeDone () MessageBox::information_message(this, tr("No more files to open.")); m_bNoMoreFiles=false; } + + if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id()) { + // Update the ARRL_DIGI display, etc. + if(m_latestDecodeTime<0) return; + + QMutableMapIterator icall(m_recentCall); + QString deCall; + int age=0; + int i=0; + int maxAge=4; + int points=0; + int maxPoints=0; + while (icall.hasNext()) { + icall.next(); + deCall=icall.key(); + age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); + if(age>maxAge) { + qDebug() << "bb" << i << deCall << "removed"; + icall.remove(); + } else { + i++; + points=m_activeCall[deCall].points; + if(points>maxPoints) maxPoints=points; + QString t; + t = t.asprintf(" %2d %2d",age,points); + t = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t; + qDebug() << "cc" << t << m_activeCall.count() << m_recentCall.count(); + } + } + } + } void MainWindow::readFromStdout() //readFromStdout @@ -3522,43 +3553,51 @@ void MainWindow::readFromStdout() //readFromStdout } } - qDebug() << "aaa" << int(m_config.special_op_id()); - if(m_mode=="FT8" and SpecOp::ARRL_DIGI==m_config.special_op_id()) { -// Extract and save information that's relevant for the ARRL Digi contest + if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id() and + decodedtext.isStandardMessage()) { + // Extract information relevant for the ARRL Digi contest QString deCall; QString deGrid; decodedtext.deCallAndGrid(/*out*/deCall,deGrid); + ActiveCall ac; + RecentCall rc; + if(deGrid.contains(grid_regexp)) { - if(!m_activeCall.contains(deCall)) { - m_activeCall[deCall]=deGrid; - double utch=0.0; - int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; - azdist_(const_cast (m_config.my_grid().left(4).toLatin1().constData()), - const_cast (deGrid.left(4).toLatin1().constData()),&utch, - &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); - int npts=int((500+nDkm)/500); - RecentCall rc; - rc.audioFreq=decodedtext.frequencyOffset(); - rc.az=nAz; - rc.decodeTime=decodedtext.timeInSeconds(); - rc.dialFreq=m_freqNominal; - rc.grid4=deGrid; - rc.points=npts; - rc.snr=decodedtext.snr(); - m_recentCall[deCall]=rc; - qDebug() << "aa" << rc.points << deCall << rc.grid4 << rc.az << rc.snr - << rc.dialFreq/1000000.0 << rc.audioFreq << rc.decodeTime; - } - } else { - if(m_activeCall.contains(deCall)) { - m_recentCall[deCall].decodeTime=decodedtext.timeInSeconds(); - RecentCall rc=m_recentCall[deCall]; - qDebug() << "bb" << rc.points << deCall << rc.grid4 << rc.az << rc.snr - << rc.dialFreq/1000000.0 << rc.audioFreq << rc.decodeTime; + if(!m_activeCall.contains(deCall) or deGrid!=m_activeCall.value(deCall).grid4) { + // Transmitting station's call is not already in QMap "m_activeCall", or grid has changed. + // Insert the call, grid, and associated fixed data into the list. + double utch=0.0; + int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; + azdist_(const_cast (m_config.my_grid().left(4).toLatin1().constData()), + const_cast (deGrid.left(4).toLatin1().constData()),&utch, + &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); + int npts=int((500+nDkm)/500); + ac.grid4=deGrid; + ac.az=nAz; + ac.points=npts; + m_activeCall[deCall]=ac; + } + } + + if(m_activeCall.contains(deCall)) { + // Update the variable data for this deCall + rc.dialFreq=m_freqNominal; + rc.audioFreq=decodedtext.frequencyOffset(); + rc.snr=decodedtext.snr(); + m_latestDecodeTime=decodedtext.timeInSeconds(); + rc.ready2call=false; + bool bCQ=decodedtext.messageWords()[0].left(3)=="CQ "; + if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; + rc.decodeTime=m_latestDecodeTime; + m_recentCall[deCall]=rc; + ac=m_activeCall[deCall]; + if(rc.ready2call != bCQ) { + qDebug() << "aa" << deCall << ac.grid4 << ac.az + << rc.dialFreq/1000000.0 << rc.audioFreq + << rc.snr << rc.decodeTime << ac.points << rc.ready2call << bCQ; } } } - } //Right (Rx Frequency) window @@ -3609,7 +3648,6 @@ void MainWindow::readFromStdout() //readFromStdout genStdMsgs("-10"); setTxMsg(3); } -// qDebug() << "cc" << m_deCall << m_deGrid << npts << m_maxPoints; } } diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 8cf886415..3075643e3 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -493,6 +493,7 @@ private: qint32 m_earlyDecode2=47; qint32 m_nDecodes=0; qint32 m_maxPoints=-1; + qint32 m_latestDecodeTime=-1; bool m_btxok; //True if OK to transmit bool m_diskData; @@ -673,18 +674,23 @@ private: }; QMap m_fixupQSO; //Key = HoundCall, value = info for QSO in progress - struct RecentCall + struct ActiveCall { QString grid4; qint32 az; - qint32 snr; + qint32 points; + }; + QMap m_activeCall; //Key = callsign, value = grid4, az, points for ARRL_DIGI + + struct RecentCall + { qint64 dialFreq; qint32 audioFreq; - qint32 points; + qint32 snr; qint32 decodeTime; + bool ready2call; }; - QMap m_recentCall; - QMap m_activeCall; + QMap m_recentCall; //Key = callsign, value = snr, dialFreq, audioFreq, decodeTime QQueue m_houndQueue; //Selected Hounds available for starting a QSO QQueue m_foxQSOinProgress; //QSOs in progress: Fox has sent a report From 9761c10648faae667f4bf3a7fd005c3f103d274f Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 16 Mar 2022 11:35:40 -0400 Subject: [PATCH 027/105] Make ARRL_Digi_Display() [executed at end of decodeDone()] a separate function. --- widgets/mainwindow.cpp | 54 +++++++++++++++++++++--------------------- widgets/mainwindow.h | 1 + 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 834caf029..5106c4325 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3363,36 +3363,36 @@ void MainWindow::decodeDone () m_bNoMoreFiles=false; } - if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id()) { - // Update the ARRL_DIGI display, etc. - if(m_latestDecodeTime<0) return; + if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id() + and m_latestDecodeTime>=0) ARRL_Digi_Display(); // Update the ARRL_DIGI display +} - QMutableMapIterator icall(m_recentCall); - QString deCall; - int age=0; - int i=0; - int maxAge=4; - int points=0; - int maxPoints=0; - while (icall.hasNext()) { - icall.next(); - deCall=icall.key(); - age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); - if(age>maxAge) { - qDebug() << "bb" << i << deCall << "removed"; - icall.remove(); - } else { - i++; - points=m_activeCall[deCall].points; - if(points>maxPoints) maxPoints=points; - QString t; - t = t.asprintf(" %2d %2d",age,points); - t = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t; - qDebug() << "cc" << t << m_activeCall.count() << m_recentCall.count(); - } +void MainWindow::ARRL_Digi_Display() +{ + QMutableMapIterator icall(m_recentCall); + QString deCall; + int age=0; + int i=0; + int maxAge=4; + int points=0; + int maxPoints=0; + while (icall.hasNext()) { + icall.next(); + deCall=icall.key(); + age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); + if(age>maxAge) { + qDebug() << "bb" << i << deCall << "removed"; + icall.remove(); + } else { + i++; + points=m_activeCall[deCall].points; + if(points>maxPoints) maxPoints=points; + QString t; + t = t.asprintf(" %2d %2d",age,points); + t = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t; + qDebug() << "cc" << t << m_activeCall.count() << m_recentCall.count(); } } - } void MainWindow::readFromStdout() //readFromStdout diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 3075643e3..156a49b37 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -812,6 +812,7 @@ private: void to_jt9(qint32 n, qint32 istart, qint32 idone); bool is77BitMode () const; void cease_auto_Tx_after_QSO (); + void ARRL_Digi_Display(); }; extern int killbyname(const char* progName); From 689b040cc5593c615a1e333cc1aca9e483490e75 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 16 Mar 2022 11:50:37 -0400 Subject: [PATCH 028/105] Make ARRL_Digi_Update() into a separate function. --- widgets/mainwindow.cpp | 89 ++++++++++++++++++++++-------------------- widgets/mainwindow.h | 1 + 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 5106c4325..1b482787d 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3367,6 +3367,52 @@ void MainWindow::decodeDone () and m_latestDecodeTime>=0) ARRL_Digi_Display(); // Update the ARRL_DIGI display } +void MainWindow::ARRL_Digi_Update(DecodedText dt) +{ + // Extract information relevant for the ARRL Digi contest + QString deCall; + QString deGrid; + dt.deCallAndGrid(/*out*/deCall,deGrid); + ActiveCall ac; + RecentCall rc; + + if(deGrid.contains(grid_regexp)) { + if(!m_activeCall.contains(deCall) or deGrid!=m_activeCall.value(deCall).grid4) { + // Transmitting station's call is not already in QMap "m_activeCall", or grid has changed. + // Insert the call, grid, and associated fixed data into the list. + double utch=0.0; + int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; + azdist_(const_cast (m_config.my_grid().left(4).toLatin1().constData()), + const_cast (deGrid.left(4).toLatin1().constData()),&utch, + &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); + int npts=int((500+nDkm)/500); + ac.grid4=deGrid; + ac.az=nAz; + ac.points=npts; + m_activeCall[deCall]=ac; + } + } + + if(m_activeCall.contains(deCall)) { + // Update the variable data for this deCall + rc.dialFreq=m_freqNominal; + rc.audioFreq=dt.frequencyOffset(); + rc.snr=dt.snr(); + m_latestDecodeTime=dt.timeInSeconds(); + rc.ready2call=false; + bool bCQ=dt.messageWords()[0].left(3)=="CQ "; + if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; + rc.decodeTime=m_latestDecodeTime; + m_recentCall[deCall]=rc; + ac=m_activeCall[deCall]; + if(rc.ready2call != bCQ) { + qDebug() << "aa" << deCall << ac.grid4 << ac.az + << rc.dialFreq/1000000.0 << rc.audioFreq + << rc.snr << rc.decodeTime << ac.points << rc.ready2call << bCQ; + } + } +} + void MainWindow::ARRL_Digi_Display() { QMutableMapIterator icall(m_recentCall); @@ -3555,48 +3601,7 @@ void MainWindow::readFromStdout() //readFromStdout if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id() and decodedtext.isStandardMessage()) { - // Extract information relevant for the ARRL Digi contest - QString deCall; - QString deGrid; - decodedtext.deCallAndGrid(/*out*/deCall,deGrid); - ActiveCall ac; - RecentCall rc; - - if(deGrid.contains(grid_regexp)) { - if(!m_activeCall.contains(deCall) or deGrid!=m_activeCall.value(deCall).grid4) { - // Transmitting station's call is not already in QMap "m_activeCall", or grid has changed. - // Insert the call, grid, and associated fixed data into the list. - double utch=0.0; - int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; - azdist_(const_cast (m_config.my_grid().left(4).toLatin1().constData()), - const_cast (deGrid.left(4).toLatin1().constData()),&utch, - &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); - int npts=int((500+nDkm)/500); - ac.grid4=deGrid; - ac.az=nAz; - ac.points=npts; - m_activeCall[deCall]=ac; - } - } - - if(m_activeCall.contains(deCall)) { - // Update the variable data for this deCall - rc.dialFreq=m_freqNominal; - rc.audioFreq=decodedtext.frequencyOffset(); - rc.snr=decodedtext.snr(); - m_latestDecodeTime=decodedtext.timeInSeconds(); - rc.ready2call=false; - bool bCQ=decodedtext.messageWords()[0].left(3)=="CQ "; - if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; - rc.decodeTime=m_latestDecodeTime; - m_recentCall[deCall]=rc; - ac=m_activeCall[deCall]; - if(rc.ready2call != bCQ) { - qDebug() << "aa" << deCall << ac.grid4 << ac.az - << rc.dialFreq/1000000.0 << rc.audioFreq - << rc.snr << rc.decodeTime << ac.points << rc.ready2call << bCQ; - } - } + ARRL_Digi_Update(decodedtext); } } diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 156a49b37..e145edce6 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -813,6 +813,7 @@ private: bool is77BitMode () const; void cease_auto_Tx_after_QSO (); void ARRL_Digi_Display(); + void ARRL_Digi_Update(DecodedText dt); }; extern int killbyname(const char* progName); From 38e65b747ac56a462fccc6cb606dfb089dcf7c67 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 16 Mar 2022 13:05:20 -0400 Subject: [PATCH 029/105] Display active stations in decreasing order of points. --- widgets/mainwindow.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 1b482787d..9df5bcc90 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -180,6 +180,8 @@ extern "C" { void chk_samples_(int* m_ihsym,int* k, int* m_hsymStop); void save_dxbase_(char* dxbase, FCL len); + + void indexx_(float arr[], int* n, int indx[]); } int volatile itone[MAX_NUM_SYMBOLS]; //Audio tones for all Tx symbols @@ -3422,6 +3424,10 @@ void MainWindow::ARRL_Digi_Display() int maxAge=4; int points=0; int maxPoints=0; + int indx[1000]; + float pts[1000]; + QStringList list; + while (icall.hasNext()) { icall.next(); deCall=icall.key(); @@ -3433,12 +3439,22 @@ void MainWindow::ARRL_Digi_Display() i++; points=m_activeCall[deCall].points; if(points>maxPoints) maxPoints=points; - QString t; - t = t.asprintf(" %2d %2d",age,points); - t = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t; - qDebug() << "cc" << t << m_activeCall.count() << m_recentCall.count(); + pts[i-1]=points - float(age)/(maxAge+1); + QString t1; + t1 = t1.asprintf(" %2d %2d",age,points); + t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1; +// qDebug() << "cc" << t1 << m_activeCall.count() << m_recentCall.count() << pts[i-1]; + list.append(t1); } } + int nmax=i; + indexx_(pts,&nmax,indx); + QString t; + for(int j=nmax-1; j>=0; j--) { + int k=indx[j]-1; + t += (list[k] + "\n"); + } + if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayActiveStations(t); } void MainWindow::readFromStdout() //readFromStdout From e732c5ba62c73f041f780de39a135e760b6f96a8 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 16 Mar 2022 14:37:25 -0400 Subject: [PATCH 030/105] Work in progress on the ActiveStations window. --- widgets/activeStations.cpp | 22 ++++++++-- widgets/activeStations.h | 3 ++ widgets/activeStations.ui | 86 ++++++++++++++++++++++++++++++++++++++ widgets/mainwindow.cpp | 16 +++---- 4 files changed, 117 insertions(+), 10 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 9c6a7d061..e286ec0a5 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -47,11 +47,8 @@ void ActiveStations::setContentFont(QFont const& font) cursor.mergeCharFormat (charFormat); cursor.clearSelection (); cursor.movePosition (QTextCursor::End); - - // position so viewport scrolled to left cursor.movePosition (QTextCursor::Up); cursor.movePosition (QTextCursor::StartOfLine); - ui->ActiveStationsPlainTextEdit->setTextCursor (cursor); ui->ActiveStationsPlainTextEdit->ensureCursorVisible (); } @@ -60,15 +57,34 @@ void ActiveStations::read_settings () { SettingsGroup group {settings_, "ActiveStations"}; restoreGeometry (settings_->value ("window/geometry").toByteArray ()); + ui->sbMaxRecent->setValue(settings_->value("MaxRecent",10).toInt()); + ui->sbMaxAge->setValue(settings_->value("MaxAge",10).toInt()); } void ActiveStations::write_settings () { SettingsGroup group {settings_, "ActiveStations"}; settings_->setValue ("window/geometry", saveGeometry ()); + settings_->setValue("MaxRecent",ui->sbMaxRecent->value()); + settings_->setValue("MaxAge",ui->sbMaxAge->value()); } void ActiveStations::displayActiveStations(QString const& t) { ui->ActiveStationsPlainTextEdit->setPlainText(t); } + +void ActiveStations::displayRecentStations(QString const& t) +{ + ui->RecentStationsPlainTextEdit->setPlainText(t); +} + +int ActiveStations::maxRecent() +{ + return ui->sbMaxRecent->value(); +} + +int ActiveStations::maxAge() +{ + return ui->sbMaxAge->value(); +} diff --git a/widgets/activeStations.h b/widgets/activeStations.h index 24bda01ac..de8b6214c 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -20,7 +20,10 @@ public: explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0); ~ActiveStations(); void displayActiveStations(QString const&); + void displayRecentStations(QString const&); void changeFont (QFont const&); + int maxRecent(); + int maxAge(); private: void read_settings (); diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index 4ab3ea464..d5210ab89 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -18,11 +18,27 @@ + + + 0 + 2 + + QPlainTextEdit::NoWrap + + + + + 0 + 1 + + + + @@ -33,6 +49,76 @@ + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + Max Age + + + 4 + + + 10 + + + 4 + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + Max Recent + + + 20 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 9df5bcc90..8a1cb8417 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3406,12 +3406,14 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; rc.decodeTime=m_latestDecodeTime; m_recentCall[deCall]=rc; + /* ac=m_activeCall[deCall]; if(rc.ready2call != bCQ) { qDebug() << "aa" << deCall << ac.grid4 << ac.az << rc.dialFreq/1000000.0 << rc.audioFreq << rc.snr << rc.decodeTime << ac.points << rc.ready2call << bCQ; } + */ } } @@ -3421,7 +3423,7 @@ void MainWindow::ARRL_Digi_Display() QString deCall; int age=0; int i=0; - int maxAge=4; + int maxAge=m_ActiveStationsWidget->maxAge(); int points=0; int maxPoints=0; int indx[1000]; @@ -3433,7 +3435,7 @@ void MainWindow::ARRL_Digi_Display() deCall=icall.key(); age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); if(age>maxAge) { - qDebug() << "bb" << i << deCall << "removed"; +// qDebug() << "bb" << i << deCall << "removed"; icall.remove(); } else { i++; @@ -3443,18 +3445,18 @@ void MainWindow::ARRL_Digi_Display() QString t1; t1 = t1.asprintf(" %2d %2d",age,points); t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1; -// qDebug() << "cc" << t1 << m_activeCall.count() << m_recentCall.count() << pts[i-1]; list.append(t1); } } - int nmax=i; - indexx_(pts,&nmax,indx); + int maxRecent=qMin(i,m_ActiveStationsWidget->maxRecent()); + indexx_(pts,&maxRecent,indx); QString t; - for(int j=nmax-1; j>=0; j--) { + for(int j=maxRecent-1; j>=0; j--) { int k=indx[j]-1; t += (list[k] + "\n"); } - if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayActiveStations(t); + if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t); + qDebug() << "dd" << maxRecent << maxAge; } void MainWindow::readFromStdout() //readFromStdout From ceb13110c55411b888ebb520357fd3e58e8ca0a1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 16 Mar 2022 15:33:21 -0400 Subject: [PATCH 031/105] Use monospace font in ActiveStations window. --- widgets/activeStations.cpp | 8 +++- widgets/activeStations.ui | 75 +++++++++++++++++++++----------------- widgets/mainwindow.cpp | 11 +----- 3 files changed, 49 insertions(+), 45 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index e286ec0a5..2fb1091fe 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -18,9 +18,11 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui->setupUi(this); setWindowTitle (QApplication::applicationName () + " - " + tr ("Active Stations")); ui->ActiveStationsPlainTextEdit->setReadOnly (true); + ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); ui->header_label->setText("Pts Call Grid Az S/N Dial Freq"); + ui->header_label2->setText(" Call Grid Age Points"); } ActiveStations::~ActiveStations() @@ -33,10 +35,14 @@ void ActiveStations::changeFont (QFont const& font) ui->header_label->setStyleSheet (font_as_stylesheet (font)); ui->ActiveStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); setContentFont (font); + + ui->header_label2->setStyleSheet (font_as_stylesheet (font)); + ui->RecentStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); +// setContentFont (font); + updateGeometry (); } - void ActiveStations::setContentFont(QFont const& font) { ui->ActiveStationsPlainTextEdit->setFont (font); diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index d5210ab89..0c9eb8640 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -16,40 +16,7 @@ - - - - - 0 - 2 - - - - QPlainTextEdit::NoWrap - - - - - - - - 0 - 1 - - - - - - - - Points Call Grid AZ SNR Freq Band - - - 3 - - - - + @@ -119,6 +86,46 @@ + + + + + 0 + 2 + + + + QPlainTextEdit::NoWrap + + + + + + + + 0 + 1 + + + + + + + + Points Call Grid AZ SNR Freq Band + + + 3 + + + + + + + Call Grid Age Points + + + diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 8a1cb8417..fb1cc6f01 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3406,14 +3406,6 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; rc.decodeTime=m_latestDecodeTime; m_recentCall[deCall]=rc; - /* - ac=m_activeCall[deCall]; - if(rc.ready2call != bCQ) { - qDebug() << "aa" << deCall << ac.grid4 << ac.az - << rc.dialFreq/1000000.0 << rc.audioFreq - << rc.snr << rc.decodeTime << ac.points << rc.ready2call << bCQ; - } - */ } } @@ -3443,7 +3435,7 @@ void MainWindow::ARRL_Digi_Display() if(points>maxPoints) maxPoints=points; pts[i-1]=points - float(age)/(maxAge+1); QString t1; - t1 = t1.asprintf(" %2d %2d",age,points); + t1 = t1.asprintf(" %2d %5d",age,points); t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1; list.append(t1); } @@ -3456,7 +3448,6 @@ void MainWindow::ARRL_Digi_Display() t += (list[k] + "\n"); } if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t); - qDebug() << "dd" << maxRecent << maxAge; } void MainWindow::readFromStdout() //readFromStdout From 15e33d22af7fab46cb53d1eab90bc8df35125cf3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 17 Mar 2022 09:36:59 -0400 Subject: [PATCH 032/105] More work in progress on the ActiveStations window. --- widgets/activeStations.cpp | 8 ++++++++ widgets/activeStations.h | 4 ++++ widgets/mainwindow.cpp | 21 ++++++++++++++++++++- widgets/mainwindow.h | 2 ++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 2fb1091fe..c3ba01f79 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -23,6 +23,8 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget read_settings (); ui->header_label->setText("Pts Call Grid Az S/N Dial Freq"); ui->header_label2->setText(" Call Grid Age Points"); + + connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select); } ActiveStations::~ActiveStations() @@ -94,3 +96,9 @@ int ActiveStations::maxAge() { return ui->sbMaxAge->value(); } + +void ActiveStations::select() +{ + int nline=ui->RecentStationsPlainTextEdit->textCursor().blockNumber(); + emit callSandP(nline); +} diff --git a/widgets/activeStations.h b/widgets/activeStations.h index de8b6214c..d01c3a64b 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -24,6 +24,10 @@ public: void changeFont (QFont const&); int maxRecent(); int maxAge(); + Q_SLOT void select(); + +signals: + void callSandP(int nline); private: void read_settings (); diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index fb1cc6f01..a1147ca3a 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2775,6 +2775,7 @@ void MainWindow::on_actionActiveStations_triggered() m_ActiveStationsWidget->showNormal(); m_ActiveStationsWidget->raise(); m_ActiveStationsWidget->activateWindow(); + connect(m_ActiveStationsWidget.data (), SIGNAL(callSandP(int)),this,SLOT(callSandP2(int))); } void MainWindow::on_actionOpen_triggered() //Open File @@ -3443,13 +3444,31 @@ void MainWindow::ARRL_Digi_Display() int maxRecent=qMin(i,m_ActiveStationsWidget->maxRecent()); indexx_(pts,&maxRecent,indx); QString t; + i=0; for(int j=maxRecent-1; j>=0; j--) { int k=indx[j]-1; + m_ready2call[i]=list[k]; + i++; t += (list[k] + "\n"); } if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t); } +void MainWindow::callSandP2(int n) +{ + QStringList w=m_ready2call[n].split(' ', SkipEmptyParts); + + m_deCall=w[0]; //### needed? + m_deGrid=w[1]; //### needed? + m_bDoubleClicked=true; //### needed? + ui->dxCallEntry->setText(m_deCall); + ui->dxGridEntry->setText(m_deGrid); + genStdMsgs("-10"); //### real SNR would be better here? + setTxMsg(3); + + if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx +} + void MainWindow::readFromStdout() //readFromStdout { while(proc_jt9.canReadLine()) { @@ -7493,7 +7512,7 @@ void MainWindow::transmit (double snr) true, false, snr, m_TRperiod); } - if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::NA_VHF==m_config.special_op_id()) { + if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::ARRL_DIGI==m_config.special_op_id()) { qDebug() << "dd" << m_maxPoints << m_deCall << m_deGrid; ui->dxCallEntry->setText(m_deCall); ui->dxGridEntry->setText(m_deGrid); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index e145edce6..508a508b1 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -335,6 +335,7 @@ private slots: void remote_configure (QString const& mode, quint32 frequency_tolerance, QString const& submode , bool fast_mode, quint32 tr_period, quint32 rx_df, QString const& dx_call , QString const& dx_grid, bool generate_messages); + void callSandP2(int nline); private: Q_SIGNAL void initializeAudioOutputStream (QAudioDeviceInfo, @@ -647,6 +648,7 @@ private: QString m_BestCQpriority; QString m_deCall; QString m_deGrid; + QString m_ready2call[20]; QSet m_pfx; QSet m_sfx; From f3bac687bafc71d00a41bf46814ccac5d875784c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 17 Mar 2022 12:09:16 -0400 Subject: [PATCH 033/105] Clean up the ActiveStations window. --- widgets/activeStations.cpp | 30 ------------------------------ widgets/activeStations.h | 3 +-- widgets/activeStations.ui | 27 ++------------------------- 3 files changed, 3 insertions(+), 57 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index c3ba01f79..ddbc40389 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -17,13 +17,10 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget { ui->setupUi(this); setWindowTitle (QApplication::applicationName () + " - " + tr ("Active Stations")); - ui->ActiveStationsPlainTextEdit->setReadOnly (true); ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label->setText("Pts Call Grid Az S/N Dial Freq"); ui->header_label2->setText(" Call Grid Age Points"); - connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select); } @@ -34,33 +31,11 @@ ActiveStations::~ActiveStations() void ActiveStations::changeFont (QFont const& font) { - ui->header_label->setStyleSheet (font_as_stylesheet (font)); - ui->ActiveStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); - setContentFont (font); - ui->header_label2->setStyleSheet (font_as_stylesheet (font)); ui->RecentStationsPlainTextEdit->setStyleSheet (font_as_stylesheet (font)); -// setContentFont (font); - updateGeometry (); } -void ActiveStations::setContentFont(QFont const& font) -{ - ui->ActiveStationsPlainTextEdit->setFont (font); - QTextCharFormat charFormat; - charFormat.setFont (font); - ui->ActiveStationsPlainTextEdit->selectAll (); - auto cursor = ui->ActiveStationsPlainTextEdit->textCursor (); - cursor.mergeCharFormat (charFormat); - cursor.clearSelection (); - cursor.movePosition (QTextCursor::End); - cursor.movePosition (QTextCursor::Up); - cursor.movePosition (QTextCursor::StartOfLine); - ui->ActiveStationsPlainTextEdit->setTextCursor (cursor); - ui->ActiveStationsPlainTextEdit->ensureCursorVisible (); -} - void ActiveStations::read_settings () { SettingsGroup group {settings_, "ActiveStations"}; @@ -77,11 +52,6 @@ void ActiveStations::write_settings () settings_->setValue("MaxAge",ui->sbMaxAge->value()); } -void ActiveStations::displayActiveStations(QString const& t) -{ - ui->ActiveStationsPlainTextEdit->setPlainText(t); -} - void ActiveStations::displayRecentStations(QString const& t) { ui->RecentStationsPlainTextEdit->setPlainText(t); diff --git a/widgets/activeStations.h b/widgets/activeStations.h index d01c3a64b..48144880c 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -19,7 +19,6 @@ class ActiveStations public: explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0); ~ActiveStations(); - void displayActiveStations(QString const&); void displayRecentStations(QString const&); void changeFont (QFont const&); int maxRecent(); @@ -32,7 +31,7 @@ signals: private: void read_settings (); void write_settings (); - void setContentFont (QFont const&); +// void setContentFont (QFont const&); QSettings * settings_; QScopedPointer ui; diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index 0c9eb8640..64d0db2de 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -7,7 +7,7 @@ 0 0 405 - 529 + 339 @@ -16,7 +16,7 @@ - + @@ -87,19 +87,6 @@ - - - - 0 - 2 - - - - QPlainTextEdit::NoWrap - - - - @@ -110,16 +97,6 @@ - - - Points Call Grid AZ SNR Freq Band - - - 3 - - - - Call Grid Age Points From 5668e74f61ef53f3d46b9dd375ff33a7950cb07c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 17 Mar 2022 16:43:58 -0400 Subject: [PATCH 034/105] More work on the ActiveStations features. --- widgets/activeStations.cpp | 6 +++++- widgets/activeStations.h | 3 ++- widgets/activeStations.ui | 4 ++-- widgets/mainwindow.cpp | 17 ++++++++++++----- widgets/mainwindow.h | 3 ++- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index ddbc40389..a825d11f8 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "SettingsGroup.hpp" #include "qt_helpers.hpp" @@ -20,7 +21,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label2->setText(" Call Grid Age Points"); + ui->header_label2->setText(" N Call Grid Tx Age Points"); connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select); } @@ -69,6 +70,9 @@ int ActiveStations::maxAge() void ActiveStations::select() { + qint64 msec=QDateTime::currentMSecsSinceEpoch(); + if((msec-m_msec0)<500) return; + m_msec0=msec; int nline=ui->RecentStationsPlainTextEdit->textCursor().blockNumber(); emit callSandP(nline); } diff --git a/widgets/activeStations.h b/widgets/activeStations.h index 48144880c..b6ccf9058 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -31,7 +31,8 @@ signals: private: void read_settings (); void write_settings (); -// void setContentFont (QFont const&); + + qint64 m_msec0=0; QSettings * settings_; QScopedPointer ui; diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index 64d0db2de..563a3898f 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -36,7 +36,7 @@ Max Age - 4 + 0 10 @@ -64,7 +64,7 @@ Max Recent - 20 + 50 10 diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a1147ca3a..9ca3ae7f6 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3402,6 +3402,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) rc.audioFreq=dt.frequencyOffset(); rc.snr=dt.snr(); m_latestDecodeTime=dt.timeInSeconds(); + rc.txEven = (m_latestDecodeTime % int(2*m_TRperiod)) > 0; rc.ready2call=false; bool bCQ=dt.messageWords()[0].left(3)=="CQ "; if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; @@ -3427,8 +3428,10 @@ void MainWindow::ARRL_Digi_Display() icall.next(); deCall=icall.key(); age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); + int itx=1; + if(icall.value().txEven) itx=0; if(age>maxAge) { -// qDebug() << "bb" << i << deCall << "removed"; + qDebug() << "bb" << i << deCall << "removed"; icall.remove(); } else { i++; @@ -3436,7 +3439,7 @@ void MainWindow::ARRL_Digi_Display() if(points>maxPoints) maxPoints=points; pts[i-1]=points - float(age)/(maxAge+1); QString t1; - t1 = t1.asprintf(" %2d %5d",age,points); + t1 = t1.asprintf(" %2d %2d %5d",itx,age,points); t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1; list.append(t1); } @@ -3449,15 +3452,17 @@ void MainWindow::ARRL_Digi_Display() int k=indx[j]-1; m_ready2call[i]=list[k]; i++; - t += (list[k] + "\n"); + QString t1=QString::number(i) + ". "; + if(i<10) t1=" " + t1; + t += (t1 + list[k] + "\n"); } if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t); } void MainWindow::callSandP2(int n) { + if(m_ready2call[n]=="") return; QStringList w=m_ready2call[n].split(' ', SkipEmptyParts); - m_deCall=w[0]; //### needed? m_deGrid=w[1]; //### needed? m_bDoubleClicked=true; //### needed? @@ -3465,8 +3470,10 @@ void MainWindow::callSandP2(int n) ui->dxGridEntry->setText(m_deGrid); genStdMsgs("-10"); //### real SNR would be better here? setTxMsg(3); - + m_txFirst = (w[2]=="0"); + ui->txFirstCheckBox->setChecked(m_txFirst); if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx + if(m_transmitting) m_restart=true; } void MainWindow::readFromStdout() //readFromStdout diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 508a508b1..47a4f13fc 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -648,7 +648,7 @@ private: QString m_BestCQpriority; QString m_deCall; QString m_deGrid; - QString m_ready2call[20]; + QString m_ready2call[50]; QSet m_pfx; QSet m_sfx; @@ -690,6 +690,7 @@ private: qint32 audioFreq; qint32 snr; qint32 decodeTime; + bool txEven; bool ready2call; }; QMap m_recentCall; //Key = callsign, value = snr, dialFreq, audioFreq, decodeTime From 2c0d05e05dfd8c8b89686628f87b551438043448 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 18 Mar 2022 10:39:08 -0400 Subject: [PATCH 035/105] More work in progress on funcrions in ActiveStations window. --- widgets/activeStations.cpp | 19 +++++++++++++------ widgets/activeStations.h | 3 +++ widgets/mainwindow.cpp | 36 +++++++++++++++++++++++++----------- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index a825d11f8..0fbc42c66 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -21,7 +21,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label2->setText(" N Call Grid Tx Age Points"); + ui->header_label2->setText(" N Call Grid S/N Tx Age Points"); connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select); } @@ -70,9 +70,16 @@ int ActiveStations::maxAge() void ActiveStations::select() { - qint64 msec=QDateTime::currentMSecsSinceEpoch(); - if((msec-m_msec0)<500) return; - m_msec0=msec; - int nline=ui->RecentStationsPlainTextEdit->textCursor().blockNumber(); - emit callSandP(nline); + if(m_clickOK) { + qint64 msec=QDateTime::currentMSecsSinceEpoch(); + if((msec-m_msec0)<500) return; + m_msec0=msec; + int nline=ui->RecentStationsPlainTextEdit->textCursor().blockNumber(); + emit callSandP(nline); + } +} + +void ActiveStations::setClickOK(bool b) +{ + m_clickOK=b; } diff --git a/widgets/activeStations.h b/widgets/activeStations.h index b6ccf9058..b5c7d0e63 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -23,8 +23,11 @@ public: void changeFont (QFont const&); int maxRecent(); int maxAge(); + void setClickOK(bool b); Q_SLOT void select(); + bool m_clickOK=false; + signals: void callSandP(int nline); diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 9ca3ae7f6..b272dc7a5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3366,8 +3366,8 @@ void MainWindow::decodeDone () m_bNoMoreFiles=false; } - if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id() - and m_latestDecodeTime>=0) ARRL_Digi_Display(); // Update the ARRL_DIGI display + if((m_mode=="FT4" or m_mode=="FT8") /* and SpecOp::ARRL_DIGI==m_config.special_op_id() */ + and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) ARRL_Digi_Display(); // Update the ARRL_DIGI display } void MainWindow::ARRL_Digi_Update(DecodedText dt) @@ -3379,10 +3379,13 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) ActiveCall ac; RecentCall rc; + if(dt.indexOf("HS2")>0) qDebug() << "aa" << deCall << deGrid; + if(deGrid.contains(grid_regexp)) { if(!m_activeCall.contains(deCall) or deGrid!=m_activeCall.value(deCall).grid4) { // Transmitting station's call is not already in QMap "m_activeCall", or grid has changed. // Insert the call, grid, and associated fixed data into the list. + double utch=0.0; int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; azdist_(const_cast (m_config.my_grid().left(4).toLatin1().constData()), @@ -3393,6 +3396,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) ac.az=nAz; ac.points=npts; m_activeCall[deCall]=ac; + if(dt.indexOf("HS2")>0) qDebug() << "bb" << deCall << deGrid << m_activeCall[deCall].points; } } @@ -3408,13 +3412,14 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; rc.decodeTime=m_latestDecodeTime; m_recentCall[deCall]=rc; + if(dt.indexOf("HS2")>0) qDebug() << "cc" << deCall << deGrid << m_activeCall[deCall].points; } } void MainWindow::ARRL_Digi_Display() { QMutableMapIterator icall(m_recentCall); - QString deCall; + QString deCall,deGrid; int age=0; int i=0; int maxAge=m_ActiveStationsWidget->maxAge(); @@ -3430,33 +3435,42 @@ void MainWindow::ARRL_Digi_Display() age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); int itx=1; if(icall.value().txEven) itx=0; + int snr=icall.value().snr; if(age>maxAge) { - qDebug() << "bb" << i << deCall << "removed"; icall.remove(); } else { i++; + deGrid=m_activeCall[deCall].grid4; points=m_activeCall[deCall].points; if(points>maxPoints) maxPoints=points; - pts[i-1]=points - float(age)/(maxAge+1); + float x=float(age)/(maxAge+1); + if(deCall=="HS2AQG") qDebug() << "dd" << deCall << deGrid << points << x; + if(x>1.0) x=0; + pts[i-1]=points - x; QString t1; - t1 = t1.asprintf(" %2d %2d %5d",itx,age,points); + t1 = t1.asprintf(" %+2.2d %2d %2d %5d",snr,itx,age,points); t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1; list.append(t1); } } + if(i==0) return; + int jz=i; + m_ActiveStationsWidget->setClickOK(false); int maxRecent=qMin(i,m_ActiveStationsWidget->maxRecent()); - indexx_(pts,&maxRecent,indx); + indexx_(pts,&jz,indx); QString t; i=0; - for(int j=maxRecent-1; j>=0; j--) { + for(int j=jz-1; j>=0; j--) { int k=indx[j]-1; m_ready2call[i]=list[k]; i++; QString t1=QString::number(i) + ". "; if(i<10) t1=" " + t1; t += (t1 + list[k] + "\n"); + if(i>=maxRecent) break; } if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t); + m_ActiveStationsWidget->setClickOK(true); } void MainWindow::callSandP2(int n) @@ -3469,7 +3483,7 @@ void MainWindow::callSandP2(int n) ui->dxCallEntry->setText(m_deCall); ui->dxGridEntry->setText(m_deGrid); genStdMsgs("-10"); //### real SNR would be better here? - setTxMsg(3); + setTxMsg(1); m_txFirst = (w[2]=="0"); ui->txFirstCheckBox->setChecked(m_txFirst); if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx @@ -3634,8 +3648,8 @@ void MainWindow::readFromStdout() //readFromStdout } } - if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id() and - decodedtext.isStandardMessage()) { + if((m_mode=="FT4" or m_mode=="FT8") /* and SpecOp::ARRL_DIGI==m_config.special_op_id() */ + and decodedtext.isStandardMessage()) { ARRL_Digi_Update(decodedtext); } } From 6e193ab0e1e3c1c1cdbeb6da9aaa14f1ab286b3a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 18 Mar 2022 11:55:44 -0400 Subject: [PATCH 036/105] Add bands worked and other stuff to ActiveStations display. --- widgets/activeStations.cpp | 2 +- widgets/mainwindow.cpp | 30 +++++++++++++++++++++++------- widgets/mainwindow.h | 2 ++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 0fbc42c66..4d7700322 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -21,7 +21,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label2->setText(" N Call Grid S/N Tx Age Points"); + ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts Bands"); connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select); } diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b272dc7a5..f9a04b192 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3379,7 +3379,6 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) ActiveCall ac; RecentCall rc; - if(dt.indexOf("HS2")>0) qDebug() << "aa" << deCall << deGrid; if(deGrid.contains(grid_regexp)) { if(!m_activeCall.contains(deCall) or deGrid!=m_activeCall.value(deCall).grid4) { @@ -3393,10 +3392,10 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); int npts=int((500+nDkm)/500); ac.grid4=deGrid; + ac.bands="......."; ac.az=nAz; ac.points=npts; m_activeCall[deCall]=ac; - if(dt.indexOf("HS2")>0) qDebug() << "bb" << deCall << deGrid << m_activeCall[deCall].points; } } @@ -3412,14 +3411,13 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; rc.decodeTime=m_latestDecodeTime; m_recentCall[deCall]=rc; - if(dt.indexOf("HS2")>0) qDebug() << "cc" << deCall << deGrid << m_activeCall[deCall].points; } } void MainWindow::ARRL_Digi_Display() { QMutableMapIterator icall(m_recentCall); - QString deCall,deGrid; + QString deCall,deGrid,bands; int age=0; int i=0; int maxAge=m_ActiveStationsWidget->maxAge(); @@ -3436,20 +3434,22 @@ void MainWindow::ARRL_Digi_Display() int itx=1; if(icall.value().txEven) itx=0; int snr=icall.value().snr; + int freq=icall.value().audioFreq; if(age>maxAge) { icall.remove(); } else { i++; + int az=m_activeCall[deCall].az; deGrid=m_activeCall[deCall].grid4; points=m_activeCall[deCall].points; + bands=m_activeCall[deCall].bands; if(points>maxPoints) maxPoints=points; float x=float(age)/(maxAge+1); - if(deCall=="HS2AQG") qDebug() << "dd" << deCall << deGrid << points << x; if(x>1.0) x=0; pts[i-1]=points - x; QString t1; - t1 = t1.asprintf(" %+2.2d %2d %2d %5d",snr,itx,age,points); - t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1; + t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); + t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; list.append(t1); } } @@ -6205,12 +6205,27 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, ui->sbSerialNumber->setValue(ui->sbSerialNumber->value() + 1); } + activeWorked(call,m_config.bands()->find(dial_freq)); m_xSent.clear (); m_xRcvd.clear (); if (m_config.clear_DXcall ()) ui->dxCallEntry->clear (); if (m_config.clear_DXgrid ()) ui->dxGridEntry->clear (); } +void MainWindow::activeWorked(QString call, QString band) +{ + QString bands=m_activeCall[call].bands; + QByteArray ba=bands.toLatin1(); + if(band=="160m") ba[0]='a'; + if(band=="80m") ba[1]='b'; + if(band=="40m") ba[2]='c'; + if(band=="20m") ba[3]='d'; + if(band=="15m") ba[4]='e'; + if(band=="10m") ba[5]='f'; + if(band=="6m") ba[6]='g'; + m_activeCall[call].bands=QString::fromLatin1(ba); +} + qint64 MainWindow::nWidgets(QString t) { Q_ASSERT(t.length()==N_WIDGETS); @@ -7078,6 +7093,7 @@ void MainWindow::on_reset_cabrillo_log_action_triggered () { if(m_config.RTTY_Exchange()!="SCC") ui->sbSerialNumber->setValue(1); m_logBook.contest_log ()->reset (); + m_activeCall.clear(); //Erase the QMap of active calls } } diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 47a4f13fc..0ce0bc33f 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -679,6 +679,7 @@ private: struct ActiveCall { QString grid4; + QString bands; qint32 az; qint32 points; }; @@ -817,6 +818,7 @@ private: void cease_auto_Tx_after_QSO (); void ARRL_Digi_Display(); void ARRL_Digi_Update(DecodedText dt); + void activeWorked(QString call, QString band); }; extern int killbyname(const char* progName); From 48312bc6204bfbc5461417c20338c276e4e64fca Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 18 Mar 2022 14:18:49 -0400 Subject: [PATCH 037/105] Moew work on ActiveStations window features. --- widgets/mainwindow.cpp | 48 ++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f9a04b192..aff96c031 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3398,7 +3398,18 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_activeCall[deCall]=ac; } } - +/* +// Don't display stations we already worked on this band. + QString band=m_config.bands()->find(m_freqNominal); + qDebug() << "aa" << band; + if(band=="160m" and m_activeCall[deCall].bands.indexOf("a")>=0) return; + if(band=="80m" and m_activeCall[deCall].bands.indexOf("b")>=0) return; + if(band=="40m" and m_activeCall[deCall].bands.indexOf("c")>=0) return; + if(band=="20m" and m_activeCall[deCall].bands.indexOf("d")>=0) return; + if(band=="15m" and m_activeCall[deCall].bands.indexOf("e")>=0) return; + if(band=="10m" and m_activeCall[deCall].bands.indexOf("f")>=0) return; + if(band=="6m" and m_activeCall[deCall].bands.indexOf("g")>=0) return; +*/ if(m_activeCall.contains(deCall)) { // Update the variable data for this deCall rc.dialFreq=m_freqNominal; @@ -3477,12 +3488,13 @@ void MainWindow::callSandP2(int n) { if(m_ready2call[n]=="") return; QStringList w=m_ready2call[n].split(' ', SkipEmptyParts); - m_deCall=w[0]; //### needed? - m_deGrid=w[1]; //### needed? + m_deCall=w[0]; + m_deGrid=w[1]; m_bDoubleClicked=true; //### needed? ui->dxCallEntry->setText(m_deCall); ui->dxGridEntry->setText(m_deGrid); - genStdMsgs("-10"); //### real SNR would be better here? + genStdMsgs(w[3]); //### real SNR would be better here? + ui->RxFreqSpinBox->setValue(w[4].toInt()); setTxMsg(1); m_txFirst = (w[2]=="0"); ui->txFirstCheckBox->setChecked(m_txFirst); @@ -3490,6 +3502,20 @@ void MainWindow::callSandP2(int n) if(m_transmitting) m_restart=true; } +void MainWindow::activeWorked(QString call, QString band) +{ + QString bands=m_activeCall[call].bands; + QByteArray ba=bands.toLatin1(); + if(band=="160m") ba[0]='a'; + if(band=="80m") ba[1]='b'; + if(band=="40m") ba[2]='c'; + if(band=="20m") ba[3]='d'; + if(band=="15m") ba[4]='e'; + if(band=="10m") ba[5]='f'; + if(band=="6m") ba[6]='g'; + m_activeCall[call].bands=QString::fromLatin1(ba); +} + void MainWindow::readFromStdout() //readFromStdout { while(proc_jt9.canReadLine()) { @@ -6212,20 +6238,6 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, if (m_config.clear_DXgrid ()) ui->dxGridEntry->clear (); } -void MainWindow::activeWorked(QString call, QString band) -{ - QString bands=m_activeCall[call].bands; - QByteArray ba=bands.toLatin1(); - if(band=="160m") ba[0]='a'; - if(band=="80m") ba[1]='b'; - if(band=="40m") ba[2]='c'; - if(band=="20m") ba[3]='d'; - if(band=="15m") ba[4]='e'; - if(band=="10m") ba[5]='f'; - if(band=="6m") ba[6]='g'; - m_activeCall[call].bands=QString::fromLatin1(ba); -} - qint64 MainWindow::nWidgets(QString t) { Q_ASSERT(t.length()==N_WIDGETS); From e366b0a6af140f453090177352824b9985904c67 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 18 Mar 2022 14:52:09 -0400 Subject: [PATCH 038/105] Don'r display in ActiveStations a call already worked on this band. --- widgets/mainwindow.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index aff96c031..c187e3eb7 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3398,19 +3398,20 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_activeCall[deCall]=ac; } } -/* -// Don't display stations we already worked on this band. - QString band=m_config.bands()->find(m_freqNominal); - qDebug() << "aa" << band; - if(band=="160m" and m_activeCall[deCall].bands.indexOf("a")>=0) return; - if(band=="80m" and m_activeCall[deCall].bands.indexOf("b")>=0) return; - if(band=="40m" and m_activeCall[deCall].bands.indexOf("c")>=0) return; - if(band=="20m" and m_activeCall[deCall].bands.indexOf("d")>=0) return; - if(band=="15m" and m_activeCall[deCall].bands.indexOf("e")>=0) return; - if(band=="10m" and m_activeCall[deCall].bands.indexOf("f")>=0) return; - if(band=="6m" and m_activeCall[deCall].bands.indexOf("g")>=0) return; -*/ + + if(m_activeCall.contains(deCall)) { + + // Don't display stations we already worked on this band. + QString band=m_config.bands()->find(m_freqNominal); + if(band=="160m" and m_activeCall[deCall].bands.indexOf("a")>=0) {m_recentCall.remove(deCall); return;} + if(band=="80m" and m_activeCall[deCall].bands.indexOf("b")>=0) {m_recentCall.remove(deCall); return;} + if(band=="40m" and m_activeCall[deCall].bands.indexOf("c")>=0) {m_recentCall.remove(deCall); return;} + if(band=="20m" and m_activeCall[deCall].bands.indexOf("d")>=0) {m_recentCall.remove(deCall); return;} + if(band=="15m" and m_activeCall[deCall].bands.indexOf("e")>=0) {m_recentCall.remove(deCall); return;} + if(band=="10m" and m_activeCall[deCall].bands.indexOf("f")>=0) {m_recentCall.remove(deCall); return;} + if(band=="6m" and m_activeCall[deCall].bands.indexOf("g")>=0) {m_recentCall.remove(deCall); return;} + // Update the variable data for this deCall rc.dialFreq=m_freqNominal; rc.audioFreq=dt.frequencyOffset(); From f3e838cdc6594c01ddc97f813f2fced153923518 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 09:07:06 -0400 Subject: [PATCH 039/105] Max Pts ==> Max Dist, and allow with non-contest messages. --- widgets/mainwindow.cpp | 18 ++---------------- widgets/mainwindow.h | 1 - 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index c187e3eb7..9d7db1959 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -856,7 +856,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } ui->respondComboBox->addItem("CQ: None"); ui->respondComboBox->addItem("CQ: First"); - ui->respondComboBox->addItem("CQ: Max Pts"); + ui->respondComboBox->addItem("CQ: Max Dist"); m_dateTimeRcvdRR73=QDateTime::currentDateTimeUtc(); m_dateTimeSentTx3=QDateTime::currentDateTimeUtc(); @@ -1024,9 +1024,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } ui->pbBestSP->setVisible(m_mode=="FT4"); - int n=ui->respondComboBox->currentIndex(); - if(m_config.special_op_id()!=SpecOp::ARRL_DIGI and n>1) n=0; - ui->respondComboBox->setCurrentIndex(n); // this must be the last statement of constructor if (!m_valid) throw std::runtime_error {"Fatal initialization exception"}; @@ -1919,9 +1916,6 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog MessageBox::information_message (this, "Fox-and-Hound operation is available only in FT8 mode.\nGo back and change your selection."); } - int n=ui->respondComboBox->currentIndex(); - if(m_config.special_op_id()!=SpecOp::ARRL_DIGI and n>1) n=1; - ui->respondComboBox->setCurrentIndex(n); } } @@ -3708,7 +3702,7 @@ void MainWindow::readFromStdout() //readFromStdout processMessage (decodedtext); } - if(ui->respondComboBox->currentText()=="CQ: Max Pts") { + if(ui->respondComboBox->currentText()=="CQ: Max Dist") { QString deCall; QString deGrid; decodedtext.deCallAndGrid(/*out*/deCall,deGrid); @@ -8766,14 +8760,6 @@ void MainWindow::on_cbCQonly_toggled(bool) decodeBusy(true); } -void MainWindow::on_respondComboBox_currentIndexChanged (int n) -{ - if(m_config.special_op_id()!=SpecOp::ARRL_DIGI and n==2) { - ui->respondComboBox->setCurrentIndex(1); - MessageBox::warning_message (this, tr ("\"CQ: Max Pts\" is available only\n in ARRL DIGI contest mode."));\ - } -} - void MainWindow::on_cbAutoSeq_toggled(bool b) { ui->respondComboBox->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4" diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 0ce0bc33f..d1c94984d 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -325,7 +325,6 @@ private slots: void chk_FST4_freq_range(); void on_pbFoxReset_clicked(); void on_comboBoxHoundSort_activated (int index); - void on_respondComboBox_currentIndexChanged(int index); void not_GA_warning_message (); void checkMSK144ContestType(); void on_pbBestSP_clicked(); From bc92cd54f3dee2de40fa713c6bd7a42b0103ee7b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 14:06:46 -0400 Subject: [PATCH 040/105] Fix the connect() statement in ActiveStations. --- widgets/activeStations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 4d7700322..13cb5ee06 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -22,7 +22,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget changeFont (font); read_settings (); ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts Bands"); - connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select); + connect(ui->RecentStationsPlainTextEdit, SIGNAL(selectionChanged()), this, SLOT(select())); } ActiveStations::~ActiveStations() From fd7caa8cd63b25796f532e5bbdbf215507b5b408 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 14:29:52 -0400 Subject: [PATCH 041/105] Fix the setting of TxFirst after click on ActiveStations window. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 9d7db1959..5d4ec5f82 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3491,7 +3491,7 @@ void MainWindow::callSandP2(int n) genStdMsgs(w[3]); //### real SNR would be better here? ui->RxFreqSpinBox->setValue(w[4].toInt()); setTxMsg(1); - m_txFirst = (w[2]=="0"); + m_txFirst = (w[5]=="0"); ui->txFirstCheckBox->setChecked(m_txFirst); if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx if(m_transmitting) m_restart=true; From ab48d77d0fd2b4c61d14b83374f7a00044e90a7f Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 16:05:30 -0400 Subject: [PATCH 042/105] Display calls in ActiveStations only when they are "ready to call". Erase on band change. --- widgets/activeStations.cpp | 5 +++++ widgets/activeStations.h | 1 + widgets/mainwindow.cpp | 34 ++++++++++++++++++++-------------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 13cb5ee06..477e375bc 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -83,3 +83,8 @@ void ActiveStations::setClickOK(bool b) { m_clickOK=b; } + +void ActiveStations::erase() +{ + ui->RecentStationsPlainTextEdit->clear(); +} diff --git a/widgets/activeStations.h b/widgets/activeStations.h index b5c7d0e63..76301a0cc 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -24,6 +24,7 @@ public: int maxRecent(); int maxAge(); void setClickOK(bool b); + void erase(); Q_SLOT void select(); bool m_clickOK=false; diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 5d4ec5f82..e08630dd4 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3373,7 +3373,6 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) ActiveCall ac; RecentCall rc; - if(deGrid.contains(grid_regexp)) { if(!m_activeCall.contains(deCall) or deGrid!=m_activeCall.value(deCall).grid4) { // Transmitting station's call is not already in QMap "m_activeCall", or grid has changed. @@ -3444,19 +3443,21 @@ void MainWindow::ARRL_Digi_Display() if(age>maxAge) { icall.remove(); } else { - i++; - int az=m_activeCall[deCall].az; - deGrid=m_activeCall[deCall].grid4; - points=m_activeCall[deCall].points; - bands=m_activeCall[deCall].bands; - if(points>maxPoints) maxPoints=points; - float x=float(age)/(maxAge+1); - if(x>1.0) x=0; - pts[i-1]=points - x; - QString t1; - t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); - t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; - list.append(t1); + if(m_recentCall.value(deCall).ready2call) { + i++; + int az=m_activeCall[deCall].az; + deGrid=m_activeCall[deCall].grid4; + points=m_activeCall[deCall].points; + bands=m_activeCall[deCall].bands; + if(points>maxPoints) maxPoints=points; + float x=float(age)/(maxAge+1); + if(x>1.0) x=0; + pts[i-1]=points - x; + QString t1; + t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); + t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; + list.append(t1); + } } } if(i==0) return; @@ -7465,6 +7466,11 @@ void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const& if (m_lastDialFreq != m_freqNominal && (m_mode != "MSK144" || !(ui->cbCQTx->isEnabled () && ui->cbCQTx->isVisible () && ui->cbCQTx->isChecked()))) { + if(m_lastDialFreq != m_freqNominal and m_ActiveStationsWidget->isVisible()) { + m_recentCall.clear(); + m_ActiveStationsWidget->erase(); + } + m_lastDialFreq = m_freqNominal; m_secBandChanged=QDateTime::currentMSecsSinceEpoch()/1000; pskSetLocal (); From f6c608b22784ba5ea581f8250ab45170958d884a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 16:15:51 -0400 Subject: [PATCH 043/105] Don't try to erase if widget was not started! --- widgets/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index e08630dd4..3fc17b918 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -7466,7 +7466,8 @@ void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const& if (m_lastDialFreq != m_freqNominal && (m_mode != "MSK144" || !(ui->cbCQTx->isEnabled () && ui->cbCQTx->isVisible () && ui->cbCQTx->isChecked()))) { - if(m_lastDialFreq != m_freqNominal and m_ActiveStationsWidget->isVisible()) { + + if(m_lastDialFreq != m_freqNominal and m_ActiveStationsWidget != NULL) { m_recentCall.clear(); m_ActiveStationsWidget->erase(); } From db33624da187f794c448485c0d07fb7961d5c278 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 16:37:19 -0400 Subject: [PATCH 044/105] Erase ActiveStations window when decoding starts. --- widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3fc17b918..90c484404 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3257,6 +3257,7 @@ void MainWindow::decode() //decode() decodeBusy(true); } } + if((m_mode=="FT4" or m_mode=="FT8") and m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase(); } void::MainWindow::fast_decode_done() From 304a04328a34da5ae3927e9d61382025f58bc2a2 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 16:53:13 -0400 Subject: [PATCH 045/105] Erase ActiveStations only once per Rx sequence. --- widgets/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 90c484404..1a7688850 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3257,7 +3257,9 @@ void MainWindow::decode() //decode() decodeBusy(true); } } - if((m_mode=="FT4" or m_mode=="FT8") and m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase(); + qDebug() << "aa" << m_ihsym; + if((m_mode=="FT4" or (m_mode=="FT8" and m_ihsym==41) or m_diskData) and + m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase(); } void::MainWindow::fast_decode_done() From 6ca1b14477bdbba46fb0129c7895e68512cd27c1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 16:54:09 -0400 Subject: [PATCH 046/105] Remove a diagnostic print. --- widgets/mainwindow.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 1a7688850..232cd8fec 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3257,7 +3257,6 @@ void MainWindow::decode() //decode() decodeBusy(true); } } - qDebug() << "aa" << m_ihsym; if((m_mode=="FT4" or (m_mode=="FT8" and m_ihsym==41) or m_diskData) and m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase(); } From 653ea56a7711fbd7d65be438b2e47ca95371aa06 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 19 Mar 2022 19:42:29 -0400 Subject: [PATCH 047/105] Display all current calls with grids. Add asterisk for those ready to call. --- widgets/activeStations.cpp | 2 +- widgets/mainwindow.cpp | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 477e375bc..41d42d86a 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -21,7 +21,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts Bands"); + ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts Bands"); connect(ui->RecentStationsPlainTextEdit, SIGNAL(selectionChanged()), this, SLOT(select())); } diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 232cd8fec..d3abd4bcb 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3445,21 +3445,21 @@ void MainWindow::ARRL_Digi_Display() if(age>maxAge) { icall.remove(); } else { - if(m_recentCall.value(deCall).ready2call) { - i++; - int az=m_activeCall[deCall].az; - deGrid=m_activeCall[deCall].grid4; - points=m_activeCall[deCall].points; - bands=m_activeCall[deCall].bands; - if(points>maxPoints) maxPoints=points; - float x=float(age)/(maxAge+1); - if(x>1.0) x=0; - pts[i-1]=points - x; - QString t1; - t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); - t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; - list.append(t1); - } + i++; + int az=m_activeCall[deCall].az; + deGrid=m_activeCall[deCall].grid4; + points=m_activeCall[deCall].points; + bands=m_activeCall[deCall].bands; + if(points>maxPoints) maxPoints=points; + float x=float(age)/(maxAge+1); + if(x>1.0) x=0; + pts[i-1]=points - x; + QString t0=" "; + if(m_recentCall.value(deCall).ready2call) t0="* "; + QString t1; + t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); + t1 = t0 + (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; + list.append(t1); } } if(i==0) return; From 07ab7de018ba6ed56fb43177da71643ed644e889 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 20 Mar 2022 08:59:58 -0400 Subject: [PATCH 048/105] Fix the handling of ActiveStation line with pre-pended asterisk. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index d3abd4bcb..39ad686e7 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3485,7 +3485,7 @@ void MainWindow::ARRL_Digi_Display() void MainWindow::callSandP2(int n) { if(m_ready2call[n]=="") return; - QStringList w=m_ready2call[n].split(' ', SkipEmptyParts); + QStringList w=m_ready2call[n].mid(2,-1).split(' ', SkipEmptyParts); m_deCall=w[0]; m_deGrid=w[1]; m_bDoubleClicked=true; //### needed? From aceac2ccb5581e7a7dffb936515e6d8b68989385 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 20 Mar 2022 09:11:52 -0400 Subject: [PATCH 049/105] Insert asterisk only if age==0. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 39ad686e7..3cda280c6 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3455,7 +3455,7 @@ void MainWindow::ARRL_Digi_Display() if(x>1.0) x=0; pts[i-1]=points - x; QString t0=" "; - if(m_recentCall.value(deCall).ready2call) t0="* "; + if(age==0 and m_recentCall.value(deCall).ready2call) t0="* "; QString t1; t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); t1 = t0 + (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; From edd7fadd5ab98f02ac8acfcbbd58e7cb1360455d Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sun, 20 Mar 2022 18:30:55 +0100 Subject: [PATCH 050/105] Some changes to the mode buttons. --- widgets/mainwindow.ui | 54 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 310fb6092..6745f474a 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 957 - 658 + 893 + 662 @@ -2867,9 +2867,15 @@ QLabel[oob="true"] { - + 32 + 0 + + + + + 16777215 16777215 @@ -2886,9 +2892,15 @@ QLabel[oob="true"] { - + 32 + 0 + + + + + 16777215 16777215 @@ -2902,9 +2914,15 @@ QLabel[oob="true"] { - + 32 + 0 + + + + + 16777215 16777215 @@ -2918,9 +2936,15 @@ QLabel[oob="true"] { - + 32 + 0 + + + + + 16777215 16777215 @@ -2934,9 +2958,15 @@ QLabel[oob="true"] { - + 32 + 0 + + + + + 16777215 16777215 @@ -2950,9 +2980,15 @@ QLabel[oob="true"] { - + 32 + 0 + + + + + 16777215 16777215 @@ -2978,7 +3014,7 @@ QLabel[oob="true"] { 0 0 - 957 + 893 21 From aa9cc8e885f3dc115c23f3514bff86aed668b5d3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 20 Mar 2022 14:16:20 -0400 Subject: [PATCH 051/105] Move asterisk; add "Ready on;y" checkbox; some code cleanup. --- widgets/activeStations.cpp | 7 +++- widgets/activeStations.h | 1 + widgets/activeStations.ui | 77 +++++++++++++++++++++----------------- widgets/mainwindow.cpp | 33 ++++++++-------- 4 files changed, 67 insertions(+), 51 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 41d42d86a..53cd109fd 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -21,7 +21,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts Bands"); + ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts Bands"); connect(ui->RecentStationsPlainTextEdit, SIGNAL(selectionChanged()), this, SLOT(select())); } @@ -88,3 +88,8 @@ void ActiveStations::erase() { ui->RecentStationsPlainTextEdit->clear(); } + +bool ActiveStations::readyOnly() +{ + return ui->cbReadyOnly->isChecked(); +} diff --git a/widgets/activeStations.h b/widgets/activeStations.h index 76301a0cc..0ff989ac9 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -25,6 +25,7 @@ public: int maxAge(); void setClickOK(bool b); void erase(); + bool readyOnly(); Q_SLOT void select(); bool m_clickOK=false; diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index 563a3898f..980503f7c 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -18,6 +18,44 @@ + + + + + 0 + 0 + + + + + 100 + 0 + + + + Max N + + + 50 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -46,44 +84,13 @@ - - - - - 0 - 0 - - - - - 100 - 0 - - - - Max Recent - - - 50 - - - 10 + + + + Ready only - - - - Qt::Horizontal - - - - 40 - 20 - - - - diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3cda280c6..4f10a3319 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3445,21 +3445,24 @@ void MainWindow::ARRL_Digi_Display() if(age>maxAge) { icall.remove(); } else { - i++; - int az=m_activeCall[deCall].az; - deGrid=m_activeCall[deCall].grid4; - points=m_activeCall[deCall].points; - bands=m_activeCall[deCall].bands; - if(points>maxPoints) maxPoints=points; - float x=float(age)/(maxAge+1); - if(x>1.0) x=0; - pts[i-1]=points - x; - QString t0=" "; - if(age==0 and m_recentCall.value(deCall).ready2call) t0="* "; - QString t1; - t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); - t1 = t0 + (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; - list.append(t1); + bool bReady=false; + if(age==0 and m_recentCall.value(deCall).ready2call) bReady=true; + if(bReady or !m_ActiveStationsWidget->readyOnly()) { + i++; + int az=m_activeCall[deCall].az; + deGrid=m_activeCall[deCall].grid4; + points=m_activeCall[deCall].points; + bands=m_activeCall[deCall].bands; + if(points>maxPoints) maxPoints=points; + float x=float(age)/(maxAge+1); + if(x>1.0) x=0; + pts[i-1]=points - x; + QString t1; + if(!bReady) t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); + if(bReady) t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d*%4d",az,snr,freq,itx,age,points); + t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; + list.append(t1); + } } } if(i==0) return; From ae217cb2d98b461736604afb7ccc60f6265a1e6a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 20 Mar 2022 14:25:23 -0400 Subject: [PATCH 052/105] Fix the extraction-of-callsign error caused by movinf asterisk. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 4f10a3319..f1ed23592 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3488,7 +3488,7 @@ void MainWindow::ARRL_Digi_Display() void MainWindow::callSandP2(int n) { if(m_ready2call[n]=="") return; - QStringList w=m_ready2call[n].mid(2,-1).split(' ', SkipEmptyParts); + QStringList w=m_ready2call[n].split(' ', SkipEmptyParts); m_deCall=w[0]; m_deGrid=w[1]; m_bDoubleClicked=true; //### needed? From d6208b43e240c492bd0b2bd93ebd4dbcb8156cfc Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 21 Mar 2022 15:43:58 -0400 Subject: [PATCH 053/105] Several cleanups and fixes for ActiveStations features. --- widgets/mainwindow.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f1ed23592..3f781c952 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2032,7 +2032,6 @@ void MainWindow::keyPressEvent (QKeyEvent * e) } return; case Qt::Key_C: -// if(m_mode=="FT4" && e->modifiers() & Qt::AltModifier) { if(e->modifiers() & Qt::AltModifier) { int n=ui->respondComboBox->currentIndex()+1; if(n>2) n=0; @@ -3711,8 +3710,11 @@ void MainWindow::readFromStdout() //readFromStdout if(ui->respondComboBox->currentText()=="CQ: Max Dist") { QString deCall; QString deGrid; + bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or + m_config.special_op_id()==SpecOp::ARRL_DIGI; decodedtext.deCallAndGrid(/*out*/deCall,deGrid); - if(deGrid!="") { + if(deGrid.contains(grid_regexp) or + (bContest and (deGrid.contains("+") or deGrid.contains("-")))) { double utch=0.0; int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()), @@ -3726,8 +3728,10 @@ void MainWindow::readFromStdout() //readFromStdout m_bDoubleClicked=true; ui->dxCallEntry->setText(deCall); ui->dxGridEntry->setText(deGrid); - genStdMsgs("-10"); - setTxMsg(3); + genStdMsgs(QString::number(decodedtext.snr())); + int ntx=2; + if(bContest) ntx=3; + setTxMsg(ntx); } } } @@ -4673,7 +4677,8 @@ void MainWindow::startTx2() t=ui->tx6->text(); if(t.mid(0,1)=="#") snr=t.mid(1,5).toDouble(); if(snr>0.0 or snr < -50.0) snr=99.0; - if((m_ntx==6 or m_ntx==7) and m_config.force_call_1st()) { + if((m_ntx==6 or m_ntx==7) and m_config.force_call_1st() and + ui->respondComboBox->currentIndex()==0) { ui->cbAutoSeq->setChecked(true); ui->respondComboBox->setCurrentIndex(1); } @@ -6293,7 +6298,6 @@ void MainWindow::displayWidgets(qint64 n) if(i==25) ui->actionEnable_AP_JT65->setVisible (b); if(i==26) ui->actionEnable_AP_DXcall->setVisible (b); if(i==27) ui->respondComboBox->setVisible(b); - // if(i==28) ui->labNextCall->setVisible(b); if(i==29) ui->measure_check_box->setVisible(b); if(i==30) ui->labDXped->setVisible(b); if(i==31) ui->cbRxAll->setVisible(b); From f47596b2ebb4941a55df16e46e78512b7269eafc Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 21 Mar 2022 15:52:25 -0400 Subject: [PATCH 054/105] Make the "Ready only" box sticky on program restart. --- widgets/activeStations.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 53cd109fd..d17a30c7d 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -43,6 +43,7 @@ void ActiveStations::read_settings () restoreGeometry (settings_->value ("window/geometry").toByteArray ()); ui->sbMaxRecent->setValue(settings_->value("MaxRecent",10).toInt()); ui->sbMaxAge->setValue(settings_->value("MaxAge",10).toInt()); + ui->cbReadyOnly->setChecked(settings_->value("ReadyOnly",false).toBool()); } void ActiveStations::write_settings () @@ -51,6 +52,7 @@ void ActiveStations::write_settings () settings_->setValue ("window/geometry", saveGeometry ()); settings_->setValue("MaxRecent",ui->sbMaxRecent->value()); settings_->setValue("MaxAge",ui->sbMaxAge->value()); + settings_->setValue("ReadyOnly",ui->cbReadyOnly->isChecked()); } void ActiveStations::displayRecentStations(QString const& t) From f3ee013e43b108b712257b4dcf1e00c1a4503990 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 22 Mar 2022 11:22:56 -0400 Subject: [PATCH 055/105] Working toward display of points in left decode window. --- widgets/displaytext.cpp | 13 ++++++++++++- widgets/displaytext.h | 2 ++ widgets/mainwindow.cpp | 16 +++++++++++----- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index c3e31f83c..f13b4ba58 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -372,11 +372,17 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons } m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight); + if(m_npts == -1) return message; return leftJustifyAppendage (message, extra); } -QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage) const +QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage0) const { + QString appendage=appendage0; + if(m_npts>0) { + appendage=" " + QString::number(m_npts); + if(m_npts<10) appendage=" " + appendage; + } if (appendage.size ()) { // allow for seconds @@ -660,3 +666,8 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg, } setCurrentCharFormat (old_format); } + +void DisplayText::displayPoints(int npts) +{ + m_npts=npts; +} diff --git a/widgets/displaytext.h b/widgets/displaytext.h index 773901cea..bdc71dcd9 100644 --- a/widgets/displaytext.h +++ b/widgets/displaytext.h @@ -35,7 +35,9 @@ public: void displayQSY(QString text); void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {}); void new_period (); + void displayPoints(int npts); QString CQPriority(){return m_CQPriority;}; + qint32 m_npts; Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers); Q_SIGNAL void erased (); diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3f781c952..f1269f9a0 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3417,6 +3417,9 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; rc.decodeTime=m_latestDecodeTime; m_recentCall[deCall]=rc; + + int points=m_activeCall.value(deCall).points; + ui->decodedTextBrowser->displayPoints(points); } } @@ -3639,6 +3642,14 @@ void MainWindow::readFromStdout() //readFromStdout } } else { DecodedText decodedtext1=decodedtext0; + ui->decodedTextBrowser->displayPoints(-99); + bool bDisplayPoints=m_config.special_op_id()==SpecOp::ARRL_DIGI; + bDisplayPoints=true; + if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints + and decodedtext1.isStandardMessage()) { + ui->decodedTextBrowser->displayPoints(-1); + ARRL_Digi_Update(decodedtext1); + } ui->decodedTextBrowser->displayDecodedText (decodedtext1, m_config.my_callsign (), m_mode, m_config.DXCC (), m_logBook, m_currentBand, m_config.ppfx (), ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(), @@ -3673,11 +3684,6 @@ void MainWindow::readFromStdout() //readFromStdout } } } - - if((m_mode=="FT4" or m_mode=="FT8") /* and SpecOp::ARRL_DIGI==m_config.special_op_id() */ - and decodedtext.isStandardMessage()) { - ARRL_Digi_Update(decodedtext); - } } //Right (Rx Frequency) window From ffe8927a30046e945f616fa1e53c6e2ebab6db0c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 22 Mar 2022 12:41:08 -0400 Subject: [PATCH 056/105] Cleanup of "workedB4" interaction with ActiveStations. --- widgets/displaytext.cpp | 19 +++++++++---------- widgets/displaytext.h | 6 +++--- widgets/mainwindow.cpp | 20 ++++++++------------ widgets/mainwindow.h | 1 + 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index f13b4ba58..7c90f4c2e 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -277,6 +277,8 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons gridB4onBand=true; } + if(callB4onBand) m_points=0; + message = message.trimmed (); highlight_types types; @@ -372,16 +374,16 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons } m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight); - if(m_npts == -1) return message; + if((m_points == 00) or (m_points == -1)) return message; return leftJustifyAppendage (message, extra); } QString DisplayText::leftJustifyAppendage (QString message, QString const& appendage0) const { QString appendage=appendage0; - if(m_npts>0) { - appendage=" " + QString::number(m_npts); - if(m_npts<10) appendage=" " + appendage; + if(m_bDisplayPoints and (m_points>0)) { + appendage=" " + QString::number(m_points); + if(m_points<10) appendage=" " + appendage; } if (appendage.size ()) { @@ -404,8 +406,10 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con QString const& mode, bool displayDXCCEntity, LogBook const& logBook, QString const& currentBand, bool ppfx, bool bCQonly, - bool haveFSpread, float fSpread) + bool haveFSpread, float fSpread, bool bDisplayPoints, int points) { + m_points=points; + m_bDisplayPoints=bDisplayPoints; m_bPrincipalPrefix=ppfx; QColor bg; QColor fg; @@ -666,8 +670,3 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg, } setCurrentCharFormat (old_format); } - -void DisplayText::displayPoints(int npts) -{ - m_npts=npts; -} diff --git a/widgets/displaytext.h b/widgets/displaytext.h index bdc71dcd9..5810972cd 100644 --- a/widgets/displaytext.h +++ b/widgets/displaytext.h @@ -30,14 +30,14 @@ public: void displayDecodedText(DecodedText const& decodedText, QString const& myCall, QString const& mode, bool displayDXCCEntity, LogBook const& logBook, QString const& currentBand=QString {}, bool ppfx=false, bool bCQonly=false, - bool haveFSpread = false, float fSpread = 0.); + bool haveFSpread = false, float fSpread = 0.0, bool bDisplayPoints=false, int points=-99); void displayTransmittedText(QString text, QString modeTx, qint32 txFreq, bool bFastMode, double TRperiod); void displayQSY(QString text); void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {}); void new_period (); - void displayPoints(int npts); QString CQPriority(){return m_CQPriority;}; - qint32 m_npts; + qint32 m_points; + bool m_bDisplayPoints; Q_SIGNAL void selectCallsign (Qt::KeyboardModifiers); Q_SIGNAL void erased (); diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f1269f9a0..ef534f2a5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1502,8 +1502,8 @@ void MainWindow::dataSink(qint64 frames) freqcal_(&dec_data.d2[0], &k, &nkhz, &RxFreq, &ftol, &line[0], (FCL)80); QString t=QString::fromLatin1(line); DecodedText decodedtext {t}; - ui->decodedTextBrowser->displayDecodedText (decodedtext, m_config.my_callsign (), m_mode, m_config.DXCC (), - m_logBook, m_currentBand, m_config.ppfx ()); + ui->decodedTextBrowser->displayDecodedText (decodedtext, m_config.my_callsign(), + m_mode, m_config.DXCC(), m_logBook, m_currentBand, m_config.ppfx()); if (ui->measure_check_box->isChecked ()) { // Append results text to file "fmt.all". QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")}; @@ -3393,7 +3393,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) } } - + m_points=-1; if(m_activeCall.contains(deCall)) { // Don't display stations we already worked on this band. @@ -3417,9 +3417,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(bCQ or deGrid=="RR73" or deGrid=="73") rc.ready2call=true; rc.decodeTime=m_latestDecodeTime; m_recentCall[deCall]=rc; - - int points=m_activeCall.value(deCall).points; - ui->decodedTextBrowser->displayPoints(points); + m_points=m_activeCall.value(deCall).points; } } @@ -3630,6 +3628,8 @@ void MainWindow::readFromStdout() //readFromStdout } } + QFile f(m_appDir + "/DisplayPoints"); + bool bDisplayPoints = f.exists() or m_config.special_op_id()==SpecOp::ARRL_DIGI; //Left (Band activity) window if(!bAvgMsg) { if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id()) { @@ -3642,18 +3642,14 @@ void MainWindow::readFromStdout() //readFromStdout } } else { DecodedText decodedtext1=decodedtext0; - ui->decodedTextBrowser->displayPoints(-99); - bool bDisplayPoints=m_config.special_op_id()==SpecOp::ARRL_DIGI; - bDisplayPoints=true; if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints and decodedtext1.isStandardMessage()) { - ui->decodedTextBrowser->displayPoints(-1); ARRL_Digi_Update(decodedtext1); } ui->decodedTextBrowser->displayDecodedText (decodedtext1, m_config.my_callsign (), m_mode, m_config.DXCC (), m_logBook, m_currentBand, m_config.ppfx (), ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(), - haveFSpread, fSpread); + haveFSpread, fSpread, bDisplayPoints, m_points); if (m_config.highlight_DXcall () && (m_hisCall!="") && ((decodedtext.string().contains(QRegularExpression {"(\\w+) " + m_hisCall})) || (decodedtext.string().contains(QRegularExpression {"(\\w+) <" + m_hisCall +">"})) @@ -3757,7 +3753,7 @@ void MainWindow::readFromStdout() //readFromStdout // or contains MyCall if(!m_bBestSPArmed or m_mode!="FT4") { ui->decodedTextBrowser2->displayDecodedText (decodedtext0, m_config.my_callsign (), m_mode, m_config.DXCC (), - m_logBook, m_currentBand, m_config.ppfx ()); + m_logBook, m_currentBand, m_config.ppfx (), false, false, 0.0, bDisplayPoints, m_points); } m_QSOText = decodedtext.string ().trimmed (); } diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index d1c94984d..da190679b 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -494,6 +494,7 @@ private: qint32 m_nDecodes=0; qint32 m_maxPoints=-1; qint32 m_latestDecodeTime=-1; + qint32 m_points=-99; bool m_btxok; //True if OK to transmit bool m_diskData; From be2ce2a6c4df6da09c8f6a36c5f1460a106a1524 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 22 Mar 2022 13:03:51 -0400 Subject: [PATCH 057/105] Remove stray 'a7' flags from decodes when displaying points. --- widgets/mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index ef534f2a5..de838adc2 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3519,12 +3519,15 @@ void MainWindow::activeWorked(QString call, QString band) void MainWindow::readFromStdout() //readFromStdout { + QFile f(m_appDir + "/DisplayPoints"); + bool bDisplayPoints = f.exists() or m_config.special_op_id()==SpecOp::ARRL_DIGI; while(proc_jt9.canReadLine()) { auto line_read = proc_jt9.readLine (); if (auto p = std::strpbrk (line_read.constData (), "\n\r")) { // truncate before line ending chars line_read = line_read.left (p - line_read.constData ()); } + if(bDisplayPoints) line_read=line_read.replace("a7"," "); bool haveFSpread {false}; float fSpread {0.}; if (m_mode.startsWith ("FST4")) @@ -3628,8 +3631,6 @@ void MainWindow::readFromStdout() //readFromStdout } } - QFile f(m_appDir + "/DisplayPoints"); - bool bDisplayPoints = f.exists() or m_config.special_op_id()==SpecOp::ARRL_DIGI; //Left (Band activity) window if(!bAvgMsg) { if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id()) { From 190dca5501c006e06359d3ac6606d906ee3b0068 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 22 Mar 2022 13:27:24 -0400 Subject: [PATCH 058/105] Do not display the "........" bands indicators. --- widgets/activeStations.cpp | 2 +- widgets/mainwindow.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index d17a30c7d..a001e646f 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -21,7 +21,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget ui->RecentStationsPlainTextEdit->setReadOnly (true); changeFont (font); read_settings (); - ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts Bands"); + ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts"); connect(ui->RecentStationsPlainTextEdit, SIGNAL(selectionChanged()), this, SLOT(select())); } diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index de838adc2..3b836cd25 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3386,7 +3386,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); int npts=int((500+nDkm)/500); ac.grid4=deGrid; - ac.bands="......."; +// ac.bands="......."; ac.az=nAz; ac.points=npts; m_activeCall[deCall]=ac; @@ -3395,7 +3395,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_points=-1; if(m_activeCall.contains(deCall)) { - +/* // Don't display stations we already worked on this band. QString band=m_config.bands()->find(m_freqNominal); if(band=="160m" and m_activeCall[deCall].bands.indexOf("a")>=0) {m_recentCall.remove(deCall); return;} @@ -3405,7 +3405,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(band=="15m" and m_activeCall[deCall].bands.indexOf("e")>=0) {m_recentCall.remove(deCall); return;} if(band=="10m" and m_activeCall[deCall].bands.indexOf("f")>=0) {m_recentCall.remove(deCall); return;} if(band=="6m" and m_activeCall[deCall].bands.indexOf("g")>=0) {m_recentCall.remove(deCall); return;} - +*/ // Update the variable data for this deCall rc.dialFreq=m_freqNominal; rc.audioFreq=dt.frequencyOffset(); @@ -3424,7 +3424,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) void MainWindow::ARRL_Digi_Display() { QMutableMapIterator icall(m_recentCall); - QString deCall,deGrid,bands; + QString deCall,deGrid; int age=0; int i=0; int maxAge=m_ActiveStationsWidget->maxAge(); @@ -3452,7 +3452,7 @@ void MainWindow::ARRL_Digi_Display() int az=m_activeCall[deCall].az; deGrid=m_activeCall[deCall].grid4; points=m_activeCall[deCall].points; - bands=m_activeCall[deCall].bands; +// bands=m_activeCall[deCall].bands; if(points>maxPoints) maxPoints=points; float x=float(age)/(maxAge+1); if(x>1.0) x=0; @@ -3460,7 +3460,8 @@ void MainWindow::ARRL_Digi_Display() QString t1; if(!bReady) t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); if(bReady) t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d*%4d",az,snr,freq,itx,age,points); - t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; +// t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1 + " " + bands; + t1 = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t1; list.append(t1); } } From 4957face2fd5ad421641e71b9f076413868d7881 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 22 Mar 2022 14:35:42 -0400 Subject: [PATCH 059/105] Display points if in FT4 or FT8 and ActiveStations is visible. --- widgets/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3b836cd25..61666fd6a 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3520,8 +3520,8 @@ void MainWindow::activeWorked(QString call, QString band) void MainWindow::readFromStdout() //readFromStdout { - QFile f(m_appDir + "/DisplayPoints"); - bool bDisplayPoints = f.exists() or m_config.special_op_id()==SpecOp::ARRL_DIGI; + bool bDisplayPoints = (m_mode=="FT4" or m_mode=="FT8") and + (m_config.special_op_id()==SpecOp::ARRL_DIGI or m_ActiveStationsWidget->isVisible()); while(proc_jt9.canReadLine()) { auto line_read = proc_jt9.readLine (); if (auto p = std::strpbrk (line_read.constData (), "\n\r")) { From 1cee98162a76fe996b22e78df8c1b9239d720dcd Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 23 Mar 2022 15:39:32 -0400 Subject: [PATCH 060/105] Test the ActiveStations pointer before using it. Add some Tool Tips. --- widgets/activeStations.ui | 96 +++++++++++++++++++++++---------------- widgets/mainwindow.cpp | 5 +- 2 files changed, 60 insertions(+), 41 deletions(-) diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index 980503f7c..a8f85b359 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -6,7 +6,7 @@ 0 0 - 405 + 466 339 @@ -18,44 +18,6 @@ - - - - - 0 - 0 - - - - - 100 - 0 - - - - Max N - - - 50 - - - 10 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -66,10 +28,13 @@ - 100 + 80 0 + + <html><head/><body><p>Set maximum elapsed number of T/R sequences for decodes included in the list.</p></body></html> + Max Age @@ -84,13 +49,64 @@ + + + + + 0 + 0 + + + + + 80 + 0 + + + + <html><head/><body><p>Set maximum number of displayed lines.</p></body></html> + + + Max N + + + 50 + + + 10 + + + + + <html><head/><body><p>Check to list only stations immediately ready to be called.</p></body></html> + Ready only + + + + Rate: + + + + + + + + 50 + 16777215 + + + + <html><head/><body><p>Rate of score increase, points per hour.</p></body></html> + + + diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 61666fd6a..a9133d839 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3520,8 +3520,11 @@ void MainWindow::activeWorked(QString call, QString band) void MainWindow::readFromStdout() //readFromStdout { - bool bDisplayPoints = (m_mode=="FT4" or m_mode=="FT8") and + bool bDisplayPoints = false; + if(m_ActiveStationsWidget!=NULL) { + bDisplayPoints=(m_mode=="FT4" or m_mode=="FT8") and (m_config.special_op_id()==SpecOp::ARRL_DIGI or m_ActiveStationsWidget->isVisible()); + } while(proc_jt9.canReadLine()) { auto line_read = proc_jt9.readLine (); if (auto p = std::strpbrk (line_read.constData (), "\n\r")) { From c5b6a6ae45765bc94e74fe67189be38a38e35a8a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 23 Mar 2022 16:12:12 -0400 Subject: [PATCH 061/105] Don't display stations already worked on current band. --- widgets/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a9133d839..93b05e892 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3386,7 +3386,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); int npts=int((500+nDkm)/500); ac.grid4=deGrid; -// ac.bands="......."; + ac.bands="......."; ac.az=nAz; ac.points=npts; m_activeCall[deCall]=ac; @@ -3395,8 +3395,8 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_points=-1; if(m_activeCall.contains(deCall)) { -/* - // Don't display stations we already worked on this band. + +// Don't display stations we already worked on this band. QString band=m_config.bands()->find(m_freqNominal); if(band=="160m" and m_activeCall[deCall].bands.indexOf("a")>=0) {m_recentCall.remove(deCall); return;} if(band=="80m" and m_activeCall[deCall].bands.indexOf("b")>=0) {m_recentCall.remove(deCall); return;} @@ -3405,7 +3405,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) if(band=="15m" and m_activeCall[deCall].bands.indexOf("e")>=0) {m_recentCall.remove(deCall); return;} if(band=="10m" and m_activeCall[deCall].bands.indexOf("f")>=0) {m_recentCall.remove(deCall); return;} if(band=="6m" and m_activeCall[deCall].bands.indexOf("g")>=0) {m_recentCall.remove(deCall); return;} -*/ + // Update the variable data for this deCall rc.dialFreq=m_freqNominal; rc.audioFreq=dt.frequencyOffset(); From 02961a2cccee7296b09c11162675e89a101be677 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 25 Mar 2022 10:11:20 -0400 Subject: [PATCH 062/105] Do not display in ActiveStations calls already worked on current band. --- widgets/mainwindow.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 93b05e892..7331e9b08 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3361,7 +3361,7 @@ void MainWindow::decodeDone () m_bNoMoreFiles=false; } - if((m_mode=="FT4" or m_mode=="FT8") /* and SpecOp::ARRL_DIGI==m_config.special_op_id() */ + if((m_mode=="FT4" or m_mode=="FT8") and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) ARRL_Digi_Display(); // Update the ARRL_DIGI display } @@ -3447,12 +3447,23 @@ void MainWindow::ARRL_Digi_Display() } else { bool bReady=false; if(age==0 and m_recentCall.value(deCall).ready2call) bReady=true; - if(bReady or !m_ActiveStationsWidget->readyOnly()) { + + QString bands=m_activeCall[deCall].bands; + bool bWorkedOnBand=false; + if(m_currentBand=="160m" and bands.mid(0,1)!=".") bWorkedOnBand=true; + if(m_currentBand=="90m" and bands.mid(1,1)!=".") bWorkedOnBand=true; + if(m_currentBand=="40m" and bands.mid(2,1)!=".") bWorkedOnBand=true; + if(m_currentBand=="20m" and bands.mid(3,1)!=".") bWorkedOnBand=true; + if(m_currentBand=="15m" and bands.mid(4,1)!=".") bWorkedOnBand=true; + if(m_currentBand=="10m" and bands.mid(5,1)!=".") bWorkedOnBand=true; + if(m_currentBand=="6m" and bands.mid(6,1)!=".") bWorkedOnBand=true; + + if((bReady or !m_ActiveStationsWidget->readyOnly()) and !bWorkedOnBand) { i++; int az=m_activeCall[deCall].az; deGrid=m_activeCall[deCall].grid4; points=m_activeCall[deCall].points; -// bands=m_activeCall[deCall].bands; +// qDebug() << "bb" << m_currentBand << deCall << bands; if(points>maxPoints) maxPoints=points; float x=float(age)/(maxAge+1); if(x>1.0) x=0; @@ -3647,14 +3658,20 @@ void MainWindow::readFromStdout() //readFromStdout } } else { DecodedText decodedtext1=decodedtext0; - if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints - and decodedtext1.isStandardMessage()) { + if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints and decodedtext1.isStandardMessage()) { ARRL_Digi_Update(decodedtext1); } ui->decodedTextBrowser->displayDecodedText (decodedtext1, m_config.my_callsign (), m_mode, m_config.DXCC (), m_logBook, m_currentBand, m_config.ppfx (), ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(), haveFSpread, fSpread, bDisplayPoints, m_points); + if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints and decodedtext1.isStandardMessage()) { + QString deCall,deGrid; + decodedtext.deCallAndGrid(/*out*/deCall,deGrid); + bool bWorkedOnBand=(ui->decodedTextBrowser->CQPriority()!="New Call on Band"); + if(bWorkedOnBand) activeWorked(deCall,m_currentBand); +// qDebug() << "aa" << m_currentBand << deCall << bWorkedOnBand << m_activeCall[deCall].bands; + } if (m_config.highlight_DXcall () && (m_hisCall!="") && ((decodedtext.string().contains(QRegularExpression {"(\\w+) " + m_hisCall})) || (decodedtext.string().contains(QRegularExpression {"(\\w+) <" + m_hisCall +">"})) From 3c3c4508395147e34c54bbc3ada31f64522630ad Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 26 Mar 2022 10:42:01 -0400 Subject: [PATCH 063/105] Fix the logic about display of calls already worked on band. Update ActiveStations when cbReadyOnly is toggled. --- widgets/activeStations.cpp | 8 ++++++++ widgets/activeStations.h | 3 +++ widgets/mainwindow.cpp | 14 +++++++++----- widgets/mainwindow.h | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index a001e646f..83f854d6b 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "SettingsGroup.hpp" #include "qt_helpers.hpp" @@ -23,6 +24,7 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget read_settings (); ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts"); connect(ui->RecentStationsPlainTextEdit, SIGNAL(selectionChanged()), this, SLOT(select())); + connect(ui->cbReadyOnly, SIGNAL(toggled(bool)), this, SLOT(on_cbReadyOnly_toggled(bool))); } ActiveStations::~ActiveStations() @@ -95,3 +97,9 @@ bool ActiveStations::readyOnly() { return ui->cbReadyOnly->isChecked(); } + +void ActiveStations::on_cbReadyOnly_toggled(bool b) +{ + m_bReadyOnly=b; + emit activeStationsDisplay(); +} diff --git a/widgets/activeStations.h b/widgets/activeStations.h index 0ff989ac9..8c3b57610 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -29,13 +29,16 @@ public: Q_SLOT void select(); bool m_clickOK=false; + bool m_bReadyOnly; signals: void callSandP(int nline); + void activeStationsDisplay(); private: void read_settings (); void write_settings (); + Q_SLOT void on_cbReadyOnly_toggled(bool b); qint64 m_msec0=0; QSettings * settings_; diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7331e9b08..c9a30c98f 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2768,7 +2768,8 @@ void MainWindow::on_actionActiveStations_triggered() m_ActiveStationsWidget->showNormal(); m_ActiveStationsWidget->raise(); m_ActiveStationsWidget->activateWindow(); - connect(m_ActiveStationsWidget.data (), SIGNAL(callSandP(int)),this,SLOT(callSandP2(int))); + connect(m_ActiveStationsWidget.data(), SIGNAL(callSandP(int)),this,SLOT(callSandP2(int))); + connect(m_ActiveStationsWidget.data(), SIGNAL(activeStationsDisplay()),this,SLOT(ARRL_Digi_Display())); } void MainWindow::on_actionOpen_triggered() //Open File @@ -3451,7 +3452,7 @@ void MainWindow::ARRL_Digi_Display() QString bands=m_activeCall[deCall].bands; bool bWorkedOnBand=false; if(m_currentBand=="160m" and bands.mid(0,1)!=".") bWorkedOnBand=true; - if(m_currentBand=="90m" and bands.mid(1,1)!=".") bWorkedOnBand=true; + if(m_currentBand=="80m" and bands.mid(1,1)!=".") bWorkedOnBand=true; if(m_currentBand=="40m" and bands.mid(2,1)!=".") bWorkedOnBand=true; if(m_currentBand=="20m" and bands.mid(3,1)!=".") bWorkedOnBand=true; if(m_currentBand=="15m" and bands.mid(4,1)!=".") bWorkedOnBand=true; @@ -3518,6 +3519,7 @@ void MainWindow::callSandP2(int n) void MainWindow::activeWorked(QString call, QString band) { QString bands=m_activeCall[call].bands; +// qDebug() << "cc" << band << call << bands; QByteArray ba=bands.toLatin1(); if(band=="160m") ba[0]='a'; if(band=="80m") ba[1]='b'; @@ -3527,6 +3529,7 @@ void MainWindow::activeWorked(QString call, QString band) if(band=="10m") ba[5]='f'; if(band=="6m") ba[6]='g'; m_activeCall[call].bands=QString::fromLatin1(ba); +// qDebug() << "dd" << band << call << m_activeCall[call].bands; } void MainWindow::readFromStdout() //readFromStdout @@ -3668,9 +3671,10 @@ void MainWindow::readFromStdout() //readFromStdout if((m_mode=="FT4" or m_mode=="FT8") and bDisplayPoints and decodedtext1.isStandardMessage()) { QString deCall,deGrid; decodedtext.deCallAndGrid(/*out*/deCall,deGrid); - bool bWorkedOnBand=(ui->decodedTextBrowser->CQPriority()!="New Call on Band"); + bool bWorkedOnBand=(ui->decodedTextBrowser->CQPriority()!="New Call on Band") and ui->decodedTextBrowser->CQPriority()!=""; if(bWorkedOnBand) activeWorked(deCall,m_currentBand); -// qDebug() << "aa" << m_currentBand << deCall << bWorkedOnBand << m_activeCall[deCall].bands; +// qDebug() << "aa" << m_currentBand << deCall << bWorkedOnBand << m_activeCall[deCall].bands +// << ui->decodedTextBrowser->CQPriority(); } if (m_config.highlight_DXcall () && (m_hisCall!="") && ((decodedtext.string().contains(QRegularExpression {"(\\w+) " + m_hisCall})) @@ -7597,7 +7601,7 @@ void MainWindow::transmit (double snr) } if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::ARRL_DIGI==m_config.special_op_id()) { - qDebug() << "dd" << m_maxPoints << m_deCall << m_deGrid; +// qDebug() << "DD" << m_maxPoints << m_deCall << m_deGrid; ui->dxCallEntry->setText(m_deCall); ui->dxGridEntry->setText(m_deGrid); genStdMsgs("-10"); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index da190679b..0b478fdbe 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -816,7 +816,7 @@ private: void to_jt9(qint32 n, qint32 istart, qint32 idone); bool is77BitMode () const; void cease_auto_Tx_after_QSO (); - void ARRL_Digi_Display(); + Q_SLOT void ARRL_Digi_Display(); void ARRL_Digi_Update(DecodedText dt); void activeWorked(QString call, QString band); }; From f43c1e97aea5f8d9cfccfdcb17cd6d32377fd7ef Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 26 Mar 2022 16:15:04 -0400 Subject: [PATCH 064/105] Add labels for Band Changes, Rate, and Score to the ActiveStations window. --- widgets/activeStations.cpp | 15 +++++ widgets/activeStations.h | 3 + widgets/activeStations.ui | 127 +++++++++++++++++++++++++------------ widgets/mainwindow.cpp | 19 ++++-- widgets/mainwindow.h | 1 + 5 files changed, 119 insertions(+), 46 deletions(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 83f854d6b..fc93c6fec 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -103,3 +103,18 @@ void ActiveStations::on_cbReadyOnly_toggled(bool b) m_bReadyOnly=b; emit activeStationsDisplay(); } + +void ActiveStations::setRate(int n) +{ + ui->rate->setText(QString::number(n)); +} + +void ActiveStations::setScore(int n) +{ + ui->score->setText(QString::number(n)); +} + +void ActiveStations::setBandChanges(int n) +{ + ui->bandChanges->setText(QString::number(n)); +} diff --git a/widgets/activeStations.h b/widgets/activeStations.h index 8c3b57610..1897f08d9 100644 --- a/widgets/activeStations.h +++ b/widgets/activeStations.h @@ -26,6 +26,9 @@ public: void setClickOK(bool b); void erase(); bool readyOnly(); + void setRate(int n); + void setBandChanges(int n); + void setScore(int n); Q_SLOT void select(); bool m_clickOK=false; diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index a8f85b359..e12bc5331 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -6,7 +6,7 @@ 0 0 - 466 + 395 339 @@ -18,7 +18,54 @@ - + + + + + 0 + 0 + + + + + 80 + 0 + + + + <html><head/><body><p>Set maximum number of displayed lines.</p></body></html> + + + Max N + + + 50 + + + 10 + + + + + + + + 16777215 + 16777215 + + + + <html><head/><body><p>Rate of score increase, points per hour.</p></body></html> + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + @@ -49,35 +96,37 @@ - - - - - 0 - 0 - + + + + Score: - - - 80 - 0 - - - - <html><head/><body><p>Set maximum number of displayed lines.</p></body></html> - - - Max N - - - 50 - - - 10 + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + + + + Rate: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + <html><head/><body><p>Check to list only stations immediately ready to be called.</p></body></html> @@ -87,23 +136,23 @@ - - + + - Rate: + Band Changes: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - 50 - 16777215 - + + + + 0 - - <html><head/><body><p>Rate of score increase, points per hour.</p></body></html> + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index c9a30c98f..d1ea40863 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3464,7 +3464,6 @@ void MainWindow::ARRL_Digi_Display() int az=m_activeCall[deCall].az; deGrid=m_activeCall[deCall].grid4; points=m_activeCall[deCall].points; -// qDebug() << "bb" << m_currentBand << deCall << bands; if(points>maxPoints) maxPoints=points; float x=float(age)/(maxAge+1); if(x>1.0) x=0; @@ -3519,7 +3518,6 @@ void MainWindow::callSandP2(int n) void MainWindow::activeWorked(QString call, QString band) { QString bands=m_activeCall[call].bands; -// qDebug() << "cc" << band << call << bands; QByteArray ba=bands.toLatin1(); if(band=="160m") ba[0]='a'; if(band=="80m") ba[1]='b'; @@ -3529,7 +3527,6 @@ void MainWindow::activeWorked(QString call, QString band) if(band=="10m") ba[5]='f'; if(band=="6m") ba[6]='g'; m_activeCall[call].bands=QString::fromLatin1(ba); -// qDebug() << "dd" << band << call << m_activeCall[call].bands; } void MainWindow::readFromStdout() //readFromStdout @@ -3673,8 +3670,6 @@ void MainWindow::readFromStdout() //readFromStdout decodedtext.deCallAndGrid(/*out*/deCall,deGrid); bool bWorkedOnBand=(ui->decodedTextBrowser->CQPriority()!="New Call on Band") and ui->decodedTextBrowser->CQPriority()!=""; if(bWorkedOnBand) activeWorked(deCall,m_currentBand); -// qDebug() << "aa" << m_currentBand << deCall << bWorkedOnBand << m_activeCall[deCall].bands -// << ui->decodedTextBrowser->CQPriority(); } if (m_config.highlight_DXcall () && (m_hisCall!="") && ((decodedtext.string().contains(QRegularExpression {"(\\w+) " + m_hisCall})) @@ -6233,6 +6228,8 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, , QString const& exchange_sent, QString const& exchange_rcvd , QString const& propmode, QByteArray const& ADIF) { + static QString lastBand{""}; + static int nBandChanges{0}; QString date = QSO_date_on.toString("yyyyMMdd"); if (!m_logBook.add (call, grid, m_config.bands()->find(dial_freq), mode, ADIF)) { @@ -6265,7 +6262,16 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, ui->sbSerialNumber->setValue(ui->sbSerialNumber->value() + 1); } - activeWorked(call,m_config.bands()->find(dial_freq)); + QString band=m_config.bands()->find(dial_freq); + activeWorked(call,band); + int points=m_activeCall[call].points; + m_score += points; + if(band!=lastBand and lastBand!="") nBandChanges+=1; + lastBand=band; + m_ActiveStationsWidget->setRate(points); + m_ActiveStationsWidget->setScore(m_score); + m_ActiveStationsWidget->setBandChanges(nBandChanges); + m_xSent.clear (); m_xRcvd.clear (); if (m_config.clear_DXcall ()) ui->dxCallEntry->clear (); @@ -7601,7 +7607,6 @@ void MainWindow::transmit (double snr) } if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::ARRL_DIGI==m_config.special_op_id()) { -// qDebug() << "DD" << m_maxPoints << m_deCall << m_deGrid; ui->dxCallEntry->setText(m_deCall); ui->dxGridEntry->setText(m_deGrid); genStdMsgs("-10"); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 0b478fdbe..623bf3d54 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -495,6 +495,7 @@ private: qint32 m_maxPoints=-1; qint32 m_latestDecodeTime=-1; qint32 m_points=-99; + qint32 m_score=0; bool m_btxok; //True if OK to transmit bool m_diskData; From b317ea241b50aeef84cfbc71da436289f3c79225 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 26 Mar 2022 17:27:26 -0400 Subject: [PATCH 065/105] Finish implementing updates to score, rate, and band changes. Needs testing! --- widgets/mainwindow.cpp | 39 ++++++++++++++++++++++++++++----------- widgets/mainwindow.h | 8 ++++++++ 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index d1ea40863..3ecfc6897 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1185,6 +1185,7 @@ void MainWindow::writeSettings() m_settings->setValue ("AutoClearAvg", ui->actionAuto_Clear_Avg->isChecked ()); m_settings->setValue("SplitterState",ui->decodes_splitter->saveState()); m_settings->setValue("Blanker",ui->sbNB->value()); + m_settings->setValue("Score",m_score); { QList coeffs; // suitable for QSettings @@ -1282,6 +1283,7 @@ void MainWindow::readSettings() ui->RoundRobin->setCurrentText(m_settings->value("RoundRobin",tr("Random")).toString()); m_dBm=m_settings->value("dBm",37).toInt(); m_send_RR73=m_settings->value("RR73",false).toBool(); + m_score=m_settings->value("Score",0).toInt(); if(m_send_RR73) { m_send_RR73=false; on_txrb4_doubleClicked(); @@ -6228,8 +6230,6 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, , QString const& exchange_sent, QString const& exchange_rcvd , QString const& propmode, QByteArray const& ADIF) { - static QString lastBand{""}; - static int nBandChanges{0}; QString date = QSO_date_on.toString("yyyyMMdd"); if (!m_logBook.add (call, grid, m_config.bands()->find(dial_freq), mode, ADIF)) { @@ -6262,15 +6262,31 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, ui->sbSerialNumber->setValue(ui->sbSerialNumber->value() + 1); } - QString band=m_config.bands()->find(dial_freq); - activeWorked(call,band); - int points=m_activeCall[call].points; - m_score += points; - if(band!=lastBand and lastBand!="") nBandChanges+=1; - lastBand=band; - m_ActiveStationsWidget->setRate(points); - m_ActiveStationsWidget->setScore(m_score); - m_ActiveStationsWidget->setBandChanges(nBandChanges); + if(m_ActiveStationsWidget!=NULL) { + QString band=m_config.bands()->find(dial_freq); + activeWorked(call,band); + int points=m_activeCall[call].points; + m_score += points; + ARRL_logged al; + al.time=QDateTime::currentDateTimeUtc(); + al.band=band; + al.points=points; + m_arrl_log.append(al); + int iz=m_arrl_log.size(); + int rate=0; + int nbc=0; + + for(int i=iz-1; i>=0; i--) { + double hrDiff = m_arrl_log[i].time.msecsTo(al.time)/3600000.0; + if(hrDiff > 1.0) break; + rate += m_arrl_log[i].points; + if(isetRate(rate); + m_ActiveStationsWidget->setScore(m_score); + m_ActiveStationsWidget->setBandChanges(nbc); + } m_xSent.clear (); m_xRcvd.clear (); @@ -7145,6 +7161,7 @@ void MainWindow::on_reset_cabrillo_log_action_triggered () if(m_config.RTTY_Exchange()!="SCC") ui->sbSerialNumber->setValue(1); m_logBook.contest_log ()->reset (); m_activeCall.clear(); //Erase the QMap of active calls + m_score=0; } } diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 623bf3d54..8aff69d35 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -697,6 +697,14 @@ private: }; QMap m_recentCall; //Key = callsign, value = snr, dialFreq, audioFreq, decodeTime + struct ARRL_logged + { + QDateTime time; + QString band; + qint32 points; + }; + QList m_arrl_log; + QQueue m_houndQueue; //Selected Hounds available for starting a QSO QQueue m_foxQSOinProgress; //QSOs in progress: Fox has sent a report QQueue m_foxRateQueue; From 6414a8624bcdded78af22a7945a383ca4c8524be Mon Sep 17 00:00:00 2001 From: k9an Date: Sat, 26 Mar 2022 18:44:59 -0500 Subject: [PATCH 066/105] Make minimum SNR -24 dB for a7 decodes. --- lib/ft8/ft8_a7.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ft8/ft8_a7.f90 b/lib/ft8/ft8_a7.f90 index 7306c8021..d32c96348 100644 --- a/lib/ft8/ft8_a7.f90 +++ b/lib/ft8/ft8_a7.f90 @@ -364,7 +364,7 @@ subroutine ft8_a7d(dd0,newdat,call_1,call_2,grid4,xdt,f1,xbase,nharderrors,dmin, dmin2=dmm(iloc(1)) xsnr=-24. arg=pbest/xbase/3.0e6-1.0 - if(arg.gt.0.0) xsnr=db(arg)-27.0 + if(arg.gt.0.0) xsnr=max(-24.0,db(arg)-27.0) ! write(41,3041) nharderrors,dmin,dmin2,dmin2/dmin,xsnr,trim(msgbest) !3041 format(i3,2f7.1,f7.2,f7.1,1x,a) if(dmin.gt.100.0 .or. dmin2/dmin.lt.1.3) nharderrors=-1 From 91a39dd0a1b72a7937ea4e032c07f04564feb36b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 27 Mar 2022 09:14:34 -0400 Subject: [PATCH 067/105] Correct the calculation of points. --- widgets/mainwindow.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3ecfc6897..caeb61dd7 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3387,11 +3387,13 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) azdist_(const_cast (m_config.my_grid().left(4).toLatin1().constData()), const_cast (deGrid.left(4).toLatin1().constData()),&utch, &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); - int npts=int((500+nDkm)/500); + int points=nDkm/500; + if(nDkm > 500*points) points += 1; + points += 1; ac.grid4=deGrid; ac.bands="......."; ac.az=nAz; - ac.points=npts; + ac.points=points; m_activeCall[deCall]=ac; } } @@ -3745,9 +3747,11 @@ void MainWindow::readFromStdout() //readFromStdout azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()), const_cast ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch, &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); - int npts=int((500+nDkm)/500); - if(npts>m_maxPoints) { - m_maxPoints=npts; + int points=nDkm/500; + if(nDkm > 500*points) points += 1; + points += 1; + if(points>m_maxPoints) { + m_maxPoints=points; m_deCall=deCall; m_deGrid=deGrid; m_bDoubleClicked=true; From c909eb08457b75f3025d1215f2758f2731db9c6f Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 27 Mar 2022 09:29:16 -0400 Subject: [PATCH 068/105] Display accumulated contest score on first display of ActiveStations window. --- widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index caeb61dd7..89cfb64c2 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2772,6 +2772,7 @@ void MainWindow::on_actionActiveStations_triggered() m_ActiveStationsWidget->activateWindow(); connect(m_ActiveStationsWidget.data(), SIGNAL(callSandP(int)),this,SLOT(callSandP2(int))); connect(m_ActiveStationsWidget.data(), SIGNAL(activeStationsDisplay()),this,SLOT(ARRL_Digi_Display())); + m_ActiveStationsWidget->setScore(m_score); } void MainWindow::on_actionOpen_triggered() //Open File From 2d3914eb2d1fad582ae592574c551e1476f1e2b7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 27 Mar 2022 09:35:28 -0400 Subject: [PATCH 069/105] Reset displayed score when Cabrillo log is reset. --- widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 89cfb64c2..5b371cb4e 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -7167,6 +7167,7 @@ void MainWindow::on_reset_cabrillo_log_action_triggered () m_logBook.contest_log ()->reset (); m_activeCall.clear(); //Erase the QMap of active calls m_score=0; + m_ActiveStationsWidget->setScore(0); } } From b219b59296aab3c3ed82e44d7fda99bb911fb87f Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 27 Mar 2022 10:21:22 -0400 Subject: [PATCH 070/105] Fix the logic for replying to a CQ responder who sends report instead of grid. --- widgets/mainwindow.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 5b371cb4e..5e24d24a8 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3729,7 +3729,7 @@ void MainWindow::readFromStdout() //readFromStdout } } if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { - if(ui->respondComboBox->currentText()=="CQ: First") { + if(ui->respondComboBox->currentText()!="CQ: First") { m_bDoubleClicked=true; m_bAutoReply = true; processMessage (decodedtext); @@ -3738,19 +3738,21 @@ void MainWindow::readFromStdout() //readFromStdout if(ui->respondComboBox->currentText()=="CQ: Max Dist") { QString deCall; QString deGrid; - bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or - m_config.special_op_id()==SpecOp::ARRL_DIGI; decodedtext.deCallAndGrid(/*out*/deCall,deGrid); if(deGrid.contains(grid_regexp) or - (bContest and (deGrid.contains("+") or deGrid.contains("-")))) { - double utch=0.0; - int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; - azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()), - const_cast ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch, - &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); - int points=nDkm/500; - if(nDkm > 500*points) points += 1; - points += 1; + (deGrid.contains("+") or deGrid.contains("-"))) { + int points=0; + if(deGrid.contains(grid_regexp)) { + double utch=0.0; + int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; + azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()), + const_cast ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch, + &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6); + points=nDkm/500; + if(nDkm > 500*points) points += 1; + points += 1; + } + if(points>m_maxPoints) { m_maxPoints=points; m_deCall=deCall; @@ -3760,6 +3762,7 @@ void MainWindow::readFromStdout() //readFromStdout ui->dxGridEntry->setText(deGrid); genStdMsgs(QString::number(decodedtext.snr())); int ntx=2; + bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI; if(bContest) ntx=3; setTxMsg(ntx); } From d399b172a4cfa195f65658b54f9a249e4494e311 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 28 Mar 2022 10:35:36 -0400 Subject: [PATCH 071/105] Repair the logic for selecting best responder to my CQ. --- widgets/mainwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 5e24d24a8..f36fef29a 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3729,7 +3729,7 @@ void MainWindow::readFromStdout() //readFromStdout } } if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { - if(ui->respondComboBox->currentText()!="CQ: First") { + if(ui->respondComboBox->currentText()=="CQ: First") { m_bDoubleClicked=true; m_bAutoReply = true; processMessage (decodedtext); @@ -3742,7 +3742,9 @@ void MainWindow::readFromStdout() //readFromStdout if(deGrid.contains(grid_regexp) or (deGrid.contains("+") or deGrid.contains("-"))) { int points=0; - if(deGrid.contains(grid_regexp)) { + if(m_activeCall.contains(deCall)) { + points=m_activeCall[deCall].points; + } else if(deGrid.contains(grid_regexp)) { double utch=0.0; int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()), @@ -3752,7 +3754,6 @@ void MainWindow::readFromStdout() //readFromStdout if(nDkm > 500*points) points += 1; points += 1; } - if(points>m_maxPoints) { m_maxPoints=points; m_deCall=deCall; From f32f2393eaffcaf20a655cae9215ca4e20cb4d32 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 28 Mar 2022 10:48:06 -0400 Subject: [PATCH 072/105] Copy info to "DX Grid" only if it's a valid grid locator. --- widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f36fef29a..3f4033fe1 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3744,6 +3744,7 @@ void MainWindow::readFromStdout() //readFromStdout int points=0; if(m_activeCall.contains(deCall)) { points=m_activeCall[deCall].points; + deGrid=m_activeCall[deCall].grid4; } else if(deGrid.contains(grid_regexp)) { double utch=0.0; int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; From 218479f093d04f7f9b43751b2f5569fa69f6375d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 28 Mar 2022 11:07:37 -0400 Subject: [PATCH 073/105] Add commas or dots, where appropriate, for display of score. --- widgets/activeStations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index fc93c6fec..9092356ec 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -111,7 +111,7 @@ void ActiveStations::setRate(int n) void ActiveStations::setScore(int n) { - ui->score->setText(QString::number(n)); + ui->score->setText(QLocale(QLocale::English).toString(n)); } void ActiveStations::setBandChanges(int n) From 4fb06dda43563b88e4453698a4bdabf022e931ed Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 28 Mar 2022 17:25:17 -0400 Subject: [PATCH 074/105] Don't put a report into the DxGrid box. Reply to report with R+report. --- widgets/mainwindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3f4033fe1..5cc37c30c 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3758,14 +3758,18 @@ void MainWindow::readFromStdout() //readFromStdout if(points>m_maxPoints) { m_maxPoints=points; m_deCall=deCall; - m_deGrid=deGrid; m_bDoubleClicked=true; ui->dxCallEntry->setText(deCall); - ui->dxGridEntry->setText(deGrid); - genStdMsgs(QString::number(decodedtext.snr())); int ntx=2; bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI; if(bContest) ntx=3; + if(deGrid.contains(grid_regexp)) { + m_deGrid=deGrid; + ui->dxGridEntry->setText(deGrid); + } else { + ntx=3; + } + genStdMsgs(QString::number(decodedtext.snr())); setTxMsg(ntx); } } From 675a768de1057d90829c00f7efede78af66cecea Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 28 Mar 2022 17:30:00 -0400 Subject: [PATCH 075/105] Set RxFreq spoinner to freq of selected reply to my CQ. --- widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 5cc37c30c..afdbd7be9 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3770,6 +3770,7 @@ void MainWindow::readFromStdout() //readFromStdout ntx=3; } genStdMsgs(QString::number(decodedtext.snr())); + ui->RxFreqSpinBox->setValue(decodedtext.frequencyOffset()); setTxMsg(ntx); } } From a9e29327b78a2521657393c8c0d3b8ebde31a9cb Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 28 Mar 2022 17:45:03 -0400 Subject: [PATCH 076/105] Set a warning color when BandChanges is 8 or higher. --- widgets/activeStations.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp index 9092356ec..b5ecbf737 100644 --- a/widgets/activeStations.cpp +++ b/widgets/activeStations.cpp @@ -116,5 +116,10 @@ void ActiveStations::setScore(int n) void ActiveStations::setBandChanges(int n) { + if(n >= 8) { + ui->bandChanges->setStyleSheet("QLineEdit{background: rgb(255, 64, 64)}"); + } else { + ui->bandChanges->setStyleSheet (""); + } ui->bandChanges->setText(QString::number(n)); } From e9f1cbf375dfce41f9263567dbb6cc56ae754784 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 29 Mar 2022 10:55:03 -0400 Subject: [PATCH 077/105] Add and adjust some Tool Tips in Active Stations window. --- widgets/activeStations.ui | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui index e12bc5331..16f077687 100644 --- a/widgets/activeStations.ui +++ b/widgets/activeStations.ui @@ -55,7 +55,7 @@ - <html><head/><body><p>Rate of score increase, points per hour.</p></body></html> + <html><head/><body><p>Points logged during the past hour.</p></body></html> 0 @@ -80,7 +80,7 @@ - <html><head/><body><p>Set maximum elapsed number of T/R sequences for decodes included in the list.</p></body></html> + <html><head/><body><p>Set maximum elapsed number of T/R sequences.</p></body></html> Max Age @@ -118,6 +118,9 @@ + + <html><head/><body><p>Total score accumulated since most recent reset of Cabrillo log.</p></body></html> + 0 @@ -129,7 +132,7 @@ - <html><head/><body><p>Check to list only stations immediately ready to be called.</p></body></html> + <html><head/><body><p>Check tis box to show only stations ready to be called.</p></body></html> Ready only @@ -148,6 +151,9 @@ + + <html><head/><body><p>Number of band changes during the past hour.</p></body></html> + 0 @@ -166,6 +172,9 @@ 1 + + <html><head/><body><p>Click on a line to call that station.</p></body></html> + From 432a501bf6457e504fc3f02af1c653d0ca16f934 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 30 Mar 2022 14:23:44 -0400 Subject: [PATCH 078/105] Re-enable display of country names if ActiveStations window is closed. --- widgets/displaytext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index 7c90f4c2e..65fc1d40b 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -374,7 +374,7 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons } m_CQPriority=DecodeHighlightingModel::highlight_name(top_highlight); - if((m_points == 00) or (m_points == -1)) return message; + if(((m_points == 00) or (m_points == -1)) and m_bDisplayPoints) return message; return leftJustifyAppendage (message, extra); } From 95f75c8e49531901528c93102bdcfcc0cb065f57 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 1 Apr 2022 10:01:45 -0400 Subject: [PATCH 079/105] Fix the logic for what happens when we receive R+rpt after sending RR73. --- widgets/mainwindow.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index afdbd7be9..ad61c097f 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3729,13 +3729,18 @@ void MainWindow::readFromStdout() //readFromStdout } } if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { - if(ui->respondComboBox->currentText()=="CQ: First") { + bool bActiveStations=false; + if(ui->respondComboBox->currentText()=="CQ: First") bActiveStations=true; + + if(ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) bActiveStations=true; + if(m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible()) bActiveStations=true; + if(bActiveStations) { m_bDoubleClicked=true; m_bAutoReply = true; processMessage (decodedtext); } - if(ui->respondComboBox->currentText()=="CQ: Max Dist") { + if(!bActiveStations and m_ActiveStationsWidget and ui->respondComboBox->currentText()=="CQ: Max Dist") { QString deCall; QString deGrid; decodedtext.deCallAndGrid(/*out*/deCall,deGrid); @@ -3760,18 +3765,21 @@ void MainWindow::readFromStdout() //readFromStdout m_deCall=deCall; m_bDoubleClicked=true; ui->dxCallEntry->setText(deCall); - int ntx=2; + int m_ntx=2; bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI; - if(bContest) ntx=3; + if(bContest) m_ntx=3; if(deGrid.contains(grid_regexp)) { m_deGrid=deGrid; ui->dxGridEntry->setText(deGrid); } else { - ntx=3; + m_ntx=3; } + if(m_ntx==2) m_QSOProgress = REPORT; + if(m_ntx==3) m_QSOProgress = ROGER_REPORT; genStdMsgs(QString::number(decodedtext.snr())); ui->RxFreqSpinBox->setValue(decodedtext.frequencyOffset()); - setTxMsg(ntx); + setTxMsg(m_ntx); + m_currentMessageType=m_ntx; } } } @@ -4469,7 +4477,8 @@ void MainWindow::guiUpdate() } } - bool b=("FT8"==m_mode or "FT4"==m_mode or "Q65"==m_mode) and ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked (); + bool b=("FT8"==m_mode or "FT4"==m_mode or "Q65"==m_mode) and ui->cbAutoSeq->isVisible () + && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked (); if(is_73 and (m_config.disable_TX_on_73() or b)) { m_nextCall=""; //### Temporary: disable use of "TU;" messages; if(m_nextCall!="") { From 3a8991ab80cc12ae574d9beb15291461014990d7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 2 Apr 2022 11:18:18 -0400 Subject: [PATCH 080/105] Use current time rather than latest decode time for computing "age". Needs more testing! --- widgets/mainwindow.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index ad61c097f..047ecad7a 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3366,7 +3366,14 @@ void MainWindow::decodeDone () } if((m_mode=="FT4" or m_mode=="FT8") - and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) ARRL_Digi_Display(); // Update the ARRL_DIGI display + and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) { + if(!m_diskData) { + m_latestDecodeTime = (QDateTime::currentMSecsSinceEpoch()/1000) % 86400; + m_latestDecodeTime = int(m_latestDecodeTime/m_TRperiod); + m_latestDecodeTime = int(m_latestDecodeTime*m_TRperiod); + } + ARRL_Digi_Display(); // Update the ARRL_DIGI display + } } void MainWindow::ARRL_Digi_Update(DecodedText dt) @@ -3444,6 +3451,7 @@ void MainWindow::ARRL_Digi_Display() icall.next(); deCall=icall.key(); age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); + if(age < 0) age=1; //This probably fixes most 0h UTC wrap-round problems?? int itx=1; if(icall.value().txEven) itx=0; int snr=icall.value().snr; From dbeec73e864d45180475bd820f3393e863e32f0e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 2 Apr 2022 13:25:25 -0400 Subject: [PATCH 081/105] Revert "Use current time rather than latest decode time for computing "age". Needs more testing!" This reverts commit 3a8991ab80cc12ae574d9beb15291461014990d7. --- widgets/mainwindow.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 047ecad7a..ad61c097f 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3366,14 +3366,7 @@ void MainWindow::decodeDone () } if((m_mode=="FT4" or m_mode=="FT8") - and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) { - if(!m_diskData) { - m_latestDecodeTime = (QDateTime::currentMSecsSinceEpoch()/1000) % 86400; - m_latestDecodeTime = int(m_latestDecodeTime/m_TRperiod); - m_latestDecodeTime = int(m_latestDecodeTime*m_TRperiod); - } - ARRL_Digi_Display(); // Update the ARRL_DIGI display - } + and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) ARRL_Digi_Display(); // Update the ARRL_DIGI display } void MainWindow::ARRL_Digi_Update(DecodedText dt) @@ -3451,7 +3444,6 @@ void MainWindow::ARRL_Digi_Display() icall.next(); deCall=icall.key(); age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); - if(age < 0) age=1; //This probably fixes most 0h UTC wrap-round problems?? int itx=1; if(icall.value().txEven) itx=0; int snr=icall.value().snr; From 30047ecfeb05c9b9f746eab032bc023d3a915da1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 2 Apr 2022 13:41:59 -0400 Subject: [PATCH 082/105] Another try at getting proper value for m_latestDecodeTime. --- widgets/mainwindow.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index ad61c097f..e0109dc44 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3347,7 +3347,6 @@ void MainWindow::decodeDone () killFileTimer.start(mswait); //Kill at 3/4 period } } - if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0; dec_data.params.nagain=0; dec_data.params.ndiskdat=0; @@ -3366,7 +3365,16 @@ void MainWindow::decodeDone () } if((m_mode=="FT4" or m_mode=="FT8") - and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) ARRL_Digi_Display(); // Update the ARRL_DIGI display + and m_latestDecodeTime>=0 and m_ActiveStationsWidget!=NULL) { + if(!m_diskData and (m_nDecodes==0)) { + m_latestDecodeTime = (QDateTime::currentMSecsSinceEpoch()/1000) % 86400; + m_latestDecodeTime = int(m_latestDecodeTime/m_TRperiod); + m_latestDecodeTime = int(m_latestDecodeTime*m_TRperiod); + } + qDebug() << "aa" << m_ihsym << m_latestDecodeTime << m_nDecodes; + ARRL_Digi_Display(); // Update the ARRL_DIGI display + } + if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0; } void MainWindow::ARRL_Digi_Update(DecodedText dt) From 74ae5f98de696dc6df36f23e28d6957d0a57ed7b Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Mon, 4 Apr 2022 10:44:06 +0200 Subject: [PATCH 083/105] Prevent H button from beeing highlighted when not in Hound mode. --- widgets/mainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index e0109dc44..a4fce9831 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -6605,6 +6605,11 @@ void MainWindow::on_actionFT8_triggered() switch_mode (Modes::FT8); } + if(m_config.special_op_id() != SpecOp::HOUND) { + ui->houndButton->setChecked(false); + ui->houndButton->setStyleSheet(""); + } + if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) { QString t0=""; if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF"; From 1068988bf18522a2443a97e3a1cb322261d802bb Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Mon, 4 Apr 2022 14:01:33 +0200 Subject: [PATCH 084/105] Allow a width of 32 to 40 for the mode buttons. --- widgets/mainwindow.ui | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 6745f474a..c4ddd6e5f 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -7,7 +7,7 @@ 0 0 893 - 662 + 665 @@ -2875,7 +2875,7 @@ QLabel[oob="true"] { - 16777215 + 40 16777215 @@ -2900,7 +2900,7 @@ QLabel[oob="true"] { - 16777215 + 40 16777215 @@ -2922,7 +2922,7 @@ QLabel[oob="true"] { - 16777215 + 40 16777215 @@ -2944,7 +2944,7 @@ QLabel[oob="true"] { - 16777215 + 40 16777215 @@ -2966,7 +2966,7 @@ QLabel[oob="true"] { - 16777215 + 40 16777215 @@ -2988,7 +2988,7 @@ QLabel[oob="true"] { - 16777215 + 40 16777215 From 8a6a8e8bdf3f2feccf3923b424115a1a8fc479b0 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Mon, 4 Apr 2022 16:18:10 +0200 Subject: [PATCH 085/105] Limit width of the mode buttons to 40 only for Windows. --- widgets/mainwindow.cpp | 11 +++++++++++ widgets/mainwindow.ui | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a4fce9831..a83391636 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -745,6 +745,17 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } }); +#if defined(Q_OS_WIN) + // ensure a balanced layout of the mode buttons both on Windos and MacOS + ui->houndButton->setMaximumWidth(40); + ui->ft8Button->setMaximumWidth(40); + ui->ft4Button->setMaximumWidth(40); + ui->msk144Button->setMaximumWidth(40); + ui->q65Button->setMaximumWidth(40); + ui->jt65Button->setMaximumWidth(40); +#endif + + // hook up save WAV file exit handling connect (&m_saveWAVWatcher, &QFutureWatcher::finished, [this] { // extract the promise from the future diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index c4ddd6e5f..bc7a4fb73 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2875,7 +2875,7 @@ QLabel[oob="true"] { - 40 + 16777215 16777215 @@ -2900,7 +2900,7 @@ QLabel[oob="true"] { - 40 + 16777215 16777215 @@ -2922,7 +2922,7 @@ QLabel[oob="true"] { - 40 + 16777215 16777215 @@ -2944,7 +2944,7 @@ QLabel[oob="true"] { - 40 + 16777215 16777215 @@ -2966,7 +2966,7 @@ QLabel[oob="true"] { - 40 + 16777215 16777215 @@ -2988,7 +2988,7 @@ QLabel[oob="true"] { - 40 + 16777215 16777215 From ec1e521ba7448384bcc203a1290b21c04f72063f Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Mon, 4 Apr 2022 17:07:50 +0200 Subject: [PATCH 086/105] Set minimum width to 0 on MacOS, and limit maximum width to 40 also on Linux. --- widgets/mainwindow.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a83391636..a014cc37b 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -745,7 +745,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } }); -#if defined(Q_OS_WIN) +#if !defined(Q_OS_MAC) // ensure a balanced layout of the mode buttons both on Windos and MacOS ui->houndButton->setMaximumWidth(40); ui->ft8Button->setMaximumWidth(40); @@ -755,6 +755,15 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, ui->jt65Button->setMaximumWidth(40); #endif +#if defined(Q_OS_MAC) + // ensure a balanced layout of the mode buttons both on Windos and MacOS + ui->houndButton->setMinimumWidth(0); + ui->ft8Button->setMinimumWidth(0); + ui->ft4Button->setMinimumWidth(0); + ui->msk144Button->setMinimumWidth(0); + ui->q65Button->setMinimumWidth(0); + ui->jt65Button->setMinimumWidth(0); +#endif // hook up save WAV file exit handling connect (&m_saveWAVWatcher, &QFutureWatcher::finished, [this] { From dd81db1e95914093211bd5e87be25c16684615eb Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Mon, 7 Mar 2022 10:50:21 +0100 Subject: [PATCH 087/105] Add an option to disable the Tune watchdog. --- Configuration.cpp | 6 ++++++ Configuration.hpp | 1 + widgets/mainwindow.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Configuration.cpp b/Configuration.cpp index e8285e0c9..01020027a 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -646,6 +646,7 @@ private: bool TX_messages_; bool enable_VHF_features_; bool decode_at_52s_; + bool Tune_watchdog_disabled_; bool single_decode_; bool twoPass_; bool bSpecialOp_; @@ -755,6 +756,7 @@ int Configuration::watchdog () const {return m_->watchdog_;} bool Configuration::TX_messages () const {return m_->TX_messages_;} bool Configuration::enable_VHF_features () const {return m_->enable_VHF_features_;} bool Configuration::decode_at_52s () const {return m_->decode_at_52s_;} +bool Configuration::Tune_watchdog_disabled () const {return m_->Tune_watchdog_disabled_;} bool Configuration::single_decode () const {return m_->single_decode_;} bool Configuration::twoPass() const {return m_->twoPass_;} bool Configuration::x2ToneSpacing() const {return m_->x2ToneSpacing_;} @@ -1357,6 +1359,7 @@ void Configuration::impl::initialize_models () ui_->TX_messages_check_box->setChecked (TX_messages_); ui_->enable_VHF_features_check_box->setChecked(enable_VHF_features_); ui_->decode_at_52s_check_box->setChecked(decode_at_52s_); + ui_->disable_Tune_watchdog_check_box->setChecked(Tune_watchdog_disabled_); ui_->single_decode_check_box->setChecked(single_decode_); ui_->cbTwoPass->setChecked(twoPass_); ui_->gbSpecialOpActivity->setChecked(bSpecialOp_); @@ -1574,6 +1577,7 @@ void Configuration::impl::read_settings () TX_messages_ = settings_->value ("Tx2QSO", true).toBool (); enable_VHF_features_ = settings_->value("VHFUHF",false).toBool (); decode_at_52s_ = settings_->value("Decode52",false).toBool (); + Tune_watchdog_disabled_ = settings_->value("TuneWatchdogDisabled",false).toBool (); single_decode_ = settings_->value("SingleDecode",false).toBool (); twoPass_ = settings_->value("TwoPass",true).toBool (); bSpecialOp_ = settings_->value("SpecialOpActivity",false).toBool (); @@ -1710,6 +1714,7 @@ void Configuration::impl::write_settings () settings_->setValue ("SplitMode", QVariant::fromValue (rig_params_.split_mode)); settings_->setValue ("VHFUHF", enable_VHF_features_); settings_->setValue ("Decode52", decode_at_52s_); + settings_->setValue ("TuneWatchdogDisabled", Tune_watchdog_disabled_); settings_->setValue ("SingleDecode", single_decode_); settings_->setValue ("TwoPass", twoPass_); settings_->setValue ("SelectedActivity", SelectedActivity_); @@ -2140,6 +2145,7 @@ void Configuration::impl::accept () azel_directory_.setPath (ui_->azel_path_display_label->text ()); enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked (); decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked (); + Tune_watchdog_disabled_ = ui_->disable_Tune_watchdog_check_box->isChecked (); single_decode_ = ui_->single_decode_check_box->isChecked (); twoPass_ = ui_->cbTwoPass->isChecked (); bSpecialOp_ = ui_->gbSpecialOpActivity->isChecked (); diff --git a/Configuration.hpp b/Configuration.hpp index 9f5e64edd..bd31d8695 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -134,6 +134,7 @@ public: bool split_mode () const; bool enable_VHF_features () const; bool decode_at_52s () const; + bool Tune_watchdog_disabled () const; bool single_decode () const; bool twoPass() const; bool bFox() const; diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a014cc37b..9e95a07d2 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -7377,7 +7377,7 @@ void MainWindow::on_rptSpinBox_valueChanged(int n) void MainWindow::on_tuneButton_clicked (bool checked) { - tuneATU_Timer.start (120000); // tune watchdog (120s) + if (!m_config.Tune_watchdog_disabled ()) tuneATU_Timer.start (90000); // tune watchdog (90s) static bool lastChecked = false; if (lastChecked == checked) return; lastChecked = checked; From 55bc403f83230b1327f4972de2ec0679cfae06a7 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Mon, 4 Apr 2022 17:29:47 +0200 Subject: [PATCH 088/105] Add an option to disable the Tune watchdog (part 2). --- Configuration.ui | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Configuration.ui b/Configuration.ui index 5caff9148..c6a826512 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -517,6 +517,16 @@ quiet period when decoding is done. + + + + <html><head/><body><p>Disable the Tune watchdog.</p></body></html> + + + Disable Tune watchdog + + + @@ -3282,12 +3292,12 @@ Right click for insert and delete options. + + + - - - - + From cf9233b6503ebc6d3c65050aac191cb34afb4fc0 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Tue, 5 Apr 2022 11:14:34 +0200 Subject: [PATCH 089/105] Automatically set the width of the mode buttons depending on the font size. --- widgets/mainwindow.cpp | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 9e95a07d2..66e749d81 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -745,25 +745,23 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } }); -#if !defined(Q_OS_MAC) - // ensure a balanced layout of the mode buttons both on Windos and MacOS - ui->houndButton->setMaximumWidth(40); - ui->ft8Button->setMaximumWidth(40); - ui->ft4Button->setMaximumWidth(40); - ui->msk144Button->setMaximumWidth(40); - ui->q65Button->setMaximumWidth(40); - ui->jt65Button->setMaximumWidth(40); -#endif - -#if defined(Q_OS_MAC) - // ensure a balanced layout of the mode buttons both on Windos and MacOS - ui->houndButton->setMinimumWidth(0); - ui->ft8Button->setMinimumWidth(0); - ui->ft4Button->setMinimumWidth(0); - ui->msk144Button->setMinimumWidth(0); - ui->q65Button->setMinimumWidth(0); - ui->jt65Button->setMinimumWidth(0); -#endif + // ensure a balanced layout of the mode buttons + qreal pointSize = m_config.text_font().pointSizeF(); + if (pointSize < 12) { + ui->houndButton->setMaximumWidth(40); + ui->ft8Button->setMaximumWidth(40); + ui->ft4Button->setMaximumWidth(40); + ui->msk144Button->setMaximumWidth(40); + ui->q65Button->setMaximumWidth(40); + ui->jt65Button->setMaximumWidth(40); + } else { + ui->houndButton->setMinimumWidth(0); + ui->ft8Button->setMinimumWidth(0); + ui->ft4Button->setMinimumWidth(0); + ui->msk144Button->setMinimumWidth(0); + ui->q65Button->setMinimumWidth(0); + ui->jt65Button->setMinimumWidth(0); + } // hook up save WAV file exit handling connect (&m_saveWAVWatcher, &QFutureWatcher::finished, [this] { From 2d906247d7dfab973a3a36cbfbae1ba84de11184 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Tue, 5 Apr 2022 18:08:27 +0200 Subject: [PATCH 090/105] Prevent the display of lines with negative age values. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 66e749d81..549df0ce3 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3474,7 +3474,7 @@ void MainWindow::ARRL_Digi_Display() if(icall.value().txEven) itx=0; int snr=icall.value().snr; int freq=icall.value().audioFreq; - if(age>maxAge) { + if(age>maxAge or age<0) { icall.remove(); } else { bool bReady=false; From cb03c837d028c2fc36172f53ce3af1048e124885 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Wed, 6 Apr 2022 10:08:30 +0200 Subject: [PATCH 091/105] Revert "Prevent the display of lines with negative age values." This reverts commit 2d906247d7dfab973a3a36cbfbae1ba84de11184. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 549df0ce3..66e749d81 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3474,7 +3474,7 @@ void MainWindow::ARRL_Digi_Display() if(icall.value().txEven) itx=0; int snr=icall.value().snr; int freq=icall.value().audioFreq; - if(age>maxAge or age<0) { + if(age>maxAge) { icall.remove(); } else { bool bReady=false; From a78f5d06c4561f98318118ae457a4ba84affe9d7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 6 Apr 2022 12:21:22 -0400 Subject: [PATCH 092/105] Correct the calculation of Age after 0h UTC wrap-around. --- widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 66e749d81..0db205a88 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3470,6 +3470,7 @@ void MainWindow::ARRL_Digi_Display() icall.next(); deCall=icall.key(); age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5); + if(age<0) age=age + int(86400/m_TRperiod); int itx=1; if(icall.value().txEven) itx=0; int snr=icall.value().snr; From 193027135048aa6396e48f9c9a15c5b2489d5761 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 6 Apr 2022 16:05:40 -0400 Subject: [PATCH 093/105] Remove a diagnostic qDebug() statement. --- widgets/mainwindow.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 0db205a88..842312db5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3389,7 +3389,6 @@ void MainWindow::decodeDone () m_latestDecodeTime = int(m_latestDecodeTime/m_TRperiod); m_latestDecodeTime = int(m_latestDecodeTime*m_TRperiod); } - qDebug() << "aa" << m_ihsym << m_latestDecodeTime << m_nDecodes; ARRL_Digi_Display(); // Update the ARRL_DIGI display } if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0; From 36d11fc561fe8058950f87c83a29bbc026643394 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 9 Apr 2022 14:37:24 -0400 Subject: [PATCH 094/105] Fix some logical issues with auto-sequening with ActiveStations window. Enable ARRL_DIGI label display. --- widgets/mainwindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 842312db5..d0c19febd 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1555,7 +1555,7 @@ void MainWindow::dataSink(qint64 frames) if(m_mode=="FT8") { to_jt9(m_ihsym,-1,-1); //Allow jt9 to bail out early, if necessary if(m_ihsym==40 and m_decoderBusy) { - qDebug() << "Clearing hung decoder status"; +// qDebug() << "Clearing hung decoder status"; decodeDone(); //Clear a hung decoder status } } @@ -3754,12 +3754,12 @@ void MainWindow::readFromStdout() //readFromStdout for_us = false; } } + bool bActiveStations=false; if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { - bool bActiveStations=false; if(ui->respondComboBox->currentText()=="CQ: First") bActiveStations=true; if(ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) bActiveStations=true; - if(m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible()) bActiveStations=true; + if(m_ActiveStationsWidget!=NULL and m_ActiveStationsWidget->isVisible()) bActiveStations=true; if(bActiveStations) { m_bDoubleClicked=true; m_bAutoReply = true; @@ -3792,7 +3792,8 @@ void MainWindow::readFromStdout() //readFromStdout m_bDoubleClicked=true; ui->dxCallEntry->setText(deCall); int m_ntx=2; - bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI; + bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI or + m_config.special_op_id()==SpecOp::WW_DIGI; if(bContest) m_ntx=3; if(deGrid.contains(grid_regexp)) { m_deGrid=deGrid; @@ -3800,8 +3801,10 @@ void MainWindow::readFromStdout() //readFromStdout } else { m_ntx=3; } + if(deGrid.contains("R+") or deGrid.contains("R-") or deGrid.contains("R ")) m_ntx=4; if(m_ntx==2) m_QSOProgress = REPORT; if(m_ntx==3) m_QSOProgress = ROGER_REPORT; + if(m_ntx==4) m_QSOProgress = ROGERS; genStdMsgs(QString::number(decodedtext.snr())); ui->RxFreqSpinBox->setValue(decodedtext.frequencyOffset()); setTxMsg(m_ntx); @@ -9641,6 +9644,7 @@ void MainWindow::chkFT4() if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day"; if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY"; if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI"; + if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0+="ARRL_DIGI"; if(t0=="") { ui->labDXped->setVisible(false); } else { From 9b8b604a8cb73c754c9c649877a901ba46b0816c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 9 Apr 2022 15:04:56 -0400 Subject: [PATCH 095/105] Correct the way "Rate" is being updated. --- widgets/mainwindow.cpp | 36 +++++++++++++++++++++--------------- widgets/mainwindow.h | 1 + 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index d0c19febd..86d3bb5b7 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3450,6 +3450,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_recentCall[deCall]=rc; m_points=m_activeCall.value(deCall).points; } + updateRate(); } void MainWindow::ARRL_Digi_Display() @@ -6325,28 +6326,33 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, al.band=band; al.points=points; m_arrl_log.append(al); - int iz=m_arrl_log.size(); - int rate=0; - int nbc=0; - - for(int i=iz-1; i>=0; i--) { - double hrDiff = m_arrl_log[i].time.msecsTo(al.time)/3600000.0; - if(hrDiff > 1.0) break; - rate += m_arrl_log[i].points; - if(isetRate(rate); - m_ActiveStationsWidget->setScore(m_score); - m_ActiveStationsWidget->setBandChanges(nbc); } - + updateRate(); m_xSent.clear (); m_xRcvd.clear (); if (m_config.clear_DXcall ()) ui->dxCallEntry->clear (); if (m_config.clear_DXgrid ()) ui->dxGridEntry->clear (); } +void MainWindow::updateRate() +{ + int iz=m_arrl_log.size(); + int rate=0; + int nbc=0; + double hrDiff; + + for(int i=iz-1; i>=0; i--) { + hrDiff = m_arrl_log[i].time.msecsTo(QDateTime::currentDateTimeUtc())/3600000.0; + if(hrDiff > 1.0) break; + rate += m_arrl_log[i].points; + if(isetRate(rate); + m_ActiveStationsWidget->setScore(m_score); + m_ActiveStationsWidget->setBandChanges(nbc); +} + + qint64 MainWindow::nWidgets(QString t) { Q_ASSERT(t.length()==N_WIDGETS); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 8aff69d35..400b1b4ca 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -785,6 +785,7 @@ private: void CQTxFreq(); void useNextCall(); void abortQSO(); + void updateRate(); void write_all(QString txRx, QString message); bool isWorked(int itype, QString key, float fMHz=0, QString=""); From fc4a70cf9c261702568376806210e96271f915a0 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Apr 2022 09:44:14 -0400 Subject: [PATCH 096/105] Fix the position of call to UpdateRate(). --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 86d3bb5b7..4dfbb18e8 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -6326,8 +6326,8 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, al.band=band; al.points=points; m_arrl_log.append(al); + updateRate(); } - updateRate(); m_xSent.clear (); m_xRcvd.clear (); if (m_config.clear_DXcall ()) ui->dxCallEntry->clear (); From afa020558ffc712d2efa4705eb646533fedc7dcc Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Apr 2022 11:03:16 -0400 Subject: [PATCH 097/105] Revert "Fix the position of call to UpdateRate()." This reverts commit fc4a70cf9c261702568376806210e96271f915a0. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 4dfbb18e8..86d3bb5b7 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -6326,8 +6326,8 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, al.band=band; al.points=points; m_arrl_log.append(al); - updateRate(); } + updateRate(); m_xSent.clear (); m_xRcvd.clear (); if (m_config.clear_DXcall ()) ui->dxCallEntry->clear (); From 708342f40a26a55ac93b0c099ec739da7c515653 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Apr 2022 11:03:43 -0400 Subject: [PATCH 098/105] Revert "Correct the way "Rate" is being updated." This reverts commit 9b8b604a8cb73c754c9c649877a901ba46b0816c. --- widgets/mainwindow.cpp | 36 +++++++++++++++--------------------- widgets/mainwindow.h | 1 - 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 86d3bb5b7..d0c19febd 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3450,7 +3450,6 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_recentCall[deCall]=rc; m_points=m_activeCall.value(deCall).points; } - updateRate(); } void MainWindow::ARRL_Digi_Display() @@ -6326,33 +6325,28 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, al.band=band; al.points=points; m_arrl_log.append(al); + int iz=m_arrl_log.size(); + int rate=0; + int nbc=0; + + for(int i=iz-1; i>=0; i--) { + double hrDiff = m_arrl_log[i].time.msecsTo(al.time)/3600000.0; + if(hrDiff > 1.0) break; + rate += m_arrl_log[i].points; + if(isetRate(rate); + m_ActiveStationsWidget->setScore(m_score); + m_ActiveStationsWidget->setBandChanges(nbc); } - updateRate(); + m_xSent.clear (); m_xRcvd.clear (); if (m_config.clear_DXcall ()) ui->dxCallEntry->clear (); if (m_config.clear_DXgrid ()) ui->dxGridEntry->clear (); } -void MainWindow::updateRate() -{ - int iz=m_arrl_log.size(); - int rate=0; - int nbc=0; - double hrDiff; - - for(int i=iz-1; i>=0; i--) { - hrDiff = m_arrl_log[i].time.msecsTo(QDateTime::currentDateTimeUtc())/3600000.0; - if(hrDiff > 1.0) break; - rate += m_arrl_log[i].points; - if(isetRate(rate); - m_ActiveStationsWidget->setScore(m_score); - m_ActiveStationsWidget->setBandChanges(nbc); -} - - qint64 MainWindow::nWidgets(QString t) { Q_ASSERT(t.length()==N_WIDGETS); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 400b1b4ca..8aff69d35 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -785,7 +785,6 @@ private: void CQTxFreq(); void useNextCall(); void abortQSO(); - void updateRate(); void write_all(QString txRx, QString message); bool isWorked(int itype, QString key, float fMHz=0, QString=""); From 400957af0c04178781e30e6e478f1a40ac38105e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Apr 2022 11:04:46 -0400 Subject: [PATCH 099/105] Revert "Fix some logical issues with auto-sequening with ActiveStations window. Enable ARRL_DIGI label display." This reverts commit 36d11fc561fe8058950f87c83a29bbc026643394. --- widgets/mainwindow.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index d0c19febd..842312db5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1555,7 +1555,7 @@ void MainWindow::dataSink(qint64 frames) if(m_mode=="FT8") { to_jt9(m_ihsym,-1,-1); //Allow jt9 to bail out early, if necessary if(m_ihsym==40 and m_decoderBusy) { -// qDebug() << "Clearing hung decoder status"; + qDebug() << "Clearing hung decoder status"; decodeDone(); //Clear a hung decoder status } } @@ -3754,12 +3754,12 @@ void MainWindow::readFromStdout() //readFromStdout for_us = false; } } - bool bActiveStations=false; if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { + bool bActiveStations=false; if(ui->respondComboBox->currentText()=="CQ: First") bActiveStations=true; if(ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) bActiveStations=true; - if(m_ActiveStationsWidget!=NULL and m_ActiveStationsWidget->isVisible()) bActiveStations=true; + if(m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible()) bActiveStations=true; if(bActiveStations) { m_bDoubleClicked=true; m_bAutoReply = true; @@ -3792,8 +3792,7 @@ void MainWindow::readFromStdout() //readFromStdout m_bDoubleClicked=true; ui->dxCallEntry->setText(deCall); int m_ntx=2; - bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI or - m_config.special_op_id()==SpecOp::WW_DIGI; + bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI; if(bContest) m_ntx=3; if(deGrid.contains(grid_regexp)) { m_deGrid=deGrid; @@ -3801,10 +3800,8 @@ void MainWindow::readFromStdout() //readFromStdout } else { m_ntx=3; } - if(deGrid.contains("R+") or deGrid.contains("R-") or deGrid.contains("R ")) m_ntx=4; if(m_ntx==2) m_QSOProgress = REPORT; if(m_ntx==3) m_QSOProgress = ROGER_REPORT; - if(m_ntx==4) m_QSOProgress = ROGERS; genStdMsgs(QString::number(decodedtext.snr())); ui->RxFreqSpinBox->setValue(decodedtext.frequencyOffset()); setTxMsg(m_ntx); @@ -9644,7 +9641,6 @@ void MainWindow::chkFT4() if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day"; if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY"; if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI"; - if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0+="ARRL_DIGI"; if(t0=="") { ui->labDXped->setVisible(false); } else { From cf27347656ea8862811a45fd62229df4e3849640 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Apr 2022 11:55:05 -0400 Subject: [PATCH 100/105] Clean up the display of contest names on the 'labDXped' label. --- widgets/mainwindow.cpp | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 842312db5..8626a0588 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -6630,12 +6630,12 @@ void MainWindow::on_actionFT8_triggered() if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) { QString t0=""; - if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF"; - if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF"; - if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day"; - if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY"; - if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI"; - if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0+="ARRL_DIGI"; + if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF"; + if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF"; + if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0="Field Day"; + if(SpecOp::RTTY==m_config.special_op_id()) t0="RTTY"; + if(SpecOp::WW_DIGI==m_config.special_op_id()) t0="WW_DIGI"; + if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0="ARRL_DIGI"; if(t0=="") { ui->labDXped->setVisible(false); } else { @@ -6845,8 +6845,9 @@ void MainWindow::on_actionQ65_triggered() if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF"; if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF"; if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0="Field Day"; - if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY"; - if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI"; + if(SpecOp::RTTY==m_config.special_op_id()) t0="RTTY"; + if(SpecOp::WW_DIGI==m_config.special_op_id()) t0="WW_DIGI"; + if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0="ARRL_DIGI"; if(t0=="") { ui->labDXped->setVisible(false); } else { @@ -6918,8 +6919,8 @@ void MainWindow::on_actionMSK144_triggered() statusChanged(); QString t0=""; - if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF"; - if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF"; + if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF"; + if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF"; if(t0=="") { ui->labDXped->setVisible(false); } else { @@ -9636,11 +9637,12 @@ void MainWindow::chkFT4() if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) { QString t0=""; - if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF"; - if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF"; - if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day"; - if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY"; - if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI"; + if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF"; + if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF"; + if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0="Field Day"; + if(SpecOp::RTTY==m_config.special_op_id()) t0="RTTY"; + if(SpecOp::WW_DIGI==m_config.special_op_id()) t0="WW_DIGI"; + if(SpecOp::ARRL_DIGI==m_config.special_op_id()) t0="ARRL_DIGI"; if(t0=="") { ui->labDXped->setVisible(false); } else { @@ -9804,7 +9806,7 @@ void MainWindow::on_ft8Button_clicked() { ui->houndButton->setChecked(false); ui->houndButton->setStyleSheet(""); - m_config.setSpecial_None(); + if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None(); on_actionFT8_triggered(); } @@ -9812,7 +9814,7 @@ void MainWindow::on_ft4Button_clicked() { ui->houndButton->setChecked(false); ui->houndButton->setStyleSheet(""); - m_config.setSpecial_None(); + if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None(); on_actionFT4_triggered(); } @@ -9820,7 +9822,7 @@ void MainWindow::on_msk144Button_clicked() { ui->houndButton->setChecked(false); ui->houndButton->setStyleSheet(""); - m_config.setSpecial_None(); + if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None(); on_actionMSK144_triggered(); } @@ -9828,7 +9830,7 @@ void MainWindow::on_q65Button_clicked() { ui->houndButton->setChecked(false); ui->houndButton->setStyleSheet(""); - m_config.setSpecial_None(); + if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None(); on_actionQ65_triggered(); } @@ -9836,6 +9838,6 @@ void MainWindow::on_jt65Button_clicked() { ui->houndButton->setChecked(false); ui->houndButton->setStyleSheet(""); - m_config.setSpecial_None(); + if(m_config.special_op_id()==SpecOp::HOUND) m_config.setSpecial_None(); on_actionJT65_triggered(); } From ab72238132410e7e5dd5ab5794432935b0e1602c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Apr 2022 13:08:16 -0400 Subject: [PATCH 101/105] Fix the updateRate() logic, and the logic for "ProcessMsgNormally". (Is it right, yet??) --- widgets/mainwindow.cpp | 48 ++++++++++++++++++++++++------------------ widgets/mainwindow.h | 1 + 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 8626a0588..f5866a30f 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3450,6 +3450,7 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt) m_recentCall[deCall]=rc; m_points=m_activeCall.value(deCall).points; } + updateRate(); } void MainWindow::ARRL_Digi_Display() @@ -3755,18 +3756,18 @@ void MainWindow::readFromStdout() //readFromStdout } } if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) { - bool bActiveStations=false; - if(ui->respondComboBox->currentText()=="CQ: First") bActiveStations=true; - - if(ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) bActiveStations=true; - if(m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible()) bActiveStations=true; - if(bActiveStations) { + 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()); + QString t=decodedtext.messageWords()[4]; + if(t.contains("R+") or t.contains("R-") or t.contains("R ")) bProcessMsgNormally=true; + if(bProcessMsgNormally) { m_bDoubleClicked=true; m_bAutoReply = true; processMessage (decodedtext); } - if(!bActiveStations and m_ActiveStationsWidget and ui->respondComboBox->currentText()=="CQ: Max Dist") { + if(!bProcessMsgNormally and m_ActiveStationsWidget and ui->respondComboBox->currentText()=="CQ: Max Dist") { QString deCall; QString deGrid; decodedtext.deCallAndGrid(/*out*/deCall,deGrid); @@ -6322,20 +6323,7 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, al.band=band; al.points=points; m_arrl_log.append(al); - int iz=m_arrl_log.size(); - int rate=0; - int nbc=0; - - for(int i=iz-1; i>=0; i--) { - double hrDiff = m_arrl_log[i].time.msecsTo(al.time)/3600000.0; - if(hrDiff > 1.0) break; - rate += m_arrl_log[i].points; - if(isetRate(rate); - m_ActiveStationsWidget->setScore(m_score); - m_ActiveStationsWidget->setBandChanges(nbc); + updateRate(); } m_xSent.clear (); @@ -6344,6 +6332,24 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, if (m_config.clear_DXgrid ()) ui->dxGridEntry->clear (); } +void MainWindow::updateRate() +{ + int iz=m_arrl_log.size(); + int rate=0; + int nbc=0; + double hrDiff; + + for(int i=iz-1; i>=0; i--) { + hrDiff = m_arrl_log[i].time.msecsTo(QDateTime::currentDateTimeUtc())/3600000.0; + if(hrDiff > 1.0) break; + rate += m_arrl_log[i].points; + if(isetRate(rate); + m_ActiveStationsWidget->setScore(m_score); + m_ActiveStationsWidget->setBandChanges(nbc); +} + qint64 MainWindow::nWidgets(QString t) { Q_ASSERT(t.length()==N_WIDGETS); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 8aff69d35..400b1b4ca 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -785,6 +785,7 @@ private: void CQTxFreq(); void useNextCall(); void abortQSO(); + void updateRate(); void write_all(QString txRx, QString message); bool isWorked(int itype, QString key, float fMHz=0, QString=""); From d45d0b6b8fd56ca13c41032ac0e445febc709630 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 12 Apr 2022 12:56:04 -0400 Subject: [PATCH 102/105] Correct the tests for receiving "R ", etc., in autosequencing logic. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f5866a30f..bf7204a87 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3760,7 +3760,7 @@ void MainWindow::readFromStdout() //readFromStdout (ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) or (m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible()); QString t=decodedtext.messageWords()[4]; - if(t.contains("R+") or t.contains("R-") or t.contains("R ")) bProcessMsgNormally=true; + if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73" or t=="73") bProcessMsgNormally=true; if(bProcessMsgNormally) { m_bDoubleClicked=true; m_bAutoReply = true; From 1da80c0631f7f75e35ad08dfdddc5362a7d811c1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 12 Apr 2022 13:43:42 -0400 Subject: [PATCH 103/105] Don't include "73" in the test for bProcessMsgNormally. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index bf7204a87..14b0ad8c2 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3760,7 +3760,7 @@ void MainWindow::readFromStdout() //readFromStdout (ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) or (m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible()); QString t=decodedtext.messageWords()[4]; - if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73" or t=="73") bProcessMsgNormally=true; + if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true; if(bProcessMsgNormally) { m_bDoubleClicked=true; m_bAutoReply = true; From 4331594e4ac0255ace9ed3b691564b2f30fd42fd Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Fri, 22 Apr 2022 07:50:03 -0500 Subject: [PATCH 104/105] Make wspr mode work properly with 3 character callsigns like N1D. --- lib/wsprd/wsprsim_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wsprd/wsprsim_utils.c b/lib/wsprd/wsprsim_utils.c index b6b95c491..0130a87ec 100644 --- a/lib/wsprd/wsprsim_utils.c +++ b/lib/wsprd/wsprsim_utils.c @@ -196,7 +196,7 @@ int get_wspr_channel_symbols(char* rawmessage, char* hashtab, char* loctab, unsi // Use the presence and/or absence of "<" and "/" to decide what // type of message. No sanity checks! Beware! - if( i1 > 3 && i1 < 7 && i2 == mlen && i3 == mlen ) { + if( i1 >= 3 && i1 < 7 && i2 == mlen && i3 == mlen ) { // Type 1 message: K9AN EN50 33 // xxnxxxx xxnn nn callsign = strtok(message," "); From f5ec31d3a15318b8f707a7fa5430cb82f06fb6de Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sat, 23 Apr 2022 12:18:21 +0200 Subject: [PATCH 105/105] Align tooltip formatting. --- Configuration.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration.ui b/Configuration.ui index c6a826512..ad62f515e 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2798,7 +2798,7 @@ Right click for insert and delete options. - ARRL International Digital Contest + <html><head/><body><p>ARRL International Digital Contest</p></body></html> ARRL Digi Contest