summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2021-09-09 22:49:00 +0200
committerChristoph Berg <myon@debian.org>2021-09-09 22:49:00 +0200
commit85895feeaf88bcde26bbfc71e8f6b2047c0f5f41 (patch)
tree79807e00771e4af4ce279e368262f2222806102f /widgets
parent2f095a04ed69d9aa14b47dc4acde6b3225b2d65e (diff)
New upstream version 2.5.0~rc6+repackupstream/2.5.0_rc6+repack
Diffstat (limited to 'widgets')
-rw-r--r--widgets/BandComboBox.cpp27
-rw-r--r--widgets/BandComboBox.hpp16
-rw-r--r--widgets/about.cpp2
-rw-r--r--widgets/astro.cpp6
-rw-r--r--widgets/displaytext.cpp4
-rw-r--r--widgets/mainwindow.cpp492
-rw-r--r--widgets/mainwindow.h6
-rw-r--r--widgets/mainwindow.ui33
-rw-r--r--widgets/plotter.cpp28
-rw-r--r--widgets/plotter.h2
-rw-r--r--widgets/widegraph.cpp11
-rw-r--r--widgets/widegraph.h2
12 files changed, 330 insertions, 299 deletions
diff --git a/widgets/BandComboBox.cpp b/widgets/BandComboBox.cpp
new file mode 100644
index 00000000..0dc8eba6
--- /dev/null
+++ b/widgets/BandComboBox.cpp
@@ -0,0 +1,27 @@
+#include "BandComboBox.hpp"
+
+#include <QAbstractItemView>
+#include <QScrollBar>
+#include <QDebug>
+#include "models/FrequencyList.hpp"
+
+BandComboBox::BandComboBox (QWidget * parent)
+ : QComboBox {parent}
+{
+}
+
+// Fix up broken QComboBox item view rendering which doesn't allow for
+// a vertical scroll bar in width calculations and ends up eliding the
+// item text.
+void BandComboBox::showPopup ()
+{
+ auto minimum_width = view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column);
+ if (count () > maxVisibleItems ())
+ {
+ // for some as yet unknown reason, in FT8 mode the scrollbar
+ // width is oversize on the first call here
+ minimum_width += view ()->verticalScrollBar ()->width ();
+ }
+ view ()->setMinimumWidth (minimum_width);
+ QComboBox::showPopup ();
+}
diff --git a/widgets/BandComboBox.hpp b/widgets/BandComboBox.hpp
new file mode 100644
index 00000000..aaad114c
--- /dev/null
+++ b/widgets/BandComboBox.hpp
@@ -0,0 +1,16 @@
+#ifndef BAND_COMBO_BOX_HPP__
+#define BAND_COMBO_BOX_HPP__
+
+#include <QComboBox>
+
+class BandComboBox
+ : public QComboBox
+{
+public:
+ explicit BandComboBox (QWidget * = nullptr);
+
+private:
+ void showPopup () override;
+};
+
+#endif
diff --git a/widgets/about.cpp b/widgets/about.cpp
index 5ba2003a..7fc55544 100644
--- a/widgets/about.cpp
+++ b/widgets/about.cpp
@@ -19,7 +19,7 @@ CAboutDlg::CAboutDlg(QWidget *parent) :
"WSJT-X implements a number of digital modes designed for <br />"
"weak-signal Amateur Radio communication. <br /><br />"
"&copy; 2001-2021 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />"
- "and Steve Franke, K9AN. <br /><br />"
+ "Steve Franke, K9AN, and Nico Palermo, IV3NWV. <br /><br />"
"We gratefully acknowledge contributions from AC6SL, AE4JY,<br />"
"DF2ET, DJ0OT, G3WDG, G4KLA, IW3RAB, K3WYC, KA1GT,<br />"
"KA6MAL, KA9Q, KB1ZMX, KD6EKQ, KI7MT, KK1D, ND0B, PY2SDR,<br />"
diff --git a/widgets/astro.cpp b/widgets/astro.cpp
index e161199c..6437c072 100644
--- a/widgets/astro.cpp
+++ b/widgets/astro.cpp
@@ -118,8 +118,8 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
&azmoondx, &elmoondx, &ntsky, &m_dop, &m_dop00, &ramoon, &decmoon,
&dgrd, &poloffset, &xnr, &techo, &width1, &width2,
bTx,
- AzElFileName.toLatin1().data(),
- jpleph.toLatin1().data());
+ AzElFileName.toLocal8Bit ().constData (),
+ jpleph.toLocal8Bit ().constData ());
if(!hisgrid.size ()) {
azmoondx=0.0;
@@ -229,7 +229,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
&dgrd, &poloffset, &xnr, &techo, &width1, &width2,
bTx,
nullptr, // don't overwrite azel.dat
- jpleph.toLatin1().data());
+ jpleph.toLocal8Bit ().constData ());
FrequencyDelta offset {0};
switch (m_DopplerMethod)
{
diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp
index 33a6a4e3..d784ead1 100644
--- a/widgets/displaytext.cpp
+++ b/widgets/displaytext.cpp
@@ -453,10 +453,6 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
// if enabled add the DXCC entity and B4 status to the end of the
// preformated text line t1
auto currentMode = mode;
- if ("JT9+JT65" == mode)
- {
- currentMode = decodedText.isJT65 () ? "JT65" : "JT9";
- }
message = appendWorkedB4 (message, decodedText.CQersCall(), dxGrid, &bg, &fg
, logBook, currentBand, currentMode, extra);
}
diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp
index 8fd7fabb..801a051d 100644
--- a/widgets/mainwindow.cpp
+++ b/widgets/mainwindow.cpp
@@ -45,6 +45,7 @@
#include <QRandomGenerator>
#endif
+#include "helper_functions.h"
#include "revision_utils.hpp"
#include "qt_helpers.hpp"
#include "Network/NetworkAccessManager.hpp"
@@ -97,7 +98,8 @@ extern "C" {
void hspec_(short int d2[], int* k, int* nutc0, int* ntrperiod, int* nrxfreq, int* ntol,
bool* bmsk144, bool* btrain, double const pcoeffs[], int* ingain,
- char mycall[], char hiscall[], bool* bshmsg, bool* bswl, char ddir[], float green[],
+ char const * mycall, char const * hiscall, bool* bshmsg, bool* bswl,
+ char const * ddir, float green[],
float s[], int* jh, float *pxmax, float *rmsNoGain, char line[],
fortran_charlen_t, fortran_charlen_t, fortran_charlen_t, fortran_charlen_t);
@@ -149,7 +151,7 @@ extern "C" {
void wspr_downsample_(short int d2[], int* k);
- int savec2_(char* fname, int* TR_seconds, double* dial_freq, fortran_charlen_t);
+ int savec2_(char const * fname, int* TR_seconds, double* dial_freq, fortran_charlen_t);
void avecho_( short id2[], int* dop, int* nfrit, int* nqual, float* f1,
float* level, float* sigdb, float* snr, float* dfreq,
@@ -170,7 +172,7 @@ extern "C" {
void fix_contest_msg_(char* MyGrid, char* msg, fortran_charlen_t, fortran_charlen_t);
- void calibrate_(char data_dir[], int* iz, double* a, double* b, double* rms,
+ void calibrate_(char const * data_dir, int* iz, double* a, double* b, double* rms,
double* sigmaa, double* sigmab, int* irc, fortran_charlen_t);
void foxgen_();
@@ -212,7 +214,7 @@ namespace
// grid exact match excluding RR73
QRegularExpression grid_regexp {"\\A(?![Rr]{2}73)[A-Ra-r]{2}[0-9]{2}([A-Xa-x]{2}){0,1}\\z"};
auto quint32_max = std::numeric_limits<quint32>::max ();
- constexpr int N_WIDGETS {37};
+ constexpr int N_WIDGETS {38};
constexpr int default_rx_audio_buffer_frames {-1}; // lets Qt decide
constexpr int default_tx_audio_buffer_frames {-1}; // lets Qt decide
@@ -274,7 +276,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_freqNominal {0},
m_freqTxNominal {0},
m_reverse_Doppler {"1" == env.value ("WSJT_REVERSE_DOPPLER", "0")},
- m_s6 {0.},
m_tRemaining {0.},
m_TRperiod {60.0},
m_DTtol {3.0},
@@ -293,7 +294,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_idleMinutes {0},
m_nSubMode {0},
m_nclearave {1},
- m_nseq {0},
m_nWSPRdecodes {0},
m_k0 {9999999},
m_nPick {0},
@@ -755,10 +755,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->bandComboBox->setModel (m_config.frequencies ());
ui->bandComboBox->setModelColumn (FrequencyList_v2::frequency_mhz_column);
- // combo box drop down width defaults to the line edit + decorator width,
- // here we change that to the column width size hint of the model column
- ui->bandComboBox->view ()->setMinimumWidth (ui->bandComboBox->view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column));
-
// Enable live band combo box entry validation and action.
auto band_validator = new LiveFrequencyValidator {ui->bandComboBox
, m_config.bands ()
@@ -924,11 +920,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
proc_jt9.start(QDir::toNativeSeparators (m_appDir) + QDir::separator () +
"jt9", jt9_args, QIODevice::ReadWrite | QIODevice::Unbuffered);
- QString fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("wsjtx_wisdom.dat"))};
- QByteArray cfname=fname.toLocal8Bit();
- fftwf_import_wisdom_from_filename(cfname);
+ auto fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("wsjtx_wisdom.dat"))};
+ fftwf_import_wisdom_from_filename (fname.toLocal8Bit ());
- //genStdMsgs(m_rpt);
m_ntx = 6;
ui->txrb6->setChecked(true);
@@ -1008,7 +1002,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_fastGraph->setMode(m_mode);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
connect (&minuteTimer, &QTimer::timeout, this, &MainWindow::on_the_minute);
minuteTimer.setSingleShot (true);
@@ -1031,12 +1024,13 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
void MainWindow::not_GA_warning_message ()
{
+
MessageBox::critical_message (this,
- "This is a pre-release version of WSJT-X 2.4.0 made\n"
+ "This is a pre-release version of WSJT-X 2.5.0 made\n"
"available for testing purposes. By design it will\n"
- "be nonfunctional after May 30, 2021.");
+ "be nonfunctional after Sept 30, 2021.");
auto now = QDateTime::currentDateTimeUtc ();
- if (now >= QDateTime {{2021, 5, 30}, {23, 59, 59, 999}, Qt::UTC}) {
+ if (now >= QDateTime {{2021, 9, 30}, {23, 59, 59, 999}, Qt::UTC}) {
Q_EMIT finished ();
}
}
@@ -1081,9 +1075,8 @@ void MainWindow::on_the_minute ()
MainWindow::~MainWindow()
{
m_astroWidget.reset ();
- QString fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("wsjtx_wisdom.dat"))};
- QByteArray cfname=fname.toLocal8Bit();
- fftwf_export_wisdom_to_filename(cfname);
+ auto fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("wsjtx_wisdom.dat"))};
+ fftwf_export_wisdom_to_filename (fname.toLocal8Bit ());
m_audioThread.quit ();
m_audioThread.wait ();
remove_child_from_event_filter (this);
@@ -1139,7 +1132,6 @@ void MainWindow::writeSettings()
m_settings->beginGroup("Common");
m_settings->setValue("Mode",m_mode);
- m_settings->setValue("ModeTx",m_modeTx);
m_settings->setValue("SaveNone",ui->actionNone->isChecked());
m_settings->setValue("SaveDecoded",ui->actionSave_decoded->isChecked());
m_settings->setValue("SaveAll",ui->actionSave_all->isChecked());
@@ -1174,6 +1166,7 @@ void MainWindow::writeSettings()
m_settings->setValue("NoOwnCall",ui->cbNoOwnCall->isChecked());
m_settings->setValue ("BandHopping", ui->band_hopping_group_box->isChecked ());
m_settings->setValue ("TRPeriod", ui->sbTR->value ());
+ m_settings->setValue ("MaxDrift", ui->sbMaxDrift->value());
m_settings->setValue ("TRPeriod_FST4W", ui->sbTR_FST4W->value ());
m_settings->setValue("FastMode",m_bFastMode);
m_settings->setValue("Fast9",m_bFast9);
@@ -1237,7 +1230,6 @@ void MainWindow::readSettings()
m_settings->beginGroup("Common");
m_mode=m_settings->value("Mode","JT9").toString();
- m_modeTx=m_settings->value("ModeTx","JT9").toString();
ui->actionNone->setChecked(m_settings->value("SaveNone",true).toBool());
ui->actionSave_decoded->setChecked(m_settings->value("SaveDecoded",false).toBool());
ui->actionSave_all->setChecked(m_settings->value("SaveAll",false).toBool());
@@ -1260,6 +1252,7 @@ void MainWindow::readSettings()
m_bFast9=m_settings->value("Fast9",false).toBool();
m_bFastMode=m_settings->value("FastMode",false).toBool();
ui->sbTR->setValue (m_settings->value ("TRPeriod", 15).toInt());
+ ui->sbMaxDrift->setValue (m_settings->value ("MaxDrift",0).toInt());
ui->sbTR_FST4W->setValue (m_settings->value ("TRPeriod_FST4W", 15).toInt());
m_lastMonitoredFrequency = m_settings->value ("DialFreq",
QVariant::fromValue<Frequency> (default_frequency)).value<Frequency> ();
@@ -1434,10 +1427,7 @@ void MainWindow::dataSink(qint64 frames)
static float s[NSMAX];
char line[80];
int k(frames);
- QString fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("refspec.dat"))};
- QByteArray bafname = fname.toLatin1();
- const char *c_fname = bafname.data();
- int len=fname.length();
+ auto fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("refspec.dat")).toLocal8Bit ()};
if(m_diskData) {
dec_data.params.ndiskdat=1;
@@ -1449,7 +1439,7 @@ void MainWindow::dataSink(qint64 frames)
m_bUseRef=m_wideGraph->useRef();
if(!m_diskData) {
refspectrum_(&dec_data.d2[k-m_nsps/2],&m_bClearRefSpec,&m_bRefSpec,
- &m_bUseRef,c_fname,len);
+ &m_bUseRef, fname.constData (), fname.size ());
}
m_bClearRefSpec=false;
@@ -1473,7 +1463,6 @@ void MainWindow::dataSink(qint64 frames)
if(m_mode.startsWith("FST4")) npct=ui->sbNB->value();
symspec_(&dec_data,&k,&m_TRperiod,&nsps,&m_inGain,&bLowSidelobes,&nsmo,&m_px,s,
&m_df3,&m_ihsym,&m_npts8,&m_pxmax,&npct);
- chk_samples_(&m_ihsym,&k,&m_hsymStop);
if(m_mode=="WSPR" or m_mode=="FST4W") wspr_downsample_(dec_data.d2,&k);
if(m_ihsym <=0) return;
if(ui) ui->signal_meter_widget->setValue(m_px,m_pxmax); // Update thermometer
@@ -1585,7 +1574,7 @@ void MainWindow::dataSink(qint64 frames)
{
Q_EMIT reset_audio_input_stream (true); // reports dropped samples
}
- if(!m_diskData and (m_saveAll or m_saveDecoded or m_mode=="WSPR" or m_mode=="FST4W")) {
+ if(!m_diskData and (m_saveAll or m_saveDecoded or m_mode=="WSPR")) {
//Always save unless "Save None"; may delete later
if(m_TRperiod < 60) {
int n=fmod(double(now.time().second()),m_TRperiod);
@@ -1605,14 +1594,11 @@ void MainWindow::dataSink(qint64 frames)
this, m_fnameWE, &dec_data.d2[0], samples, m_config.my_callsign(),
m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid)));
if (m_mode=="WSPR") {
- QString c2name_string {m_fnameWE + ".c2"};
- int len1=c2name_string.length();
- char c2name[80];
- strcpy(c2name,c2name_string.toLatin1 ().constData ());
+ auto c2name {(m_fnameWE + ".c2").toLocal8Bit ()};
int nsec=120;
int nbfo=1500;
double f0m1500=m_freqNominal/1000000.0 + nbfo - 1500;
- int err = savec2_(c2name,&nsec,&f0m1500,len1);
+ int err = savec2_(c2name.constData (),&nsec,&f0m1500, c2name.size ());
if (err!=0) MessageBox::warning_message (this, tr ("Error saving c2 file"), c2name);
}
}
@@ -1728,17 +1714,14 @@ void MainWindow::fastSink(qint64 frames)
// ::memcpy(dec_data.params.hiscall,(Radio::base_callsign (hisCall) + " ").toLatin1 ().constData (), sizeof dec_data.params.hiscall);
::memcpy(dec_data.params.hiscall,(hisCall + " ").toLatin1 ().constData (), sizeof dec_data.params.hiscall);
::memcpy(dec_data.params.mygrid, (m_config.my_grid()+" ").toLatin1(), sizeof dec_data.params.mygrid);
- QString dataDir;
- dataDir = m_config.writeable_data_dir ().absolutePath ();
- char ddir[512];
- ::strncpy(ddir,dataDir.toLatin1(), sizeof (ddir) - 1);
+ auto data_dir {m_config.writeable_data_dir ().absolutePath ().toLocal8Bit ()};
float pxmax = 0;
float rmsNoGain = 0;
int ftol = ui->sbFtol->value ();
hspec_(dec_data.d2,&k,&nutc0,&nTRpDepth,&RxFreq,&ftol,&bmsk144,
&m_bTrain,m_phaseEqCoefficients.constData(),&m_inGain,&dec_data.params.mycall[0],
&dec_data.params.hiscall[0],&bshmsg,&bswl,
- &ddir[0],fast_green,fast_s,&fast_jh,&pxmax,&rmsNoGain,&line[0],12,12,512,80);
+ data_dir.constData (),fast_green,fast_s,&fast_jh,&pxmax,&rmsNoGain,&line[0],12,12,data_dir.size (),80);
float px = fast_green[fast_jh];
QString t;
t = t.asprintf(" Rx noise: %5.1f ",px);
@@ -1898,7 +1881,10 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
ui->actionEnable_AP_JT65->setVisible(false);
ui->actionAuto_Clear_Avg->setVisible(false);
}
- if(m_config.special_op_id()!=nContest0) ui->tx1->setEnabled(true);
+ if(m_config.special_op_id()!=nContest0) {
+ ui->tx1->setEnabled(true);
+ ui->txb1->setEnabled(true);
+ }
chkFT4();
if(SpecOp::EU_VHF==m_config.special_op_id() and m_config.my_grid().size()<6) {
MessageBox::information_message (this,
@@ -2200,17 +2186,13 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
return;
}
break;
- case Qt::Key_Z: //### Recover from hung decode() ?? ###
- if(e->modifiers() & Qt::AltModifier) {
- decodeDone();
- return;
- }
- break; case Qt::Key_PageUp:
-
- break;
- case Qt::Key_PageDown:
- band_changed(m_freqNominal-2000);
- break; }
+ case Qt::Key_X:
+ if(e->modifiers() & Qt::AltModifier) {
+// qDebug() << "Alt-X" << m_mode << m_TRperiod << m_nsps << m_bFast9
+// << tx_duration(m_mode,m_TRperiod,m_nsps,m_bFast9);
+ return;
+ }
+ }
QMainWindow::keyPressEvent (e);
}
@@ -2288,7 +2270,7 @@ void MainWindow::statusChanged()
if (!tmpGrid.size ()) tmpGrid="n/a"; // Not Available
out << qSetRealNumberPrecision (12) << (m_freqNominal / 1.e6)
<< ";" << m_mode << ";" << m_hisCall << ";"
- << ui->rptSpinBox->value() << ";" << m_modeTx << ";" << tmpGrid
+ << ui->rptSpinBox->value() << ";" << m_mode << ";" << tmpGrid
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
<< Qt::endl
#else
@@ -2514,6 +2496,11 @@ void MainWindow::on_actionQSG_Q65_triggered()
QDesktopServices::openUrl (QUrl {"https://physics.princeton.edu/pulsar/k1jt/Q65_Quick_Start.pdf"});
}
+void MainWindow::on_actionQSG_X250_M3_triggered()
+{
+ QDesktopServices::openUrl (QUrl {"https://physics.princeton.edu/pulsar/k1jt/WSJTX_2.5.0_MAP65_3.0_Quick_Start.pdf"});
+}
+
void MainWindow::on_actionOnline_User_Guide_triggered() //Display manual
{
#if defined (CMAKE_BUILD)
@@ -2546,16 +2533,13 @@ void MainWindow::on_actionFast_Graph_triggered()
void MainWindow::on_actionSolve_FreqCal_triggered()
{
- QString dpath{QDir::toNativeSeparators(m_config.writeable_data_dir().absolutePath()+"/")};
- char data_dir[512];
- int len=dpath.length();
+ auto data_dir {QDir::toNativeSeparators(m_config.writeable_data_dir().absolutePath()).toLocal8Bit ()};
int iz,irc;
double a,b,rms,sigmaa,sigmab;
- strncpy(data_dir,dpath.toLatin1(),len);
- calibrate_(data_dir,&iz,&a,&b,&rms,&sigmaa,&sigmab,&irc,len);
+ calibrate_(data_dir.constData (),&iz,&a,&b,&rms,&sigmaa,&sigmab,&irc,data_dir.size ());
QString t2;
- if(irc==-1) t2="Cannot open " + dpath + "fmt.all";
- if(irc==-2) t2="Cannot open " + dpath + "fcal2.out";
+ if(irc==-1) t2="Cannot open " + data_dir + "/fmt.all";
+ if(irc==-2) t2="Cannot open " + data_dir + "/fcal2.out";
if(irc==-3) t2="Insufficient data in fmt.all";
if(irc==-4) t2 = tr ("Invalid data in fmt.all at line %1").arg (iz);
if(irc>0 or rms>1.0) t2="Check fmt.all for possible bad data.";
@@ -3136,7 +3120,6 @@ void MainWindow::decode() //decode()
if(dec_data.params.nutc < m_nutc0) m_RxLog = 1; //Date and Time to file "ALL.TXT".
if(dec_data.params.newdat==1 and !m_diskData) m_nutc0=dec_data.params.nutc;
dec_data.params.ntxmode=9;
- if(m_modeTx=="JT65") dec_data.params.ntxmode=65;
dec_data.params.nmode=9;
if(m_mode=="JT65") dec_data.params.nmode=65;
if(m_mode=="JT65") dec_data.params.ljt65apon = ui->actionEnable_AP_JT65->isVisible () &&
@@ -3157,6 +3140,7 @@ void MainWindow::decode() //decode()
}
if(m_mode=="FST4") dec_data.params.nmode=240;
if(m_mode=="FST4W") dec_data.params.nmode=241;
+ dec_data.params.ntxmode=dec_data.params.nmode; // Is this used any more?
dec_data.params.ntrperiod=m_TRperiod;
dec_data.params.nsubmode=m_nSubMode;
dec_data.params.minw=0;
@@ -3173,6 +3157,7 @@ void MainWindow::decode() //decode()
if(m_config.single_decode()) dec_data.params.nexp_decode += 32;
if(m_config.enable_VHF_features()) dec_data.params.nexp_decode += 64;
if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*(ui->sbNB->value()+3);
+ dec_data.params.max_drift=ui->sbMaxDrift->value();
::memcpy(dec_data.params.datetime, m_dateTime.toLatin1()+" ", sizeof dec_data.params.datetime);
::memcpy(dec_data.params.mycall, (m_config.my_callsign()+" ").toLatin1(), sizeof dec_data.params.mycall);
@@ -3800,42 +3785,14 @@ void MainWindow::guiUpdate()
static char message[38];
static char msgsent[38];
double txDuration;
- QString rt;
if(m_TRperiod==0) m_TRperiod=60.0;
- txDuration=0.0;
- if(m_modeTx=="FT4") txDuration=1.0 + 105*576/12000.0; // FT4
- if(m_modeTx=="FT8") txDuration=1.0 + 79*1920/12000.0; // FT8
- if(m_modeTx=="JT4") txDuration=1.0 + 207.0*2520/11025.0; // JT4
- if(m_modeTx=="JT9") txDuration=1.0 + 85.0*m_nsps/12000.0; // JT9
- if(m_modeTx=="JT65") txDuration=1.0 + 126*4096/11025.0; // JT65
- if(m_modeTx=="Q65") { // Q65
- if(m_TRperiod==15) txDuration=0.5 + 85*1800/12000.0;
- if(m_TRperiod==30) txDuration=0.5 + 85*3600/12000.0;
- if(m_TRperiod==60) txDuration=1.0 + 85*7200/12000.0;
- if(m_TRperiod==120) txDuration=1.0 + 85*16000/12000.0;
- if(m_TRperiod==300) txDuration=1.0 + 85*41472/12000.0;
- }
- if(m_modeTx=="WSPR") txDuration=2.0 + 162*8192/12000.0; // WSPR
- if(m_modeTx=="FST4" or m_mode=="FST4W") { //FST4, FST4W
- if(m_TRperiod==15) txDuration=1.0 + 160*720/12000.0;
- if(m_TRperiod==30) txDuration=1.0 + 160*1680/12000.0;
- if(m_TRperiod==60) txDuration=1.0 + 160*3888/12000.0;
- if(m_TRperiod==120) txDuration=1.0 + 160*8200/12000.0;
- if(m_TRperiod==300) txDuration=1.0 + 160*21504/12000.0;
- if(m_TRperiod==900) txDuration=1.0 + 160*66560/12000.0;
- if(m_TRperiod==1800) txDuration=1.0 + 160*134400/12000.0;
- }
- if(m_mode=="MSK144" or m_bFast9) {
- txDuration=m_TRperiod-0.25; // JT9-fast, MSK144
- }
-
+ txDuration=tx_duration(m_mode,m_TRperiod,m_nsps,m_bFast9);
double tx1=0.0;
double tx2=txDuration;
if(m_mode=="FT8" or m_mode=="FT4") icw[0]=0; //No CW ID in FT4 or FT8 mode
if((icw[0]>0) and (!m_bFast9)) tx2 += icw[0]*2560.0/48000.0; //Full length including CW ID
if(tx2>m_TRperiod) tx2=m_TRperiod;
-
if(!m_txFirst and m_mode!="WSPR" and m_mode!="FST4W") {
tx1 += m_TRperiod;
tx2 += m_TRperiod;
@@ -3845,20 +3802,19 @@ void MainWindow::guiUpdate()
int nsec=ms/1000;
double tsec=0.001*ms;
double t2p=fmod(tsec,2*m_TRperiod);
- m_s6=fmod(tsec,6.0);
- m_nseq = fmod(double(nsec),m_TRperiod);
+ double s6=fmod(tsec,6.0);
+ int nseq = fmod(double(nsec),m_TRperiod);
m_tRemaining=m_TRperiod - fmod(tsec,m_TRperiod);
if(m_mode=="Echo") {
- txDuration=2.4;
tx1=0.0;
tx2=txDuration;
- if(m_auto and m_s6>4.0) m_bEchoTxOK=true;
+ if(m_auto and s6>4.0) m_bEchoTxOK=true;
if(m_transmitting) m_bEchoTxed=true;
}
if(m_mode=="WSPR" or m_mode=="FST4W") {
- if(m_nseq==0 and m_ntr==0) { //Decide whether to Tx or Rx
+ if(nseq==0 and m_ntr==0) { //Decide whether to Tx or Rx
m_tuneup=false; //This is not an ATU tuneup
bool btx = m_auto && m_WSPR_tx_next; // To Tx, we need m_auto and
// scheduled transmit
@@ -3933,7 +3889,7 @@ void MainWindow::guiUpdate()
tx_watchdog (true); // disable transmit
}
- float fTR=float((ms%int(1000.0*m_TRperiod)))/int(1000.0*m_TRperiod);
+ double fTR=float((ms%int(1000.0*m_TRperiod)))/int(1000.0*m_TRperiod);
QString txMsg;
if(m_ntx == 1) txMsg=ui->tx1->text();
@@ -3945,7 +3901,7 @@ void MainWindow::guiUpdate()
int msgLength=txMsg.trimmed().length();
if(msgLength==0 and !m_tune) on_stopTxButton_clicked();
- if(g_iptt==0 and ((m_bTxTime and fTR<0.75 and msgLength>0) or m_tune)) {
+ if(g_iptt==0 and ((m_bTxTime and (fTR < 0.75) and (msgLength>0)) or m_tune)) {
//### Allow late starts
icw[0]=m_ncw;
g_iptt = 1;
@@ -3999,7 +3955,7 @@ void MainWindow::guiUpdate()
}
if((m_mode=="WSPR" or m_mode=="FST4W") and
- ((m_ntr==1 and m_rxDone) or (m_ntr==-1 and m_nseq>tx2))) {
+ ((m_ntr==1 and m_rxDone) or (m_ntr==-1 and nseq>tx2))) {
if(m_monitoring) {
m_rxDone=false;
}
@@ -4057,40 +4013,17 @@ void MainWindow::guiUpdate()
} else {
if(m_QSOProgress==REPORT || m_QSOProgress==ROGER_REPORT) m_bSentReport=true;
if(m_bSentReport and (m_QSOProgress<REPORT or m_QSOProgress>ROGER_REPORT)) m_bSentReport=false;
- if(m_modeTx=="JT4") gen4_(message, &ichk , msgsent, const_cast<int *> (itone),
+ if(m_mode=="JT4") gen4_(message, &ichk , msgsent, const_cast<int *> (itone),
&m_currentMessageType, 22, 22);
- if(m_modeTx=="JT9") gen9_(message, &ichk, msgsent, const_cast<int *> (itone),
+ if(m_mode=="JT9") gen9_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, 22, 22);
- if(m_modeTx=="JT65") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
+ if(m_mode=="JT65") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, 22, 22);
- if(m_modeTx=="Q65") {
- int i3=-1;
- int n3=-1;
- genq65_(message,&ichk,msgsent,const_cast<int *>(itone),&i3,&n3,37,37);
- int nsps=1800;
- if(m_TRperiod==30) nsps=3600;
- if(m_TRperiod==60) nsps=7200;
- if(m_TRperiod==120) nsps=16000;
- if(m_TRperiod==300) nsps=41472;
- int nsps4=4*nsps; //48000 Hz sampling
- int nsym=85;
- float fsample=48000.0;
- int nwave=(nsym+2)*nsps4;
- int icmplx=0;
- int hmod=1;
- float f0=ui->TxFreqSpinBox->value()-m_XIT;
- genwave_(const_cast<int *>(itone),&nsym,&nsps4,&nwave,
- &fsample,&hmod,&f0,&icmplx,foxcom_.wave,foxcom_.wave);
- }
- if(m_modeTx=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
+ if(m_mode=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
22, 22);
- if(m_modeTx=="MSK144" or m_modeTx=="FT8" or m_modeTx=="FT4"
- or m_modeTx=="FST4" or m_modeTx=="FST4W") {
- char MyCall[6];
- char MyGrid[6];
- ::memcpy(MyCall, (m_config.my_callsign()+" ").toLatin1(), sizeof MyCall);
- ::memcpy(MyGrid, (m_config.my_grid()+" ").toLatin1(), sizeof MyGrid);
- if(m_modeTx=="MSK144") {
+ if(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4"
+ or m_mode=="FST4" or m_mode=="FST4W" || "Q65" == m_mode) {
+ if(m_mode=="MSK144") {
genmsk_128_90_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, 37, 37);
if(m_restart) {
@@ -4100,7 +4033,7 @@ void MainWindow::guiUpdate()
}
}
- if(m_modeTx=="FT8") {
+ if(m_mode=="FT8") {
if(SpecOp::FOX==m_config.special_op_id() and ui->tabWidget->currentIndex()==1) {
foxTxSequencer();
} else {
@@ -4131,7 +4064,7 @@ void MainWindow::guiUpdate()
}
}
}
- if(m_modeTx=="FT4") {
+ if(m_mode=="FT4") {
int ichk=0;
char ft4msgbits[77];
genft4_(message, &ichk, msgsent, const_cast<char *> (ft4msgbits),
@@ -4145,7 +4078,7 @@ void MainWindow::guiUpdate()
gen_ft4wave_(const_cast<int *>(itone),&nsym,&nsps,&fsample,&f0,foxcom_.wave,
foxcom_.wave,&icmplx,&nwave);
}
- if(m_modeTx=="FST4" or m_modeTx=="FST4W") {
+ if(m_mode=="FST4" or m_mode=="FST4W") {
int ichk=0;
int iwspr=0;
char fst4msgbits[101];
@@ -4181,6 +4114,25 @@ void MainWindow::guiUpdate()
QString t = QString::fromStdString(message).trimmed();
}
+ if(m_mode=="Q65") {
+ int i3=-1;
+ int n3=-1;
+ genq65_(message,&ichk,msgsent,const_cast<int *>(itone),&i3,&n3,37,37);
+ int nsps=1800;
+ if(m_TRperiod==30) nsps=3600;
+ if(m_TRperiod==60) nsps=7200;
+ if(m_TRperiod==120) nsps=16000;
+ if(m_TRperiod==300) nsps=41472;
+ int nsps4=4*nsps; //48000 Hz sampling
+ int nsym=85;
+ float fsample=48000.0;
+ int nwave=(nsym+2)*nsps4;
+ int icmplx=0;
+ int hmod=1;
+ float f0=ui->TxFreqSpinBox->value()-m_XIT;
+ genwave_(const_cast<int *>(itone),&nsym,&nsps4,&nwave,
+ &fsample,&hmod,&f0,&icmplx,foxcom_.wave,foxcom_.wave);
+ }
if(SpecOp::EU_VHF==m_config.special_op_id()) {
if(m_ntx==2) m_xSent=ui->tx2->text().right(13);
@@ -4223,7 +4175,7 @@ void MainWindow::guiUpdate()
if(m_restart) {
write_all("Tx",m_currentMessage);
if (m_config.TX_messages ()) {
- ui->decodedTextBrowser2->displayTransmittedText(m_currentMessage.trimmed(),m_modeTx,
+ ui->decodedTextBrowser2->displayTransmittedText(m_currentMessage.trimmed(),m_mode,
ui->TxFreqSpinBox->value(),m_bFastMode,m_TRperiod);
}
}
@@ -4250,9 +4202,13 @@ void MainWindow::guiUpdate()
{
logQSOTimer.start(0);
}
+ else
+ {
+ cease_auto_Tx_after_QSO ();
+ }
}
- bool b=(m_mode=="FT8" or m_mode=="FT4") 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!="") {
@@ -4307,6 +4263,7 @@ void MainWindow::guiUpdate()
m_sentFirst73 = false;
}
}
+
if (g_iptt == 1 && m_iptt0 == 0) {
auto const& current_message = QString::fromLatin1 (msgsent);
if(m_config.watchdog () && m_mode!="WSPR" && m_mode!="FST4W"
@@ -4321,7 +4278,7 @@ void MainWindow::guiUpdate()
if (m_config.TX_messages () && !m_tune && SpecOp::FOX!=m_config.special_op_id())
{
ui->decodedTextBrowser2->displayTransmittedText(current_message.trimmed(),
- m_modeTx,ui->TxFreqSpinBox->value(),m_bFastMode,m_TRperiod);
+ m_mode,ui->TxFreqSpinBox->value(),m_bFastMode,m_TRperiod);
}
}
@@ -4339,15 +4296,14 @@ void MainWindow::guiUpdate()
transmitDisplay (true);
statusUpdate ();
}
- if(!m_btxok && m_btxok0 && g_iptt==1)
- {
- stopTx();
- if ("1" == m_env.value ("WSJT_TX_BOTH", "0"))
- {
- m_txFirst = !m_txFirst;
- ui->txFirstCheckBox->setChecked (m_txFirst);
- }
+
+ if(!m_btxok && m_btxok0 && g_iptt==1) {
+ stopTx();
+ if ("1" == m_env.value ("WSJT_TX_BOTH", "0")) {
+ m_txFirst = !m_txFirst;
+ ui->txFirstCheckBox->setChecked (m_txFirst);
}
+ }
if(m_startAnother) {
if(m_mode=="MSK144") {
@@ -4360,17 +4316,17 @@ void MainWindow::guiUpdate()
}
}
- if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4") {
- if(ui->txrb1->isEnabled() and
- (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()) ) {
+ if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4" || "Q65" == m_mode) {
+ if(ui->txrb1->isEnabled() and
+ (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()) ) {
//We're in a contest-like mode other than EU_VHF: start QSO with Tx2.
ui->tx1->setEnabled(false);
ui->txb1->setEnabled(false);
}
- if(!ui->tx1->isEnabled() and SpecOp::EU_VHF==m_config.special_op_id()) {
+ if(!ui->tx1->isEnabled() and SpecOp::EU_VHF==m_config.special_op_id()) {
//We're in EU_VHF mode: start QSO with Tx1.
ui->tx1->setEnabled(true);
ui->txb1->setEnabled(true);
@@ -4380,6 +4336,7 @@ void MainWindow::guiUpdate()
//Once per second (onesec)
if(nsec != m_sec0) {
// qDebug() << "AAA" << nsec;
+
if(m_mode=="FST4") chk_FST4_freq_range();
m_currentBand=m_config.bands()->find(m_freqNominal);
if( SpecOp::HOUND == m_config.special_op_id() ) {
@@ -4392,7 +4349,7 @@ void MainWindow::guiUpdate()
progressBar.setFormat ("%v/%m");
if(m_auto and m_mode=="Echo" and m_bEchoTxOK) {
progressBar.setMaximum(3);
- progressBar.setValue(int(m_s6));
+ progressBar.setValue(int(s6));
}
if(m_mode!="Echo") {
if(m_monitoring or m_transmitting) {
@@ -4883,8 +4840,8 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
return;
}
- if ((message.isJT9 () and m_modeTx != "JT9" and m_mode != "JT4") or
- (message.isJT65 () and m_modeTx != "JT65" and m_mode != "JT4")) {
+ if ((message.isJT9 () and m_mode != "JT9" and m_mode != "JT4") or
+ (message.isJT65 () and m_mode != "JT65" and m_mode != "JT4")) {
// We are not allowing mode change, so don't process decode
return;
}
@@ -4975,12 +4932,13 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
return;
}
+ bool bContestOK=(m_mode=="FT4" or m_mode=="FT8" or m_mode=="Q65" or m_mode=="MSK144");
if(message_words.size () > 3 // enough fields for a normal message
&& (message_words.at(1).contains(m_baseCall) || "DE" == message_words.at(1))
&& (message_words.at(2).contains(qso_partner_base_call) or m_bDoubleClicked
or bEU_VHF_w2 or (m_QSOProgress==CALLING))) {
if(message_words.at(3).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()){
+ if((SpecOp::NA_VHF==m_config.special_op_id() or SpecOp::WW_DIGI==m_config.special_op_id()) and bContestOK){
setTxMsg(3);
m_QSOProgress=ROGER_REPORT;
} else {
@@ -5035,7 +4993,12 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
m_nextCall=""; //### Temporary: disable use of "TU;" message
if(SpecOp::RTTY == m_config.special_op_id() and m_nextCall!="") {
// We're in RTTY contest and have "nextCall" queued up: send a "TU; ..." message
- logQSOTimer.start(0);
+ if (m_config.prompt_to_log() || m_config.autoLog()) {
+ logQSOTimer.start(0);
+ }
+ else {
+ cease_auto_Tx_after_QSO ();
+ }
ui->tx3->setText(ui->tx3->text().remove("TU; "));
useNextCall();
QString t="TU; " + ui->tx3->text();
@@ -5046,7 +5009,12 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
&& SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()
&& ("RR73" == word_3 || 73 == word_3_as_number))
{
- logQSOTimer.start(0);
+ if (m_config.prompt_to_log() || m_config.autoLog()) {
+ logQSOTimer.start(0);
+ }
+ else {
+ cease_auto_Tx_after_QSO ();
+ }
m_ntx=6;
ui->txrb6->setChecked(true);
}
@@ -5064,7 +5032,12 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
}
else if (ROGERS == m_QSOProgress)
{
- logQSOTimer.start(0);
+ if (m_config.prompt_to_log() || m_config.autoLog()) {
+ logQSOTimer.start(0);
+ }
+ else {
+ cease_auto_Tx_after_QSO ();
+ }
m_ntx=6;
ui->txrb6->setChecked(true);
}
@@ -5088,7 +5061,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
}
} else if((m_QSOProgress >= REPORT
|| (m_QSOProgress >= REPLYING &&
- (m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4")))
+ (m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4" || "Q65" == m_mode)))
&& word_3.startsWith ('R')) {
m_ntx=4;
m_QSOProgress = ROGERS;
@@ -5272,27 +5245,32 @@ void MainWindow::setTxMsg(int n)
void MainWindow::genCQMsg ()
{
- if(m_config.my_callsign().size () && m_config.my_grid().size ()) {
- QString grid{m_config.my_grid()};
+ auto const& my_callsign = m_config.my_callsign ();
+ auto is_compound = my_callsign != m_baseCall;
+ auto is_type_two = !is77BitMode () && is_compound && stdCall (m_baseCall) && !shortList (my_callsign);
+ if(my_callsign.size () && m_config.my_grid().size ()) {
+ auto const& grid = m_config.my_grid ();
if (ui->cbCQTx->isEnabled () && ui->cbCQTx->isVisible () && ui->cbCQTx->isChecked ()) {
- if(stdCall(m_config.my_callsign())) {
+ if(stdCall (my_callsign)
+ || is_type_two) {
msgtype (QString {"CQ %1 %2 %3"}
.arg (m_freqNominal / 1000 - m_freqNominal / 1000000 * 1000, 3, 10, QChar {'0'})
- .arg (m_config.my_callsign())
+ .arg (my_callsign)
.arg (grid.left (4)),
ui->tx6);
} else {
msgtype (QString {"CQ %1 %2"}
.arg (m_freqNominal / 1000 - m_freqNominal / 1000000 * 1000, 3, 10, QChar {'0'})
- .arg (m_config.my_callsign()),
+ .arg (my_callsign),
ui->tx6);
}
} else {
- if(stdCall(m_config.my_callsign())) {
- msgtype (QString {"%1 %2 %3"}.arg(m_CQtype).arg(m_config.my_callsign())
+ if (stdCall (my_callsign)
+ || is_type_two) {
+ msgtype (QString {"%1 %2 %3"}.arg(m_CQtype).arg(my_callsign)
.arg(grid.left(4)),ui->tx6);
} else {
- msgtype (QString {"%1 %2"}.arg(m_CQtype).arg(m_config.my_callsign()),ui->tx6);
+ msgtype (QString {"%1 %2"}.arg(m_CQtype).arg(my_callsign),ui->tx6);
}
}
if ((m_mode=="JT4" or m_mode=="Q65") and ui->cbShMsgs->isChecked()) {
@@ -5305,17 +5283,17 @@ void MainWindow::genCQMsg ()
QString t=ui->tx6->text();
QStringList tlist=t.split(" ");
- if((m_mode=="FT4" or m_mode=="FT8" or m_mode=="MSK144") and
+ if((m_mode=="FT4" or m_mode=="FT8" or m_mode=="MSK144" || "Q65" == m_mode) and
SpecOp::NONE != m_config.special_op_id() and
- ( tlist.at(1)==m_config.my_callsign() or
- tlist.at(2)==m_config.my_callsign() ) and
- stdCall(m_config.my_callsign())) {
+ ( tlist.at(1)==my_callsign or
+ tlist.at(2)==my_callsign ) and
+ stdCall(my_callsign)) {
if(SpecOp::NA_VHF == m_config.special_op_id()) m_cqStr="TEST";
if(SpecOp::EU_VHF == m_config.special_op_id()) m_cqStr="TEST";
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( tlist.at(1)==m_config.my_callsign() ) {
+ if( tlist.at(1)==my_callsign ) {
t="CQ " + m_cqStr + " " + tlist.at(1) + " " + tlist.at(2);
} else {
t="CQ " + m_cqStr + " " + tlist.at(2) + " " + tlist.at(3);
@@ -5348,6 +5326,12 @@ bool MainWindow::stdCall(QString const& w)
return standard_call_re.match (w).hasMatch ();
}
+bool MainWindow::is77BitMode () const
+{
+ return "FT8" == m_mode || "FT4" == m_mode || "MSK144" == m_mode
+ || "FST4" == m_mode || "Q65" == m_mode;
+}
+
void MainWindow::genStdMsgs(QString rpt, bool unconditional)
{
genCQMsg ();
@@ -5364,7 +5348,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
}
auto const& my_callsign = m_config.my_callsign ();
auto is_compound = my_callsign != m_baseCall;
- auto is_type_one = is_compound && shortList (my_callsign);
+ auto is_type_one = !is77BitMode () && is_compound && shortList (my_callsign);
auto const& my_grid = m_config.my_grid ().left (4);
auto const& hisBase = Radio::base_callsign (hisCall);
auto eme_short_codes = m_config.enable_VHF_features () && ui->cbShMsgs->isChecked ()
@@ -5377,7 +5361,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
QString t0s=hisCall + " " + my_callsign + " ";
QString t0a,t0b;
- if(bHisCall and bMyCall) t0=hisCall + " " + my_callsign + " ";
+ if (is77BitMode () && bHisCall && bMyCall) t0=hisCall + " " + my_callsign + " ";
t0a="<"+hisCall + "> " + my_callsign + " ";
t0b=hisCall + " <" + my_callsign + "> ";
@@ -5395,7 +5379,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
int n=rpt.toInt();
rpt = rpt.asprintf("%+2.2d",n);
- if(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4" || m_mode=="FST4") {
+ if (is77BitMode ()) {
QString t2,t3;
QString sent=rpt;
QString rs,rst;
@@ -5459,8 +5443,8 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
}
}
- if((m_mode!="MSK144" and m_mode!="FT8" and m_mode!="FT4" && m_mode != "FST4")) {
- t=t00 + rpt;
+ if (!is77BitMode ()) {
+ t=(is_type_one ? t0 : t00) + rpt;
msgtype(t, ui->tx2);
t=t0 + "R" + rpt;
msgtype(t, ui->tx3);
@@ -5499,7 +5483,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
}
}
- if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="MSK144" || m_mode == "FST4") return;
+ if (is77BitMode ()) return;
if (is_compound) {
if (is_type_one) {
@@ -5512,8 +5496,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
case Configuration::type_2_msg_1_full:
msgtype(t + my_grid, ui->tx1);
if (!eme_short_codes) {
- if((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4" || m_mode == "FST4") &&
- SpecOp::NA_VHF == m_config.special_op_id()) {
+ if(is77BitMode () && SpecOp::NA_VHF == m_config.special_op_id()) {
msgtype(t + "R " + my_grid, ui->tx3); // #### Unreachable code
} else {
msgtype(t + "R" + rpt, ui->tx3);
@@ -5525,8 +5508,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
break;
case Configuration::type_2_msg_3_full:
- if ((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4" || m_mode == "FST4") &&
- SpecOp::NA_VHF == m_config.special_op_id()) {
+ if (is77BitMode () && SpecOp::NA_VHF == m_config.special_op_id()) {
msgtype(t + "R " + my_grid, ui->tx3);
msgtype(t + "RRR", ui->tx4);
} else {
@@ -5541,8 +5523,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
case Configuration::type_2_msg_5_only:
msgtype(t00 + my_grid, ui->tx1);
if (!eme_short_codes) {
- if ((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4" || m_mode == "FST4") &&
- SpecOp::NA_VHF == m_config.special_op_id()) {
+ if (is77BitMode () && SpecOp::NA_VHF == m_config.special_op_id()) {
msgtype(t + "R " + my_grid, ui->tx3); // #### Unreachable code
msgtype(t + "RRR", ui->tx4);
} else {
@@ -5577,7 +5558,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
}
}
m_rpt=rpt;
- if(SpecOp::HOUND == m_config.special_op_id() and is_compound) ui->tx1->setText("DE " + m_config.my_callsign());
+ if(SpecOp::HOUND == m_config.special_op_id() and is_compound) ui->tx1->setText("DE " + my_callsign);
}
void MainWindow::TxAgain()
@@ -5629,8 +5610,8 @@ void MainWindow::lookup()
break;
}
QString t=QString(c);
- if(t.indexOf(hisCall)==0) {
- int i1=t.indexOf(",");
+ int i1=t.indexOf(",");
+ if(t.left(i1)==hisCall) {
QString hisgrid=t.mid(i1+1,6);
i1=hisgrid.indexOf(",");
if(i1>0) {
@@ -5760,7 +5741,7 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
//### Check this stuff ###
if(itype==7 and m_config.enable_VHF_features() and m_mode=="JT65") shortMsg=true;
if(m_mode=="MSK144" and t.mid(0,1)=="<") text=false;
- if((m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4") and
+ if((m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4" || "Q65" == m_mode) and
SpecOp::NA_VHF==m_config.special_op_id()) {
int i0=t.trimmed().length()-7;
if(t.mid(i0,3)==" R ") text=false;
@@ -5890,7 +5871,7 @@ void MainWindow::on_genStdMsgsPushButton_clicked() //genStdMsgs button
genStdMsgs(m_rpt);
}
-void MainWindow::on_logQSOButton_clicked() //Log QSO button
+void MainWindow::cease_auto_Tx_after_QSO ()
{
if (SpecOp::FOX != m_config.special_op_id ()
&& ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked ())
@@ -5900,6 +5881,11 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
// to be a robot.
auto_tx_mode (false);
}
+}
+
+void MainWindow::on_logQSOButton_clicked() //Log QSO button
+{
+ cease_auto_Tx_after_QSO ();
if (!m_hisCall.size ()) {
MessageBox::warning_message (this, tr ("Warning: DX Call field is empty."));
@@ -5941,7 +5927,7 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
default: break;
}
- m_logDlg->initLogQSO (m_hisCall, grid, m_modeTx, m_rptSent, m_rptRcvd,
+ m_logDlg->initLogQSO (m_hisCall, grid, m_mode, m_rptSent, m_rptRcvd,
m_dateTimeQSOOn, dateTimeQSOOff, m_freqNominal +
ui->TxFreqSpinBox->value(), m_noSuffix, m_xSent, m_xRcvd);
m_inQSOwith="";
@@ -6059,11 +6045,12 @@ void MainWindow::displayWidgets(qint64 n)
}
if(i==35) ui->sbF_High->setVisible(b);
if(i==36) ui->actionAuto_Clear_Avg->setVisible (b);
+ if(i==37) ui->sbMaxDrift->setVisible(b);
j=j>>1;
}
ui->pbBestSP->setVisible(m_mode=="FT4");
b=false;
- if(m_mode=="FT4" or m_mode=="FT8") {
+ if(m_mode=="FT4" or m_mode=="FT8" || "Q65" == m_mode) {
b=SpecOp::EU_VHF==m_config.special_op_id() or
( SpecOp::RTTY==m_config.special_op_id() and
(m_config.RTTY_Exchange()=="DX" or m_config.RTTY_Exchange()=="#") );
@@ -6079,7 +6066,7 @@ void MainWindow::displayWidgets(qint64 n)
void MainWindow::on_actionFST4_triggered()
{
m_mode="FST4";
- m_modeTx="FST4";
+ m_mode="FST4";
ui->actionFST4->setChecked(true);
m_bFast9=false;
m_bFastMode=false;
@@ -6092,18 +6079,17 @@ void MainWindow::on_actionFST4_triggered()
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
WSPR_config(false);
if(m_config.single_decode()) {
-// 0123456789012345678901234567890123456
- displayWidgets(nWidgets("1111110001001110000100000001000000000"));
+// 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11111100010011100001000000010000000000"));
m_wideGraph->setSingleDecode(true);
} else {
- displayWidgets(nWidgets("1110110001001110000100000001000000110"));
+ displayWidgets(nWidgets("11101100010011100001000000010000001100"));
m_wideGraph->setSingleDecode(false);
ui->sbFtol->setValue(20);
}
setup_status_bar(false);
ui->cbAutoSeq->setChecked(true);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
m_wideGraph->setPeriod(m_TRperiod,6912);
m_wideGraph->setRxFreq(ui->RxFreqSpinBox->value());
m_wideGraph->setTol(ui->sbFtol->value());
@@ -6122,7 +6108,6 @@ void MainWindow::on_actionFST4_triggered()
void MainWindow::on_actionFST4W_triggered()
{
m_mode="FST4W";
- m_modeTx="FST4W";
ui->actionFST4W->setChecked(true);
m_bFast9=false;
m_bFastMode=false;
@@ -6132,8 +6117,8 @@ void MainWindow::on_actionFST4W_triggered()
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize(m_FFTSize);
WSPR_config(true);
-// 0123456789012345678901234567890123456
- displayWidgets(nWidgets("0000000000000000010100000000000001000"));
+// 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("00000000000000000101000000000000010000"));
setup_status_bar(false);
ui->band_hopping_group_box->setChecked(false);
ui->band_hopping_group_box->setVisible(false);
@@ -6141,7 +6126,6 @@ void MainWindow::on_actionFST4W_triggered()
ui->WSPRfreqSpinBox->setMinimum(100);
ui->WSPRfreqSpinBox->setMaximum(5000);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
m_wideGraph->setPeriod(m_TRperiod,6912);
m_wideGraph->setTxFreq(ui->WSPRfreqSpinBox->value());
m_wideGraph->setRxFreq(ui->sbFST4W_RxFreq->value());
@@ -6154,7 +6138,6 @@ void MainWindow::on_actionFST4W_triggered()
void MainWindow::on_actionFT4_triggered()
{
m_mode="FT4";
- m_modeTx="FT4";
m_TRperiod=7.5;
bool bVHF=m_config.enable_VHF_features();
m_bFast9=false;
@@ -6169,7 +6152,6 @@ void MainWindow::on_actionFT4_triggered()
m_toneSpacing=12000.0/576.0;
ui->actionFT4->setChecked(true);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
m_send_RR73=true;
VHF_features_enabled(bVHF);
m_fastGraph->hide();
@@ -6181,7 +6163,8 @@ void MainWindow::on_actionFT4_triggered()
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
ui->lh_decodes_headings_label->setText( " UTC dB DT Freq " + tr ("Message"));
- displayWidgets(nWidgets("1110100001001110000100000001100010000"));
+// 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11101000010011100001000000011000100000"));
ui->txrb2->setEnabled(true);
ui->txrb4->setEnabled(true);
ui->txrb5->setEnabled(true);
@@ -6203,7 +6186,6 @@ void MainWindow::on_actionFT8_triggered()
m_bFastMode=false;
WSPR_config(false);
switch_mode (Modes::FT8);
- m_modeTx="FT8";
m_nsps=6912;
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize (m_FFTSize);
@@ -6212,7 +6194,6 @@ void MainWindow::on_actionFT8_triggered()
m_toneSpacing=0.0; //???
ui->actionFT8->setChecked(true); //???
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
VHF_features_enabled(bVHF);
ui->cbAutoSeq->setChecked(true);
m_TRperiod=15.0;
@@ -6230,7 +6211,8 @@ void MainWindow::on_actionFT8_triggered()
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
ui->lh_decodes_headings_label->setText( " UTC dB DT Freq " + tr ("Message"));
}
- displayWidgets(nWidgets("1110100001001110000100001001100010000"));
+// 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11101000010011100001000010011000100000"));
ui->txrb2->setEnabled(true);
ui->txrb4->setEnabled(true);
ui->txrb5->setEnabled(true);
@@ -6248,7 +6230,8 @@ void MainWindow::on_actionFT8_triggered()
ui->cbAutoSeq->setEnabled(false);
ui->tabWidget->setCurrentIndex(1);
ui->TxFreqSpinBox->setValue(300);
- displayWidgets(nWidgets("1110100001001110000100000000001000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11101000010011100001000000000010000000"));
ui->labDXped->setText(tr ("Fox"));
on_fox_log_action_triggered();
}
@@ -6258,7 +6241,8 @@ void MainWindow::on_actionFT8_triggered()
ui->cbAutoSeq->setEnabled(false);
ui->tabWidget->setCurrentIndex(0);
ui->cbHoldTxFreq->setChecked(true);
- displayWidgets(nWidgets("1110100001001100000100000000001100000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11101000010011000001000000000011000000"));
ui->labDXped->setText(tr ("Hound"));
ui->txrb1->setChecked(true);
ui->txrb2->setEnabled(false);
@@ -6304,7 +6288,6 @@ void MainWindow::on_actionJT4_triggered()
bool bVHF=m_config.enable_VHF_features();
WSPR_config(false);
switch_mode (Modes::JT4);
- m_modeTx="JT4";
m_TRperiod=60.0;
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
@@ -6318,7 +6301,6 @@ void MainWindow::on_actionJT4_triggered()
VHF_features_enabled(true);
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
m_bFastMode=false;
m_bFast9=false;
setup_status_bar (bVHF);
@@ -6333,9 +6315,10 @@ void MainWindow::on_actionJT4_triggered()
ui->sbSubmode->setValue(0);
}
if(bVHF) {
- displayWidgets(nWidgets("1111100100101101101111000000000000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11111001001011011011110000000000000000"));
} else {
- displayWidgets(nWidgets("1110100000001100001100000000000000000"));
+ displayWidgets(nWidgets("11101000000011000011000000000000000000"));
}
fast_config(false);
statusChanged();
@@ -6349,7 +6332,6 @@ void MainWindow::on_actionJT9_triggered()
m_bFastMode=m_bFast9;
WSPR_config(false);
switch_mode (Modes::JT9);
- m_modeTx="JT9";
m_nsps=6912;
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize (m_FFTSize);
@@ -6359,7 +6341,6 @@ void MainWindow::on_actionJT9_triggered()
m_toneSpacing=0.0;
ui->actionJT9->setChecked(true);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
VHF_features_enabled(bVHF);
if(m_nSubMode>=4 and bVHF) {
ui->cbFast9->setEnabled(true);
@@ -6392,9 +6373,10 @@ void MainWindow::on_actionJT9_triggered()
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
if(bVHF) {
- displayWidgets(nWidgets("1111101010001111100100000000000000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11111010100011111001000000000000000000"));
} else {
- displayWidgets(nWidgets("1110100000001110000100000000000010000"));
+ displayWidgets(nWidgets("11101000000011100001000000000000100000"));
}
fast_config(m_bFastMode);
ui->cbAutoSeq->setVisible(m_bFast9);
@@ -6405,7 +6387,6 @@ void MainWindow::on_actionJT65_triggered()
{
on_actionJT9_triggered();
m_mode="JT65";
- m_modeTx="JT65";
bool bVHF=m_config.enable_VHF_features();
WSPR_config(false);
switch_mode (Modes::JT65);
@@ -6422,7 +6403,6 @@ void MainWindow::on_actionJT65_triggered()
VHF_features_enabled(bVHF);
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
m_wideGraph->setRxFreq(ui->RxFreqSpinBox->value());
m_wideGraph->setTol(ui->sbFtol->value());
m_wideGraph->setTxFreq(ui->TxFreqSpinBox->value());
@@ -6440,9 +6420,10 @@ void MainWindow::on_actionJT65_triggered()
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
}
if(bVHF) {
- displayWidgets(nWidgets("1111100100001101101011000100000000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11111001000011011010110001000000000000"));
} else {
- displayWidgets(nWidgets("1110100000001110000100000000000010000"));
+ displayWidgets(nWidgets("11101000000011100001000000000000100000"));
}
fast_config(false);
if(ui->cbShMsgs->isChecked()) {
@@ -6455,12 +6436,12 @@ void MainWindow::on_actionJT65_triggered()
void MainWindow::on_actionQ65_triggered()
{
m_mode="Q65";
- m_modeTx="Q65";
ui->actionQ65->setChecked(true);
switch_mode(Modes::Q65);
fast_config(false);
WSPR_config(false);
setup_status_bar(true);
+ ui->actionQuickDecode->setChecked(true);
m_nsps=6912; //For symspec only
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize(m_FFTSize);
@@ -6471,27 +6452,36 @@ void MainWindow::on_actionQ65_triggered()
QString fname {QDir::toNativeSeparators(m_config.temp_dir().absoluteFilePath ("red.dat"))};
m_wideGraph->setRedFile(fname);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
m_wideGraph->setPeriod(m_TRperiod,6912);
m_wideGraph->setTol(ui->sbFtol->value());
m_wideGraph->setRxFreq(ui->RxFreqSpinBox->value());
m_wideGraph->setTxFreq(ui->TxFreqSpinBox->value());
switch_mode (Modes::Q65);
-// 0123456789012345678901234567890123456
- displayWidgets(nWidgets("1111110101101101001110000001000000001"));
+// 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("11111101011011010011100000010000000011"));
ui->labDXped->setText("");
ui->lh_decodes_title_label->setText(tr ("Single-Period Decodes"));
ui->rh_decodes_title_label->setText(tr ("Average Decodes"));
ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
statusChanged();
- if(SpecOp::NONE < m_config.special_op_id()) {
- ui->labDXped->setVisible(true);
- ui->labDXped->setText("Contest ?");
- } else {
- ui->labDXped->setVisible(false);
- ui->labDXped->setText("");
+
+ 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(t0=="") {
+ ui->labDXped->setVisible(false);
+ } else {
+ ui->labDXped->setVisible(true);
+ ui->labDXped->setText(t0);
+ }
+ on_contest_log_action_triggered();
}
+
}
void MainWindow::on_actionMSK144_triggered()
@@ -6515,7 +6505,6 @@ void MainWindow::on_actionMSK144_triggered()
return;
}
m_mode="MSK144";
- m_modeTx="MSK144";
ui->actionMSK144->setChecked(true);
switch_mode (Modes::MSK144);
m_nsps=6;
@@ -6549,7 +6538,8 @@ void MainWindow::on_actionMSK144_triggered()
ui->rptSpinBox->setValue(0);
ui->rptSpinBox->setSingleStep(1);
ui->sbFtol->values ({20, 50, 100, 200});
- displayWidgets(nWidgets("1011111101000000000100010000100000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("10111111010000000001000100001000000000"));
fast_config(m_bFastMode);
statusChanged();
@@ -6570,7 +6560,6 @@ void MainWindow::on_actionWSPR_triggered()
m_mode="WSPR";
WSPR_config(true);
switch_mode (Modes::WSPR);
- m_modeTx="WSPR";
m_TRperiod=120.0;
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
@@ -6586,11 +6575,11 @@ void MainWindow::on_actionWSPR_triggered()
ui->WSPRfreqSpinBox->setMaximum(1600);
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
m_bFastMode=false;
m_bFast9=false;
ui->TxFreqSpinBox->setValue(ui->WSPRfreqSpinBox->value());
- displayWidgets(nWidgets("0000000000000000010100000000000000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("00000000000000000101000000000000000000"));
fast_config(false);
statusChanged();
}
@@ -6609,10 +6598,8 @@ void MainWindow::on_actionEcho_triggered()
m_hsymStop=9;
m_toneSpacing=1.0;
switch_mode(Modes::Echo);
- m_modeTx="Echo";
setup_status_bar (true);
m_wideGraph->setMode(m_mode);
- m_wideGraph->setModeTx(m_modeTx);
ui->TxFreqSpinBox->setValue(1500);
ui->TxFreqSpinBox->setEnabled (false);
if(!m_echoGraph->isVisible()) m_echoGraph->show();
@@ -6623,7 +6610,8 @@ void MainWindow::on_actionEcho_triggered()
m_bFast9=false;
WSPR_config(true);
ui->lh_decodes_headings_label->setText(" UTC N Level Sig DF Width Q");
- displayWidgets(nWidgets("0000000000000000000000100000000000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("00000000000000000000001000000000000000"));
fast_config(false);
statusChanged();
}
@@ -6649,7 +6637,8 @@ void MainWindow::on_actionFreqCal_triggered()
// 18:15:47 0 1 1500 1550.349 0.100 3.5 10.2
ui->lh_decodes_headings_label->setText(" UTC Freq CAL Offset fMeas DF Level S/N");
ui->measure_check_box->setChecked (false);
- displayWidgets(nWidgets("0011010000000000000000000000010000000"));
+ // 01234567890123456789012345678901234567
+ displayWidgets(nWidgets("00110100000000000000000000000100000000"));
statusChanged();
}
@@ -7296,7 +7285,7 @@ void MainWindow::rigFailure (QString const& reason)
void MainWindow::transmit (double snr)
{
double toneSpacing=0.0;
- if (m_modeTx == "JT65") {
+ if (m_mode == "JT65") {
if(m_nSubMode==0) toneSpacing=11025.0/4096.0;
if(m_nSubMode==1) toneSpacing=2*11025.0/4096.0;
if(m_nSubMode==2) toneSpacing=4*11025.0/4096.0;
@@ -7306,7 +7295,7 @@ void MainWindow::transmit (double snr)
true, false, snr, m_TRperiod);
}
- if (m_modeTx == "FT8") {
+ if (m_mode == "FT8") {
// toneSpacing=12000.0/1920.0;
toneSpacing=-3;
if(m_config.x2ToneSpacing()) toneSpacing=2*12000.0/1920.0;
@@ -7318,7 +7307,7 @@ void MainWindow::transmit (double snr)
true, false, snr, m_TRperiod);
}
- if (m_modeTx == "FT4") {
+ if (m_mode == "FT4") {
m_dateTimeSentTx3=QDateTime::currentDateTimeUtc();
toneSpacing=-2.0; //Transmit a pre-computed, filtered waveform.
Q_EMIT sendMessage (m_mode, NUM_FT4_SYMBOLS,
@@ -7327,7 +7316,7 @@ void MainWindow::transmit (double snr)
true, false, snr, m_TRperiod);
}
- if (m_modeTx == "FST4" or m_modeTx == "FST4W") {
+ if (m_mode == "FST4" or m_mode == "FST4W") {
m_dateTimeSentTx3=QDateTime::currentDateTimeUtc();
toneSpacing=-2.0; //Transmit a pre-computed, filtered waveform.
int nsps=720;
@@ -7349,7 +7338,7 @@ void MainWindow::transmit (double snr)
true, false, snr, m_TRperiod);
}
- if (m_modeTx == "Q65") {
+ if (m_mode == "Q65") {
int nsps=1800;
if(m_TRperiod==30) nsps=3600;
if(m_TRperiod==60) nsps=7200;
@@ -7364,7 +7353,7 @@ void MainWindow::transmit (double snr)
true, false, snr, m_TRperiod);
}
- if (m_modeTx == "JT9") {
+ if (m_mode == "JT9") {
int nsub=pow(2,m_nSubMode);
int nsps[]={480,240,120,60};
double sps=m_nsps;
@@ -7383,7 +7372,7 @@ void MainWindow::transmit (double snr)
true, fastmode, snr, m_TRperiod);
}
- if (m_modeTx == "MSK144") {
+ if (m_mode == "MSK144") {
m_nsps=6;
double f0=1000.0;
if(!m_bFastMode) {
@@ -7401,7 +7390,7 @@ void MainWindow::transmit (double snr)
true, true, snr, m_TRperiod);
}
- if (m_modeTx == "JT4") {
+ if (m_mode == "JT4") {
if(m_nSubMode==0) toneSpacing=4.375;
if(m_nSubMode==1) toneSpacing=2*4.375;
if(m_nSubMode==2) toneSpacing=4*4.375;
@@ -7580,7 +7569,7 @@ void::MainWindow::VHF_features_enabled(bool b)
}
ui->actionInclude_averaging->setVisible (b);
ui->actionInclude_correlation->setVisible (b && m_mode!="Q65");
- ui->actionMessage_averaging->setEnabled(b);
+ ui->actionMessage_averaging->setEnabled(b && (m_mode=="JT4" or m_mode=="JT65"));
ui->actionEnable_AP_JT65->setVisible (b && m_mode=="JT65");
if(!b && m_msgAvgWidget and (SpecOp::FOX != m_config.special_op_id()) and !m_config.autoLog()) {
@@ -8162,9 +8151,9 @@ void MainWindow::WSPR_scheduling ()
return;
}
m_WSPR_tx_next = false;
- if (!ui->sbTxPercent->isEnabled () || !ui->sbTxPercent->value ())
+ if (!ui->sbTxPercent->isEnabled ())
{
- return; // don't schedule if %age disabled or zero
+ return; // don't schedule if %age disabled
}
if (m_config.is_transceiver_online () // need working rig control for hopping
&& !m_config.is_dummy_rig ()
@@ -8404,7 +8393,7 @@ void MainWindow::statusUpdate () const
}
m_messageClient->status_update (m_freqNominal, m_mode, m_hisCall,
QString::number (ui->rptSpinBox->value ()),
- m_modeTx, ui->autoButton->isChecked (),
+ m_mode, ui->autoButton->isChecked (),
m_transmitting, m_decoderBusy,
rx_frequency, ui->TxFreqSpinBox->value (),
m_config.my_callsign (), m_config.my_grid (),
@@ -8537,7 +8526,7 @@ void MainWindow::write_transmit_entry (QString const& file_name)
time = time.addSecs (-fmod(double(time.time().second()),m_TRperiod));
out << time.toString("yyMMdd_hhmmss")
<< " Transmitting " << qSetRealNumberPrecision (12) << (m_freqNominal / 1.e6)
- << " MHz " << m_modeTx
+ << " MHz " << m_mode
<< ": " << m_currentMessage
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
<< Qt::endl
@@ -8579,6 +8568,7 @@ void MainWindow::on_sbNlist_valueChanged(int n)
void MainWindow::on_sbNslots_valueChanged(int n)
{
m_Nslots=n;
+ if(m_config.special_op_id()!=SpecOp::FOX) return;
QString t;
t = t.asprintf(" NSlots %d",m_Nslots);
writeFoxQSO(t);
@@ -8587,6 +8577,7 @@ void MainWindow::on_sbNslots_valueChanged(int n)
void MainWindow::on_sbMax_dB_valueChanged(int n)
{
m_max_dB=n;
+ if(m_config.special_op_id()!=SpecOp::FOX) return;
QString t;
t = t.asprintf(" Max_dB %d",m_max_dB);
writeFoxQSO(t);
@@ -8594,6 +8585,7 @@ void MainWindow::on_sbMax_dB_valueChanged(int n)
void MainWindow::on_pbFoxReset_clicked()
{
+ if(m_config.special_op_id()!=SpecOp::FOX) return;
auto button = MessageBox::query_message (this, tr ("Confirm Reset"),
tr ("Are you sure you want to clear the QSO queues?"));
if(button == MessageBox::Yes) {
diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h
index cdd67da7..7c39e2c7 100644
--- a/widgets/mainwindow.h
+++ b/widgets/mainwindow.h
@@ -157,6 +157,7 @@ private slots:
void on_actionFT8_DXpedition_Mode_User_Guide_triggered();
void on_actionQSG_FST4_triggered();
void on_actionQSG_Q65_triggered();
+ void on_actionQSG_X250_M3_triggered();
void on_actionOnline_User_Guide_triggered();
void on_actionLocal_User_Guide_triggered();
void on_actionWide_Waterfall_triggered();
@@ -418,7 +419,6 @@ private:
Astro::Correction m_astroCorrection;
bool m_reverse_Doppler;
- double m_s6;
double m_tRemaining;
double m_TRperiod;
@@ -453,7 +453,6 @@ private:
qint32 m_nclearave;
qint32 m_minSync;
qint32 m_dBm;
- qint32 m_nseq;
qint32 m_nWSPRdecodes;
qint32 m_k0;
qint32 m_kdone;
@@ -611,7 +610,6 @@ private:
QString m_palette;
QString m_dateTime;
QString m_mode;
- QString m_modeTx;
QString m_fnameWE; // save path without extension
QString m_rpt;
QString m_nextRpt;
@@ -780,6 +778,8 @@ private:
void foxGenWaveform(int i,QString fm);
void writeFoxQSO (QString const& msg);
void to_jt9(qint32 n, qint32 istart, qint32 idone);
+ bool is77BitMode () const;
+ void cease_auto_Tx_after_QSO ();
};
extern int killbyname(const char* progName);
diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui
index 35f64d91..a07e7957 100644
--- a/widgets/mainwindow.ui
+++ b/widgets/mainwindow.ui
@@ -644,7 +644,7 @@ QPushButton[state=&quot;ok&quot;] {
</widget>
</item>
<item row="0" column="0">
- <widget class="QComboBox" name="bandComboBox">
+ <widget class="BandComboBox" name="bandComboBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select operating band or enter frequency in MHz or enter kHz increment followed by k.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -661,7 +661,7 @@ QPushButton[state=&quot;ok&quot;] {
<enum>QComboBox::NoInsert</enum>
</property>
<property name="sizeAdjustPolicy">
- <enum>QComboBox::AdjustToMinimumContentsLength</enum>
+ <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
@@ -1678,6 +1678,22 @@ When not checked you can view the calibration results.</string>
</widget>
</item>
<item>
+ <widget class="QSpinBox" name="sbMaxDrift">
+ <property name="toolTip">
+ <string>Maximum drift rate in units of symbol rate per transmission.</string>
+ </property>
+ <property name="prefix">
+ <string>Max Drift </string>
+ </property>
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ <property name="singleStep">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -2876,6 +2892,7 @@ Double-click to reset to the standard 73 message</string>
<addaction name="actionFT8_DXpedition_Mode_User_Guide"/>
<addaction name="actionQSG_FST4"/>
<addaction name="actionQSG_Q65"/>
+ <addaction name="actionQSG_X250_M3"/>
<addaction name="download_samples_action"/>
<addaction name="separator"/>
<addaction name="actionKeyboard_shortcuts"/>
@@ -3407,12 +3424,17 @@ Double-click to reset to the standard 73 message</string>
<string>Auto Clear Avg after decode</string>
</property>
</action>
+ <action name="actionQSG_X250_M3">
+ <property name="text">
+ <string>Quick-Start Guide to WSJT-X 2.5.0 and MAP65 3.0</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>DisplayText</class>
- <extends>QTextEdit</extends>
+ <extends>QTextBrowser</extends>
<header>widgets/displaytext.h</header>
</customwidget>
<customwidget>
@@ -3446,6 +3468,11 @@ Double-click to reset to the standard 73 message</string>
<extends>QPushButton</extends>
<header>widgets/DoubleClickablePushButton.hpp</header>
</customwidget>
+ <customwidget>
+ <class>BandComboBox</class>
+ <extends>QComboBox</extends>
+ <header>widgets/BandComboBox.hpp</header>
+ </customwidget>
</customwidgets>
<tabstops>
<tabstop>decodedTextBrowser</tabstop>
diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp
index 8c2e9613..0153b843 100644
--- a/widgets/plotter.cpp
+++ b/widgets/plotter.cpp
@@ -479,7 +479,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
}
}
- if(m_modeTx=="JT9" and m_nSubMode>0) { //JT9
+ if(m_mode=="JT9" and m_nSubMode>0) { //JT9
bw=8.0*12000.0/m_nsps;
if(m_nSubMode==1) bw=2*bw; //B
if(m_nSubMode==2) bw=4*bw; //C
@@ -500,7 +500,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
float baud=12000.0/nsps;
bw=65.0*h*baud;
}
- if(m_modeTx=="JT65") { //JT65
+ if(m_mode=="JT65") { //JT65
bw=65.0*11025.0/4096.0;
if(m_nSubMode==1) bw=2*bw; //B
if(m_nSubMode==2) bw=4*bw; //C
@@ -530,9 +530,8 @@ void CPlotter::DrawOverlay() //DrawOverlay()
int yh=5;
int yTxTop=12;
int yRxBottom=yTxTop + 2*yh + 4;
- if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65"
- or m_mode=="Q65" or m_mode=="FT8" or m_mode=="FT4"
- or m_mode.startsWith("FST4")) {
+ if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="Q65" or m_mode=="FT8"
+ or m_mode=="FT4" or m_mode.startsWith("FST4")) {
if(m_mode=="FST4" and !m_bSingleDecode) {
x1=XfromFreq(m_nfa);
@@ -580,9 +579,8 @@ void CPlotter::DrawOverlay() //DrawOverlay()
}
}
- if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65" or
- m_mode.mid(0,4)=="WSPR" or m_mode=="Q65" or m_mode=="FT8"
- or m_mode=="FT4" or m_mode.startsWith("FST4")) {
+ if(m_mode=="JT9" or m_mode=="JT65" or m_mode.mid(0,4)=="WSPR" or m_mode=="Q65"
+ or m_mode=="FT8" or m_mode=="FT4" or m_mode.startsWith("FST4")) {
painter0.setPen(penRed);
x1=XfromFreq(m_txFreq);
x2=XfromFreq(m_txFreq+bw);
@@ -597,15 +595,6 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter0.drawLine(x2,yTxTop,x2,yTxTop+yh);
}
- if(m_mode=="JT9+JT65") {
- QPen pen2(Qt::blue, 3); //Mark the JT65 | JT9 divider
- painter0.setPen(pen2);
- x1=XfromFreq(m_fMin);
- if(x1<2) x1=2;
- x2=x1+30;
- painter0.drawLine(x1,8,x1,28);
- }
-
if(m_dialFreq>10.13 and m_dialFreq< 10.15 and m_mode.mid(0,4)!="WSPR") {
float f1=1.0e6*(10.1401 - m_dialFreq);
float f2=f1+200.0;
@@ -817,11 +806,6 @@ void CPlotter::setSubMode(int n) //setSubMode
m_nSubMode=n;
}
-void CPlotter::setModeTx(QString modeTx) //setModeTx
-{
- m_modeTx=modeTx;
-}
-
int CPlotter::Fmax()
{
return m_fMax;
diff --git a/widgets/plotter.h b/widgets/plotter.h
index 52936f2b..d1aa064a 100644
--- a/widgets/plotter.h
+++ b/widgets/plotter.h
@@ -61,7 +61,6 @@ public:
void setTxFreq(int n);
void setMode(QString mode);
void setSubMode(int n);
- void setModeTx(QString modeTx);
void SetPercent2DScreen(int percent);
int Fmax();
void setDialFreq(double d);
@@ -149,7 +148,6 @@ private:
QString m_HDivText[483];
QString m_mode;
QString m_mode0;
- QString m_modeTx;
QString m_rxBand;
QString m_redFile;
diff --git a/widgets/widegraph.cpp b/widgets/widegraph.cpp
index 78325d27..e1ad518a 100644
--- a/widgets/widegraph.cpp
+++ b/widgets/widegraph.cpp
@@ -292,7 +292,7 @@ void WideGraph::setTxFreq(int n) //setTxFreq
void WideGraph::setMode(QString mode) //setMode
{
m_mode=mode;
- ui->fSplitSpinBox->setEnabled(m_mode=="JT9+JT65" or m_mode.startsWith("FST4"));
+ ui->fSplitSpinBox->setEnabled(m_mode.startsWith("FST4"));
ui->widePlot->setMode(mode);
ui->widePlot->DrawOverlay();
ui->widePlot->update();
@@ -305,13 +305,6 @@ void WideGraph::setSubMode(int n) //setSubMode
ui->widePlot->DrawOverlay();
ui->widePlot->update();
}
-void WideGraph::setModeTx(QString modeTx) //setModeTx
-{
- m_modeTx=modeTx;
- ui->widePlot->setModeTx(modeTx);
- ui->widePlot->DrawOverlay();
- ui->widePlot->update();
-}
void WideGraph::on_spec2dComboBox_currentIndexChanged(int index)
{
@@ -370,7 +363,7 @@ void WideGraph::setRxBand (QString const& band)
else
{
ui->fSplitSpinBox->setValue (m_fMinPerBand.value (band, 2500).toUInt ());
- ui->fSplitSpinBox->setEnabled (m_mode=="JT9+JT65" or m_mode.startsWith("FST4"));
+ ui->fSplitSpinBox->setEnabled (m_mode.startsWith("FST4"));
}
ui->widePlot->setRxBand(band);
setRxRange ();
diff --git a/widgets/widegraph.h b/widgets/widegraph.h
index e8d241da..9043f691 100644
--- a/widgets/widegraph.h
+++ b/widgets/widegraph.h
@@ -39,7 +39,6 @@ public:
void setTxFreq(int n);
void setMode(QString mode);
void setSubMode(int n);
- void setModeTx(QString modeTx);
bool flatten();
bool useRef();
void setTol(int n);
@@ -116,7 +115,6 @@ private:
QString m_rxBand;
QString m_mode;
- QString m_modeTx;
QString m_waterfallPalette;
float m_swide[MAX_SCREENSIZE];
QString m_user_defined;