From 8d48b44e9a92fea08ed17b07cb6acec3cc8856b7 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Mon, 7 Sep 2020 20:36:09 +0100 Subject: [PATCH 1/4] ADIF v3.1.1 compliance Note that FST4 QSOs are logged with MODE=MFSK and SUBMODE=FST4. The new bands 8m and 5m are recognized. The ADIF header is expanded with program and time stamp information. --- logbook/WorkedBefore.cpp | 15 ++++++++++++++- logbook/logbook.cpp | 2 +- models/Bands.cpp | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/logbook/WorkedBefore.cpp b/logbook/WorkedBefore.cpp index 152feeb25..d6a794108 100644 --- a/logbook/WorkedBefore.cpp +++ b/logbook/WorkedBefore.cpp @@ -19,7 +19,9 @@ #include #include #include +#include #include "Configuration.hpp" +#include "revision_utils.hpp" #include "qt_helpers.hpp" #include "pimpl_impl.hpp" @@ -442,7 +444,18 @@ bool WorkedBefore::add (QString const& call QTextStream out {&file}; if (!file.size ()) { - out << "WSJT-X ADIF Export" << // new file + auto ts = QDateTime::currentDateTimeUtc ().toString ("yyyyMMdd HHmmss"); + auto ver = version (true); + out << // new file + QString { + "ADIF Export\n" + "3.1.1\n" + "%0\n" + "WSJT-X\n" + "%2\n" + "" + }.arg (ts).arg (ver.size ()).arg (ver) + << #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) endl #else diff --git a/logbook/logbook.cpp b/logbook/logbook.cpp index 327585110..2cfa87418 100644 --- a/logbook/logbook.cpp +++ b/logbook/logbook.cpp @@ -79,7 +79,7 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q QString t; t = "" + hisCall; t += " " + hisGrid; - if (mode != "FT4") + if (mode != "FT4" && mode != "FST4") { t += " " + mode; } diff --git a/models/Bands.cpp b/models/Bands.cpp index f8d7872f2..f6d79f2ee 100644 --- a/models/Bands.cpp +++ b/models/Bands.cpp @@ -28,7 +28,9 @@ namespace {"15m", 21000000u, 21450000u}, {"12m", 24890000u, 24990000u}, {"10m", 28000000u, 29700000u}, + {"8m", 40000000u, 45000000u}, {"6m", 50000000u, 54000000u}, + {"5m", 54000001u, 69900000u}, {"4m", 70000000u, 71000000u}, {"2m", 144000000u, 148000000u}, {"1.25m", 222000000u, 225000000u}, From 1d52daf7ee0f8a03d7c9bb73a3ee5976ea8e5b14 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 8 Sep 2020 12:54:19 +0100 Subject: [PATCH 2/4] Remove erroneous Qt emit keywords --- widgets/mainwindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 05ce2702b..aaa4f3c53 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1879,7 +1879,7 @@ void MainWindow::on_monitorButton_clicked (bool checked) on_RxFreqSpinBox_valueChanged (ui->RxFreqSpinBox->value ()); } //Get Configuration in/out of strict split and mode checking - Q_EMIT m_config.sync_transceiver (true, checked); + m_config.sync_transceiver (true, checked); } else { ui->monitorButton->setChecked (false); // disallow } @@ -3858,7 +3858,7 @@ void MainWindow::guiUpdate() } setXIT (ui->TxFreqSpinBox->value ()); - Q_EMIT m_config.transceiver_ptt (true); //Assert the PTT + m_config.transceiver_ptt (true); //Assert the PTT m_tx_when_ready = true; } // if(!m_bTxTime and !m_tune and m_mode!="FT4") m_btxok=false; //Time to stop transmitting @@ -4369,7 +4369,7 @@ void MainWindow::stopTx() void MainWindow::stopTx2() { - Q_EMIT m_config.transceiver_ptt (false); //Lower PTT + m_config.transceiver_ptt (false); //Lower PTT if (m_mode == "JT9" && m_bFast9 && ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isChecked() && m_ntx == 5 && m_nTx73 >= 5) { @@ -6550,7 +6550,7 @@ void MainWindow::WSPR_config(bool b) if(!m_config.miles()) t += " km"; ui->decodedTextLabel->setText(t); if (m_config.is_transceiver_online ()) { - Q_EMIT m_config.transceiver_tx_frequency (0); // turn off split + m_config.transceiver_tx_frequency (0); // turn off split } m_bSimplex = true; } else @@ -6864,7 +6864,7 @@ void MainWindow::rigOpen () ui->readFreq->setText (""); ui->readFreq->setEnabled (true); m_config.transceiver_online (); - Q_EMIT m_config.sync_transceiver (true, true); + m_config.sync_transceiver (true, true); } void MainWindow::on_pbR2T_clicked() @@ -6887,7 +6887,7 @@ void MainWindow::on_readFreq_clicked() if (m_config.transceiver_online ()) { - Q_EMIT m_config.sync_transceiver (true, true); + m_config.sync_transceiver (true, true); } } @@ -6937,7 +6937,7 @@ void MainWindow::setXIT(int n, Frequency base) // frequency m_freqTxNominal = base + m_XIT; if (m_astroWidget) m_astroWidget->nominal_frequency (m_freqNominal, m_freqTxNominal); - Q_EMIT m_config.transceiver_tx_frequency (m_freqTxNominal + m_astroCorrection.tx); + m_config.transceiver_tx_frequency (m_freqTxNominal + m_astroCorrection.tx); } } //Now set the audio Tx freq @@ -8094,11 +8094,11 @@ void MainWindow::setRig (Frequency f) { if (m_transmitting && m_config.split_mode ()) { - Q_EMIT m_config.transceiver_tx_frequency (m_freqTxNominal + m_astroCorrection.tx); + m_config.transceiver_tx_frequency (m_freqTxNominal + m_astroCorrection.tx); } else { - Q_EMIT m_config.transceiver_frequency (m_freqNominal + m_astroCorrection.rx); + m_config.transceiver_frequency (m_freqNominal + m_astroCorrection.rx); } } } From db6a432a33e752db114469f0c43562a3a949e438 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 8 Sep 2020 15:24:55 +0100 Subject: [PATCH 3/4] Ensure band/frequency combo box edit styling tracks current frequency --- widgets/mainwindow.cpp | 13 ++++++++----- widgets/mainwindow.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index aaa4f3c53..78d8fb0df 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2197,7 +2197,7 @@ void MainWindow::displayDialFrequency () { // only change this when necessary as we get called a lot and it // would trash any user input to the band combo box line edit - ui->bandComboBox->setCurrentText (band_name); + ui->bandComboBox->setCurrentText (band_name.size () ? band_name : m_config.bands ()->oob ()); m_wideGraph->setRxBand (band_name); m_lastBand = band_name; band_changed(dial_frequency); @@ -6696,17 +6696,20 @@ void MainWindow::on_bandComboBox_currentIndexChanged (int index) // Lookup band auto const& band = m_config.bands ()->find (frequency); - if (!band.isEmpty ()) + ui->bandComboBox->setCurrentText (band.size () ? band : m_config.bands ()->oob ()); + displayDialFrequency (); +} + +void MainWindow::on_bandComboBox_editTextChanged (QString const& text) +{ + if (text.size () && m_config.bands ()->oob () != text) { ui->bandComboBox->lineEdit ()->setStyleSheet ({}); - ui->bandComboBox->setCurrentText (band); } else { ui->bandComboBox->lineEdit ()->setStyleSheet ("QLineEdit {color: yellow; background-color : red;}"); - ui->bandComboBox->setCurrentText (m_config.bands ()->oob ()); } - displayDialFrequency (); } void MainWindow::on_bandComboBox_activated (int index) diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index c0e0a9414..9bf7f79be 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -236,6 +236,7 @@ private slots: , QString const& exchange_sent, QString const& exchange_rcvd , QString const& propmode, QByteArray const& ADIF); void on_bandComboBox_currentIndexChanged (int index); + void on_bandComboBox_editTextChanged (QString const& text); void on_bandComboBox_activated (int index); void on_readFreq_clicked(); void on_pbTxMode_clicked(); From ae4cfaf1ae9946046594a1cf404b5bc2a061d458 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 8 Sep 2020 21:19:48 +0100 Subject: [PATCH 4/4] Start Fox mode on correct tab of tab widget --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 78d8fb0df..e017ec9ea 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -6023,7 +6023,7 @@ void MainWindow::on_actionFT8_triggered() ui->txFirstCheckBox->setEnabled(false); ui->cbHoldTxFreq->setChecked(true); ui->cbAutoSeq->setEnabled(false); - ui->tabWidget->setCurrentIndex(2); + ui->tabWidget->setCurrentIndex(1); ui->TxFreqSpinBox->setValue(300); displayWidgets(nWidgets("1110100001001110000100000000001000")); ui->labDXped->setText(tr ("Fox"));