From 428bb96ce81e5cf66be3d544bbfffcf92966e344 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 22 Apr 2020 11:34:06 -0400 Subject: [PATCH 1/6] Temporary commit to help in finding a bug. --- widgets/mainwindow.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 38451caa6..11910fe8a 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1409,7 +1409,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() << "ff Clearing hung decoder status"; + qDebug() << "Clearing hung decoder status"; decodeDone(); //Clear a hung decoder status m_blankLine=true; } @@ -2668,7 +2668,11 @@ void MainWindow::read_wav_file (QString const& fname) } if(basename.mid(0,10)=="000000_000" && m_mode == "FT8") { - dec_data.params.nutc=15*basename.mid(10,3).toInt(); + int isec=15*basename.mid(10,3).toInt(); + int ih=isec/3600; + int im=(isec-3600*ih)/60; + isec=isec%60; + dec_data.params.nutc=3600*ih+60*im+isec; } })); @@ -3362,7 +3366,7 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler || message_words.contains ("DE"))) || !message.isStandardMessage ()); // free text 73/RR73 - QStringList w=message.string().mid(24).remove("<").remove(">").split(" ",QString::SkipEmptyParts); + QStringList w=message.string().mid(22).remove("<").remove(">").split(" ",QString::SkipEmptyParts); QString w2=w.at(2); int nrpt=0; if(w.size()>3) { @@ -3699,6 +3703,7 @@ void MainWindow::guiUpdate() QByteArray ba; QByteArray ba0; + qDebug() << "aa"; if(m_mode.startsWith ("WSPR")) { QString sdBm,msg0,msg1,msg2; sdBm.sprintf(" %d",m_dBm); @@ -3940,6 +3945,7 @@ void MainWindow::guiUpdate() } } } + qDebug() << "bb"; m_restart=false; //---------------------------------------------------------------------- } else { @@ -3956,7 +3962,6 @@ void MainWindow::guiUpdate() } } } - if (g_iptt == 1 && m_iptt0 == 0) { auto const& current_message = QString::fromLatin1 (msgsent); if(m_config.watchdog () && !m_mode.startsWith ("WSPR") @@ -3988,7 +3993,6 @@ void MainWindow::guiUpdate() transmitDisplay (true); statusUpdate (); } - if(!m_btxok && m_btxok0 && g_iptt==1) stopTx(); if(m_startAnother) { @@ -4581,7 +4585,6 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie nrpt=w34.toInt(); w34=w.at(4); } - bool bEU_VHF_w2=(nrpt>=520001 and nrpt<=594000); if(bEU_VHF_w2 and SpecOp::EU_VHF!=m_config.special_op_id()) { // Switch automatically to EU VHF Contest mode @@ -4612,6 +4615,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie n=w34.toInt(); bool bRTTY = (n>=529 and n<=599); + if(bRTTY and SpecOp::RTTY != m_config.special_op_id()) { // ### Should be in RTTY contest mode ??? ### MessageBox::information_message (this, tr ("Should you switch to RTTY contest mode?")); @@ -4850,7 +4854,6 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie m_gen_message_is_cq = false; } } - // if we get here then we are reacting to the message if (m_bAutoReply) m_bCallingCQ = CALLING == m_QSOProgress; if (ui->RxFreqSpinBox->isEnabled () and m_mode != "MSK144" and !shift) { @@ -4918,7 +4921,6 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie } } } - if(m_transmitting) m_restart=true; if (ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isChecked () && !m_bDoubleClicked && m_mode!="FT4") { From 47f47a313fb8cc779818bf68a5f7dbc8e8a3a943 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 22 Apr 2020 11:51:30 -0400 Subject: [PATCH 2/6] Fix a lonstanding bug that causes crash when logging incomplete EU VHF Contest data. --- widgets/mainwindow.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 11910fe8a..bd37cd9f4 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3703,7 +3703,6 @@ void MainWindow::guiUpdate() QByteArray ba; QByteArray ba0; - qDebug() << "aa"; if(m_mode.startsWith ("WSPR")) { QString sdBm,msg0,msg1,msg2; sdBm.sprintf(" %d",m_dBm); @@ -3945,7 +3944,6 @@ void MainWindow::guiUpdate() } } } - qDebug() << "bb"; m_restart=false; //---------------------------------------------------------------------- } else { @@ -5583,7 +5581,7 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button case SpecOp::EU_VHF: m_rptSent=m_xSent.split(" ").at(0).left(2); m_rptRcvd=m_xRcvd.split(" ").at(0).left(2); - m_hisGrid=m_xRcvd.split(" ").at(1); + if(m_xRcvd.split(" ").size()>=2) m_hisGrid=m_xRcvd.split(" ").at(1); grid=m_hisGrid; ui->dxGridEntry->setText(grid); break; From cafa9ea277153b3f405859947b812795531c4612 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 22 Apr 2020 17:34:38 +0100 Subject: [PATCH 3/6] Update build script for new source file --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1bb81118..c9797405f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -603,6 +603,7 @@ set (wsjt_FSRCS lib/fsk4hf/genwsprcpm.f90 lib/fsk4hf/encode204.f90 lib/fsk4hf/decode174_74.f90 + lib/fsk4hf/decode174_101.f90 lib/fsk4hf/ldpcsim174_91.f90 lib/fsk4hf/ldpcsim174_74.f90 lib/fsk4hf/ldpcsim174_101.f90 From 185901e518b58646ffa193b8531b5a212e45f5dc Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 22 Apr 2020 13:08:45 -0400 Subject: [PATCH 4/6] Auto-sequences QSOs with EU VHF Contest messages now work OK. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index bd37cd9f4..ba407e2af 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3374,7 +3374,7 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler if(w2=="R") nrpt=w.at(3).toInt(); } bool bEU_VHF=(nrpt>=520001 and nrpt<=594000); - if(bEU_VHF and message.string().contains(m_config.my_callsign() + " ")) { + if(bEU_VHF and message.string().contains("<"+m_config.my_callsign() + "> ")) { m_xRcvd=message.string().trimmed().right(13); } if (m_auto From e51bfc8397449c1310818e6891337ea5d9d9b93c Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 22 Apr 2020 18:32:00 +0100 Subject: [PATCH 5/6] Fix a QStringList bounds error in auto-sequencing --- widgets/mainwindow.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index ba407e2af..2014020fe 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3367,12 +3367,16 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler || !message.isStandardMessage ()); // free text 73/RR73 QStringList w=message.string().mid(22).remove("<").remove(">").split(" ",QString::SkipEmptyParts); - QString w2=w.at(2); + QString w2; int nrpt=0; - if(w.size()>3) { - nrpt=w2.toInt(); - if(w2=="R") nrpt=w.at(3).toInt(); - } + if (w.size () > 2) + { + w2=w.at(2); + if(w.size()>3) { + nrpt=w2.toInt(); + if(w2=="R") nrpt=w.at(3).toInt(); + } + } bool bEU_VHF=(nrpt>=520001 and nrpt<=594000); if(bEU_VHF and message.string().contains("<"+m_config.my_callsign() + "> ")) { m_xRcvd=message.string().trimmed().right(13); @@ -4574,9 +4578,9 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie || (firstcall == "DE")) { QStringList w=message.string().mid(24).remove("<").remove(">").split(" ",QString::SkipEmptyParts); - QString w2=""; + QString w2; if(w.size()>=3) w2=w.at(2); - QString w34=""; + QString w34; if(w.size()>=4) w34=w.at(3); int nrpt=w2.toInt(); if(w2=="R") { From 7b444b855b6afe756d658c1b3d42131a7f1b40a5 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 22 Apr 2020 14:45:43 -0400 Subject: [PATCH 6/6] Fix an index value. Better approach: fix parsing in decodedtext.cpp. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 2014020fe..e964904f7 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4577,7 +4577,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie || dtext.contains (" " + m_baseCall + "/") || (firstcall == "DE")) { - QStringList w=message.string().mid(24).remove("<").remove(">").split(" ",QString::SkipEmptyParts); + QStringList w=message.string().mid(22).remove("<").remove(">").split(" ",QString::SkipEmptyParts); QString w2; if(w.size()>=3) w2=w.at(2); QString w34;