summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authortony mancill <tmancill@debian.org>2023-09-03 19:46:43 -0700
committertony mancill <tmancill@debian.org>2023-09-03 19:46:43 -0700
commit393a486ee1d7e308a49f8e0b8c3a4b2f43223248 (patch)
tree6a6e8a56ace360795e1cf1a310d5652bb23f1386 /widgets
parent6a285ab382ebff18c88e52bec75dc1773ac33b74 (diff)
New upstream version 2.7.0~rc2+repackupstream/2.7.0_rc2+repack
Diffstat (limited to 'widgets')
-rwxr-xr-xwidgets/FoxLogWindow.cpp7
-rwxr-xr-xwidgets/FoxLogWindow.hpp1
-rwxr-xr-xwidgets/FoxLogWindow.ui3
-rwxr-xr-xwidgets/about.cpp10
-rwxr-xr-xwidgets/activeStations.cpp70
-rwxr-xr-xwidgets/activeStations.h18
-rwxr-xr-xwidgets/activeStations.ui118
-rwxr-xr-xwidgets/displaytext.cpp1
-rwxr-xr-xwidgets/logqso.cpp2
-rwxr-xr-xwidgets/mainwindow.cpp619
-rwxr-xr-xwidgets/mainwindow.h29
-rwxr-xr-xwidgets/mainwindow.ui59
-rwxr-xr-xwidgets/plotter.cpp15
13 files changed, 751 insertions, 201 deletions
diff --git a/widgets/FoxLogWindow.cpp b/widgets/FoxLogWindow.cpp
index 999750c2..992d02db 100755
--- a/widgets/FoxLogWindow.cpp
+++ b/widgets/FoxLogWindow.cpp
@@ -47,7 +47,7 @@ FoxLogWindow::FoxLogWindow (QSettings * settings, Configuration const * configur
m_->ui_.log_table_view->setItemDelegateForColumn (3, new MaidenheadLocatorDelegate {this});
m_->ui_.log_table_view->setItemDelegateForColumn (6, new ForeignKeyDelegate {configuration->bands (), 0, this});
m_->ui_.log_table_view->horizontalHeader ()->moveSection (6, 1); // move band to first column
- m_->ui_.rate_label->setNum (0);
+ m_->ui_.rate_label->setText ("");
m_->ui_.queued_label->setNum (0);
m_->ui_.callers_label->setNum (0);
@@ -111,6 +111,11 @@ void FoxLogWindow::rate (int n)
m_->ui_.rate_label->setNum (n);
}
+void FoxLogWindow::rate (QString s)
+{
+ m_->ui_.rate_label->setText(s);
+}
+
void FoxLogWindow::log_model_changed (int row)
{
if (row >= 0)
diff --git a/widgets/FoxLogWindow.hpp b/widgets/FoxLogWindow.hpp
index 58499c81..a03f19be 100755
--- a/widgets/FoxLogWindow.hpp
+++ b/widgets/FoxLogWindow.hpp
@@ -22,6 +22,7 @@ public:
void callers (int);
void queued (int);
void rate (int);
+ void rate (QString);
Q_SIGNAL void reset_log_model () const;
diff --git a/widgets/FoxLogWindow.ui b/widgets/FoxLogWindow.ui
index d1bc9547..fd8c3c23 100755
--- a/widgets/FoxLogWindow.ui
+++ b/widgets/FoxLogWindow.ui
@@ -95,6 +95,9 @@
</item>
<item>
<widget class="QLabel" name="rate_label">
+ <property name="toolTip">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Last 10: Average rate (QSOs/hour) for the last 10 QSOs.&lt;br/&gt;Last 100: Average rate (QSOs/hour) for the last 100 QSOs. &lt;br/&gt;Last 60m: Average rate (QSOs/hour) for the last 60 minutes.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
<property name="text">
<string>N</string>
</property>
diff --git a/widgets/about.cpp b/widgets/about.cpp
index 187be8cb..2bef93e5 100755
--- a/widgets/about.cpp
+++ b/widgets/about.cpp
@@ -21,14 +21,14 @@ CAboutDlg::CAboutDlg(QWidget *parent) :
"WSJT-X implements a number of digital modes designed for <br />"
"weak-signal Amateur Radio communication. <br /><br />"
- "&copy; 2001-2022 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />"
+ "&copy; 2001-2023 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />"
"Steve Franke, K9AN, Nico Palermo, IV3NWV, <br />"
- "Chester Fennell, KG4IYS, and Uwe Risse, DG2YCB <br /><br />"
+ "Uwe Risse, DG2YCB, and Brian Moran, N9ADG <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 />"
- "VE1SKY, VK3ACF, VK4BDJ, VK7MO, W3DJS, W3SZ, W4TI, W4TV,<br />"
- "and W9MDB.<br /><br />"
+ "KA6MAL, KA9Q, KB1ZMX, KD6EKQ, KG4IYS, KI7MT, KK1D, ND0B,<br />"
+ " PY2SDR, VE1SKY, VK3ACF, VK4BDJ, VK7MO, W3DJS, W3SZ, W4TI,<br />"
+ " W4TV, and W9MDB.<br /><br />"
"WSJT-X is licensed under the terms of Version 3 <br />"
"of the GNU General Public License (GPL) <br /><br />"
"<a href=" TO_STRING__ (PROJECT_HOMEPAGE) ">"
diff --git a/widgets/activeStations.cpp b/widgets/activeStations.cpp
index 7703f080..7a8533df 100755
--- a/widgets/activeStations.cpp
+++ b/widgets/activeStations.cpp
@@ -23,8 +23,9 @@ 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");
- connect(ui->RecentStationsPlainTextEdit, SIGNAL(selectionChanged()), this, SLOT(select()));
connect(ui->cbReadyOnly, SIGNAL(toggled(bool)), this, SLOT(on_cbReadyOnly_toggled(bool)));
+ connect(ui->cbWantedOnly, SIGNAL(toggled(bool)), this, SLOT(on_cbWantedOnly_toggled(bool)));
+ connect(ui->RecentStationsPlainTextEdit, SIGNAL(cursorPositionChanged()), this, SLOT(on_textEdit_clicked()));
}
ActiveStations::~ActiveStations()
@@ -46,6 +47,7 @@ void ActiveStations::read_settings ()
ui->sbMaxRecent->setValue(settings_->value("MaxRecent",10).toInt());
ui->sbMaxAge->setValue(settings_->value("MaxAge",10).toInt());
ui->cbReadyOnly->setChecked(settings_->value("ReadyOnly",false).toBool());
+ ui->cbWantedOnly->setChecked(settings_->value("WantedOnly",false).toBool());
}
void ActiveStations::write_settings ()
@@ -55,11 +57,40 @@ void ActiveStations::write_settings ()
settings_->setValue("MaxRecent",ui->sbMaxRecent->value());
settings_->setValue("MaxAge",ui->sbMaxAge->value());
settings_->setValue("ReadyOnly",ui->cbReadyOnly->isChecked());
-}
-
-void ActiveStations::displayRecentStations(QString const& t)
-{
+ settings_->setValue("WantedOnly",ui->cbWantedOnly->isChecked());
+}
+
+void ActiveStations::displayRecentStations(QString mode, QString const& t)
+{
+ if(mode!=m_mode) {
+ m_mode=mode;
+ if(m_mode=="Q65") {
+ ui->header_label2->setText(" N Frx Fsked S/N Call Grid Tx Age");
+ ui->label->setText("QSOs:");
+ } else if(m_mode=="Q65-pileup") {
+ ui->header_label2->setText(" N Freq Call Grid El Age(h)");
+ } else {
+ ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts");
+ ui->label->setText("Rate:");
+ }
+ bool b=(m_mode.left(3)=="Q65");
+ ui->bandChanges->setVisible(!b);
+ ui->cbReadyOnly->setVisible(m_mode!="Q65-pileup");
+ ui->cbWantedOnly->setVisible(m_mode!="Q65-pileup");
+ ui->label_2->setVisible(!b);
+ ui->label_3->setVisible(!b);
+ ui->score->setVisible(!b);
+ ui->sbMaxRecent->setVisible(!b);
+
+ b=(m_mode!="Q65-pileup");
+ ui->sbMaxAge->setVisible(b);
+ ui->label->setVisible(b);
+ ui->rate->setVisible(b);
+ }
+ bool bClickOK=m_clickOK;
+ m_clickOK=false;
ui->RecentStationsPlainTextEdit->setPlainText(t);
+ m_clickOK=bClickOK;
}
int ActiveStations::maxRecent()
@@ -72,14 +103,20 @@ int ActiveStations::maxAge()
return ui->sbMaxAge->value();
}
-void ActiveStations::select()
+void ActiveStations::on_textEdit_clicked()
{
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);
+ QTextCursor cursor;
+ QString text;
+ cursor = ui->RecentStationsPlainTextEdit->textCursor();
+ cursor.movePosition(QTextCursor::StartOfBlock);
+ cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+ text = cursor.selectedText();
+ if(text!="") {
+ int nline=text.left(2).toInt();
+ if(QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier)) nline=-nline;
+ emit callSandP(nline);
+ }
}
}
@@ -104,6 +141,17 @@ void ActiveStations::on_cbReadyOnly_toggled(bool b)
emit activeStationsDisplay();
}
+bool ActiveStations::wantedOnly()
+{
+ return ui->cbWantedOnly->isChecked();
+}
+
+void ActiveStations::on_cbWantedOnly_toggled(bool b)
+{
+ m_bWantedOnly=b;
+ emit activeStationsDisplay();
+}
+
void ActiveStations::setRate(int n)
{
ui->rate->setText(QString::number(n));
diff --git a/widgets/activeStations.h b/widgets/activeStations.h
index 236f5235..eea10994 100755
--- a/widgets/activeStations.h
+++ b/widgets/activeStations.h
@@ -19,31 +19,35 @@ class ActiveStations
public:
explicit ActiveStations(QSettings *, QFont const&, QWidget * parent = 0);
~ActiveStations();
- void displayRecentStations(QString const&);
+ void displayRecentStations(QString mode, QString const&);
void changeFont (QFont const&);
int maxRecent();
int maxAge();
void setClickOK(bool b);
void erase();
bool readyOnly();
+ bool wantedOnly();
void setRate(int n);
void setBandChanges(int n);
void setScore(int n);
- Q_SLOT void select();
bool m_clickOK=false;
bool m_bReadyOnly;
-
-signals:
- void callSandP(int nline);
- void activeStationsDisplay();
+ bool m_bWantedOnly;
private:
void read_settings ();
void write_settings ();
+ Q_SIGNAL void callSandP(int nline);
+ Q_SIGNAL void activeStationsDisplay();
+ Q_SIGNAL void cursorPositionChanged();
+
Q_SLOT void on_cbReadyOnly_toggled(bool b);
+ Q_SLOT void on_cbWantedOnly_toggled(bool b);
+ Q_SLOT void on_textEdit_clicked();
- qint64 m_msec0=0;
+// qint64 m_msec0=0;
+ QString m_mode="";
QSettings * settings_;
QScopedPointer<Ui::ActiveStations> ui;
diff --git a/widgets/activeStations.ui b/widgets/activeStations.ui
index 8da9231d..0b23a75f 100755
--- a/widgets/activeStations.ui
+++ b/widgets/activeStations.ui
@@ -18,7 +18,7 @@
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
+ <item row="0" column="2">
<widget class="QSpinBox" name="sbMaxRecent">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -50,7 +50,7 @@
<widget class="QLineEdit" name="rate">
<property name="maximumSize">
<size>
- <width>16777215</width>
+ <width>80</width>
<height>16777215</height>
</size>
</property>
@@ -68,54 +68,23 @@
</property>
</widget>
</item>
- <item row="0" column="2">
- <widget class="QSpinBox" name="sbMaxAge">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>80</width>
- <height>0</height>
- </size>
- </property>
+ <item row="0" column="3">
+ <widget class="QCheckBox" name="cbReadyOnly">
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set maximum elapsed number of T/R sequences.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="prefix">
- <string>Max Age </string>
- </property>
- <property name="minimum">
- <number>0</number>
- </property>
- <property name="maximum">
- <number>10</number>
- </property>
- <property name="value">
- <number>4</number>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check tis box to show only stations ready to be called.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="QLabel" name="label_2">
<property name="text">
- <string>Score:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <string>Ready only</string>
</property>
</widget>
</item>
- <item row="0" column="4">
- <widget class="QLabel" name="label">
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
<property name="text">
- <string>Rate:</string>
+ <string>Band Changes:</string>
</property>
<property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
@@ -135,23 +104,60 @@
</property>
</widget>
</item>
- <item row="0" column="3">
- <widget class="QCheckBox" name="cbReadyOnly">
+ <item row="0" column="4">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Rate:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QSpinBox" name="sbMaxAge">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Check tis box to show only stations ready to be called.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set maximum elapsed number of T/R sequences.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- <property name="text">
- <string>Ready only</string>
+ <property name="prefix">
+ <string>Max Age </string>
+ </property>
+ <property name="minimum">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+ <number>60</number>
+ </property>
+ <property name="value">
+ <number>4</number>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_3">
+ <item row="1" column="4">
+ <widget class="QLabel" name="label_2">
<property name="text">
- <string>Band Changes:</string>
+ <string>Score:</string>
</property>
<property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
@@ -171,6 +177,16 @@
</property>
</widget>
</item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="cbWantedOnly">
+ <property name="visible">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Wanted only</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item row="1" column="0">
@@ -189,7 +205,7 @@
<item row="0" column="0">
<widget class="QLabel" name="header_label2">
<property name="text">
- <string>Call Grid Age Points</string>
+ <string/>
</property>
</widget>
</item>
diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp
index c34c0058..e23d0aad 100755
--- a/widgets/displaytext.cpp
+++ b/widgets/displaytext.cpp
@@ -379,6 +379,7 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons
countryName.replace ("Central ", "C. ");
countryName.replace (" and ", " & ");
countryName.replace ("Republic", "Rep.");
+ countryName.replace ("United States of America", "U.S.A.");
countryName.replace ("United States", "U.S.A.");
countryName.replace ("Fed. Rep. of ", "");
countryName.replace ("French ", "Fr.");
diff --git a/widgets/logqso.cpp b/widgets/logqso.cpp
index 2bd98ffd..520173ab 100755
--- a/widgets/logqso.cpp
+++ b/widgets/logqso.cpp
@@ -221,7 +221,7 @@ void LogQSO::accept()
}
// validate
- if (SpOp::NONE < special_op && special_op < SpOp::FOX)
+ if ((SpOp::NONE < special_op && special_op < SpOp::FOX) || (special_op > SpOp::HOUND))
{
if (xsent.isEmpty () || xrcvd.isEmpty ())
{
diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp
index a466c4a6..a476bba7 100755
--- a/widgets/mainwindow.cpp
+++ b/widgets/mainwindow.cpp
@@ -185,13 +185,18 @@ extern "C" {
void save_dxbase_(char* dxbase, FCL len);
void indexx_(float arr[], int* n, int indx[]);
+
+ void get_q3list_(char* fname, bool* bDiskData, int* nlist, char* list, FCL len1, FCL len2);
+
+ void rm_q3list_(char* callsign, FCL len);
+
+ void jpl_setup_(char* fname, FCL len);
}
int volatile itone[MAX_NUM_SYMBOLS]; //Audio tones for all Tx symbols
int volatile itone0[MAX_NUM_SYMBOLS]; //Dummy array, data not actually used
int volatile icw[NUM_CW_SYMBOLS]; //Dits for CW ID
dec_data_t dec_data; // for sharing with Fortran
-
int outBufSize;
int rc;
qint32 g_iptt {0};
@@ -212,6 +217,17 @@ bool m_displayBand = false;
bool no_a7_decodes = false;
bool keep_frequency = false;
+QSharedMemory mem_qmap("mem_qmap"); //Memory segment to be shared (optionally) with QMAP
+struct {
+ int ndecodes; //Number of QMAP decodes available (so far)
+ int ncand; //Number of QMAP candidates considered for decoding
+ int nQDecoderDone; //QMAP decoder is finished (0 or 1)
+ int nWDecoderBusy; //WSJT-X decoder is busy (0 or 1)
+ int nWTransmitting; //WSJT-X is transmitting (0 or 1)
+ char result[50][60]; //Decodes as character*60 arrays
+} qmapcom;
+int* ipc_qmap;
+
namespace
{
Radio::Frequency constexpr default_frequency {14074000};
@@ -453,6 +469,14 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_optimizingProgress.setAutoReset (false);
m_optimizingProgress.setMinimumDuration (15000); // only show after 15s delay
+ //Attach or create a memory segment to be shared with QMAP.
+ int memSize=4096;
+ if(!mem_qmap.attach()) mem_qmap.create(memSize);
+ ipc_qmap = (int*)mem_qmap.data();
+ mem_qmap.lock();
+ memset(ipc_qmap,0,memSize); //Zero all of QMAP shared memory
+ mem_qmap.unlock();
+
// Closedown.
connect (ui->actionExit, &QAction::triggered, this, &QMainWindow::close);
@@ -522,14 +546,15 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
connect (this, &MainWindow::finished, m_logDlg.data (), &LogQSO::close);
// hook up the log book
- connect (&m_logBook, &LogBook::finished_loading, [this] (int record_count, QString const& error) {
+ connect (&m_logBook, &LogBook::finished_loading, [this] (int record_count, QString cty_version, QString const& error) {
if (error.size ())
{
MessageBox::warning_message (this, tr ("Error Scanning ADIF Log"), error);
}
else
{
- showStatusMessage (tr ("Scanned ADIF log, %1 worked before records created").arg (record_count));
+ m_config.set_CTY_DAT_version(cty_version);
+ showStatusMessage (tr ("Scanned ADIF log, %1 worked-before records created. CTY: %2").arg (record_count).arg (cty_version));
}
});
@@ -646,6 +671,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
MessageBox::warning_message (this, tr ("Error Loading LotW Users Data"), reason);
}, Qt::QueuedConnection);
+
QButtonGroup* txMsgButtonGroup = new QButtonGroup {this};
txMsgButtonGroup->addButton(ui->txrb1,1);
txMsgButtonGroup->addButton(ui->txrb2,2);
@@ -880,6 +906,10 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->lh_decodes_headings_label->setText(t);
ui->rh_decodes_headings_label->setText(t);
readSettings(); //Restore user's setup parameters
+ if(m_mode=="Q65") {
+ m_score=0;
+ read_log();
+ }
m_audioThread.start (m_audioThreadPriority);
#ifdef WIN32
@@ -1049,6 +1079,11 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->labDXped->setStyleSheet("QLabel {background-color: red; color: white;}");
ui->pbBestSP->setVisible(m_mode=="FT4");
+ update_foxLogWindow_rate(); // update the rate on the window
+
+ QString jpleph = m_config.data_dir().absoluteFilePath("JPLEPH");
+ jpl_setup_(const_cast<char *>(jpleph.toLocal8Bit().constData()),256);
+
// this must be the last statement of constructor
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
}
@@ -1056,11 +1091,11 @@ 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.6.0 made\n"
+ "This is a pre-release version of WSJT-X 2.7.0-rc2 made\n"
"available for testing purposes. By design it will\n"
- "be nonfunctional after Mar 31, 2023.");
+ "be nonfunctional after Jan 15, 2024.");
auto now = QDateTime::currentDateTimeUtc ();
- if (now >= QDateTime {{2023, 03, 31}, {23, 59, 59, 999}, Qt::UTC}) {
+ if (now >= QDateTime {{2024, 01, 15}, {23, 59, 59, 999}, Qt::UTC}) {
Q_EMIT finished ();
}
}
@@ -1107,6 +1142,7 @@ void MainWindow::on_the_minute ()
} else {
tx_watchdog (false);
}
+ update_foxLogWindow_rate(); // update the rate on the window
}
//--------------------------------------------------- MainWindow destructor
@@ -1118,6 +1154,7 @@ MainWindow::~MainWindow()
m_audioThread.quit ();
m_audioThread.wait ();
remove_child_from_event_filter (this);
+ memset(ipc_qmap,0,4096); //Zero all of QMAP shared memory
}
//-------------------------------------------------------- writeSettings()
@@ -1376,10 +1413,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();
-// QFile f {m_config.writeable_data_dir ().absoluteFilePath ("activeCalls.txt")};
- }
+ if(displayActiveStations) on_actionActiveStations_triggered();
}
void MainWindow::checkMSK144ContestType()
@@ -2040,6 +2074,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
}
ui->labDXped->setVisible(SpecOp::NONE != m_specOp);
set_mode(m_mode);
+ configActiveStations();
}
}
@@ -2242,7 +2277,7 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
case Qt::Key_F11:
if((e->modifiers() & Qt::ControlModifier) and (e->modifiers() & Qt::ShiftModifier)) {
m_bandEdited = true;
- band_changed(m_freqNominal-2000);
+ band_changed(m_freqNominal-1000);
} else {
n=11;
if(e->modifiers() & Qt::ControlModifier) n+=100;
@@ -2258,7 +2293,7 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
case Qt::Key_F12:
if((e->modifiers() & Qt::ControlModifier) and (e->modifiers() & Qt::ShiftModifier)) {
m_bandEdited = true;
- band_changed(m_freqNominal+2000);
+ band_changed(m_freqNominal+1000);
} else {
n=12;
if(e->modifiers() & Qt::ControlModifier) n+=100;
@@ -2330,6 +2365,16 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
}
break;
case Qt::Key_R:
+ if(m_mode=="Q65" and e->modifiers() & Qt::ShiftModifier and
+ e->modifiers() & Qt::ControlModifier) {
+ if(m_specOp==SpecOp::Q65_PILEUP) {
+ refreshPileupList();
+ } else {
+ m_fetched=0;
+ readWidebandDecodes();
+ }
+ return;
+ }
if(e->modifiers() & Qt::AltModifier) {
if(!m_send_RR73) on_txrb4_doubleClicked();
return;
@@ -2422,6 +2467,7 @@ void MainWindow::displayDialFrequency ()
void MainWindow::statusChanged()
{
+ if (m_specOp==SpecOp::Q65_PILEUP && m_mode != "Q65") on_actionQ65_triggered();
statusUpdate ();
QFile f {m_config.temp_dir ().absoluteFilePath ("wsjtx_status.txt")};
if(f.open(QFile::WriteOnly | QIODevice::Text)) {
@@ -2445,6 +2491,17 @@ void MainWindow::statusChanged()
.arg (f.fileName ()).arg (f.errorString ()));
}
on_dxGridEntry_textChanged(m_hisGrid);
+ if(m_specOp!=SpecOp::HOUND) {
+ ui->txb2->setEnabled(true);
+ ui->txrb2->setEnabled(true);
+ ui->txb4->setEnabled(true);
+ ui->txrb4->setEnabled(true);
+ ui->txb5->setEnabled(true);
+ ui->txrb5->setEnabled(true);
+ ui->txb6->setEnabled(true);
+ ui->txrb6->setEnabled(true);
+ ui->houndButton->setChecked(false);
+ }
}
bool MainWindow::eventFilter (QObject * object, QEvent * event)
@@ -2661,6 +2718,11 @@ void MainWindow::on_actionQSG_X250_M3_triggered()
QDesktopServices::openUrl (QUrl {"https://wsjt.sourceforge.io/WSJTX_2.5.0_MAP65_3.0_Quick_Start.pdf"});
}
+void MainWindow::on_actionQuick_Start_Guide_to_WSJT_X_2_7_and_QMAP_triggered()
+{
+ QDesktopServices::openUrl (QUrl {"https://wsjt.sourceforge.io/Quick_Start_WSJT-X_2.7_QMAP.pdf"});
+}
+
void MainWindow::on_actionOnline_User_Guide_triggered() //Display manual
{
#if defined (CMAKE_BUILD)
@@ -2741,10 +2803,10 @@ void MainWindow::on_actionCopyright_Notice_triggered()
"\"The algorithms, source code, look-and-feel of WSJT-X and related "
"programs, and protocol specifications for the modes FSK441, FST4, FT8, "
"JT4, JT6M, JT9, JT65, JTMS, QRA64, Q65, MSK144 are Copyright (C) "
- "2001-2022 by one or more of the following authors: Joseph Taylor, "
+ "2001-2023 by one or more of the following authors: Joseph Taylor, "
"K1JT; Bill Somerville, G4WJS; Steven Franke, K9AN; Nico Palermo, "
"IV3NWV; Greg Beam, KI7MT; Michael Black, W9MDB; Edson Pereira, PY2SDR; "
- "Philip Karn, KA9Q; Chester Fennell, KG4IYS; Uwe Risse, DG2YCB; "
+ "Philip Karn, KA9Q; Uwe Risse, DG2YCB; Brian Moran, N9ADG; "
"and other members of the WSJT Development Group.\"");
MessageBox::warning_message(this, message);
}
@@ -2911,9 +2973,11 @@ void MainWindow::on_actionActiveStations_triggered()
m_ActiveStationsWidget->showNormal();
m_ActiveStationsWidget->raise();
m_ActiveStationsWidget->activateWindow();
+ configActiveStations();
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);
+ if(m_mode=="Q65") m_ActiveStationsWidget->setRate(m_score);
}
void MainWindow::on_actionOpen_triggered() //Open File
@@ -3109,11 +3173,11 @@ void MainWindow::on_actionKeyboard_shortcuts_triggered()
<tr><td><b>F11 </b></td><td>Move Rx frequency down 1 Hz</td></tr>
<tr><td><b>Ctrl+F11 </b></td><td>Move identical Rx and Tx frequencies down 1 Hz</td></tr>
<tr><td><b>Shift+F11 </b></td><td>Move Tx frequency down 60 Hz (FT8) or 90 Hz (FT4)</td></tr>
- <tr><td><b>Ctrl+Shift+F11 </b></td><td>Move dial frequency down 2000 Hz</td></tr>
+ <tr><td><b>Ctrl+Shift+F11 </b></td><td>Move dial frequency down 1000 Hz</td></tr>
<tr><td><b>F12 </b></td><td>Move Rx frequency up 1 Hz</td></tr>
<tr><td><b>Ctrl+F12 </b></td><td>Move identical Rx and Tx frequencies up 1 Hz</td></tr>
<tr><td><b>Shift+F12 </b></td><td>Move Tx frequency up 60 Hz (FT8) or 90 Hz (FT4)</td></tr>
- <tr><td><b>Ctrl+Shift+F12 </b></td><td>Move dial frequency up 2000 Hz</td></tr>
+ <tr><td><b>Ctrl+Shift+F12 </b></td><td>Move dial frequency up 1000 Hz</td></tr>
<tr><td><b>Alt+1-6 </b></td><td>Set now transmission to this number on Tab 1</td></tr>
<tr><td><b>Ctl+1-6 </b></td><td>Set next transmission to this number on Tab 1</td></tr>
<tr><td><b>Alt+B </b></td><td>Toggle "Best S+P" status</td></tr>
@@ -3134,6 +3198,7 @@ void MainWindow::on_actionKeyboard_shortcuts_triggered()
<tr><td><b>Alt+Q </b></td><td>Open "Log QSO" window</td></tr>
<tr><td><b>Ctrl+R </b></td><td>Set Tx4 message to RRR (not in FT4)</td></tr>
<tr><td><b>Alt+R </b></td><td>Set Tx4 message to RR73</td></tr>
+ <tr><td><b>Ctrl+Shift+R </b></td><td>Refresh Active Stations window</td></tr>
<tr><td><b>Alt+S </b></td><td>Stop monitoring</td></tr>
<tr><td><b>Alt+T </b></td><td>Toggle Tune status</td></tr>
<tr><td><b>Alt+Z </b></td><td>Clear hung decoder status</td></tr>
@@ -3231,6 +3296,7 @@ void MainWindow::msgAvgDecode2()
void MainWindow::decode() //decode()
{
if(m_decoderBusy) return; //Don't start decoder if it's already busy.
+ m_fetched=0;
QDateTime now = QDateTime::currentDateTimeUtc ();
if( m_dateTimeLastTX.isValid () ) {
qint64 isecs_since_tx = m_dateTimeLastTX.secsTo(now);
@@ -3283,7 +3349,9 @@ void MainWindow::decode() //decode()
dec_data.params.ndiskdat=0;
if(m_diskData) dec_data.params.ndiskdat=1;
dec_data.params.nfa=m_wideGraph->nStartFreq();
- dec_data.params.nfSplit=m_wideGraph->Fmin();
+ dec_data.params.nfSplit=m_wideGraph->Fmin(); // Not used any more?
+ if(dec_data.params.nfSplit==8) dec_data.params.nfSplit=1;
+
dec_data.params.nfb=m_wideGraph->Fmax();
if(m_mode=="FT8" and SpecOp::HOUND == m_specOp and !ui->cbRxAll->isChecked()) dec_data.params.nfb=1000;
if(m_mode=="FT8" and SpecOp::FOX == m_specOp ) dec_data.params.nfqso=200;
@@ -3339,7 +3407,10 @@ void MainWindow::decode() //decode()
dec_data.params.emedelay=0.0;
if(m_config.decode_at_52s()) dec_data.params.emedelay=2.5;
dec_data.params.minSync=ui->syncSpinBox->isVisible () ? m_minSync : 0;
- dec_data.params.nexp_decode = static_cast<int> (m_specOp);
+ dec_data.params.nexp_decode=int(m_specOp);
+ if(dec_data.params.nexp_decode==5) dec_data.params.nexp_decode=1; //NA VHF, WW Digi, ARRL Digi contests
+ if(dec_data.params.nexp_decode==8) dec_data.params.nexp_decode=1; //and Q65 Pileup all use 4-character
+ if(dec_data.params.nexp_decode==9) dec_data.params.nexp_decode=1; //grid exchange
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);
@@ -3408,7 +3479,9 @@ void MainWindow::decode() //decode()
}
}
if((m_mode=="FT4" or (m_mode=="FT8" and m_ihsym==41) or m_diskData) and
- m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase();
+ m_ActiveStationsWidget != NULL) {
+ if(m_mode!="Q65") m_ActiveStationsWidget->erase(); //TEMP
+ }
}
void::MainWindow::fast_decode_done()
@@ -3521,10 +3594,69 @@ void MainWindow::decodeDone ()
ARRL_Digi_Display(); // Update the ARRL_DIGI display
}
if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0;
+
+ if(m_mode=="Q65" and (m_specOp==SpecOp::NA_VHF or m_specOp==SpecOp::ARRL_DIGI
+ or m_specOp==SpecOp::WW_DIGI or m_specOp==SpecOp::Q65_PILEUP)
+ and m_ActiveStationsWidget!=NULL) {
+ refreshPileupList();
+ }
+}
+
+void MainWindow::refreshPileupList()
+{
+ // Update the ActiveStations display for Q65 pileup situation...
+ int nlist=0;
+ char list[2000];
+ char line[36];
+ list[0]=0;
+ auto fname {QDir::toNativeSeparators(m_config.writeable_data_dir().absoluteFilePath("tsil.3q"))};
+ get_q3list_(const_cast<char *> (fname.toLatin1().constData()), &m_diskData, &nlist,
+ &list[0], (FCL)fname.length(), (FCL)2000);
+ QString t="";
+ QString t0="";
+ for(int i=0; i<nlist; i++) {
+ memcpy(line,&list[36*i],36);
+ t0=QString::fromLatin1(line)+"\n";
+ m_callers[i]=t0;
+ t+=t0;
+ }
+ m_ActiveStationsWidget->setClickOK(false);
+ m_ActiveStationsWidget->displayRecentStations("Q65-pileup",t);
+ m_ActiveStationsWidget->setClickOK(true);
+}
+
+void MainWindow::read_log()
+{
+ static QFile f {QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("wsjtx.log")};
+ f.open(QIODevice::ReadOnly);
+ if(f.isOpen()) {
+ QTextStream in(&f);
+ QString line,callsign;
+ for(int i=0; i<99999; i++) {
+ line=in.readLine();
+ if(line.length()<=0) break;
+ callsign=line.mid(40,6);
+ int n=callsign.indexOf(",");
+ if(n>0) callsign=callsign.left(n);
+ m_EMEworked[callsign]=true;
+ m_score++;
+ }
+ f.close();
+ }
+ if(m_ActiveStationsWidget!=NULL) {
+ m_ActiveStationsWidget->setScore(m_score);
+ if(m_mode=="Q65") m_ActiveStationsWidget->setRate(m_score);
+ }
}
void MainWindow::ARRL_Digi_Update(DecodedText dt)
{
+ if(m_mode=="Q65") {
+ m_fetched=0;
+ readWidebandDecodes();
+ return;
+ }
+
// Extract information relevant for the ARRL Digi contest
QString deCall;
QString deGrid;
@@ -3584,6 +3716,11 @@ void MainWindow::ARRL_Digi_Update(DecodedText dt)
void MainWindow::ARRL_Digi_Display()
{
+ if(m_mode=="Q65") {
+ m_fetched=0;
+ readWidebandDecodes();
+ return;
+ }
QMutableMapIterator<QString,RecentCall> icall(m_recentCall);
QString deCall,deGrid;
int age=0;
@@ -3654,23 +3791,65 @@ void MainWindow::ARRL_Digi_Display()
t += (t1 + list[k] + "\n");
if(i>=maxRecent) break;
}
- if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t);
+ if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(m_mode,t);
m_ActiveStationsWidget->setClickOK(true);
}
void MainWindow::callSandP2(int n)
{
- if(m_ready2call[n]=="") return;
+ bool bCtrl = (n<0);
+ n=qAbs(n)-1;
+ if(m_mode!="Q65" and m_ready2call[n]=="") return;
QStringList w=m_ready2call[n].split(' ', SkipEmptyParts);
- m_deCall=w[0];
- m_deGrid=w[1];
+ if(m_mode=="Q65" and m_specOp==SpecOp::Q65_PILEUP and n < 40) {
+ // This code is for 6m EME DXpedition operator
+ w=m_callers[n].split(' ', SkipEmptyParts);
+ m_deCall=w[2];
+ if(bCtrl) {
+ // Remove this call from q3list.
+ rm_q3list_(const_cast<char *> (m_deCall.toLatin1().constData()), m_deCall.size());
+ refreshPileupList();
+ return;
+ }
+ m_deGrid=w[3];
+ m_bDoubleClicked=true; //### needed?
+ m_txFirst=true;
+ ui->dxCallEntry->setText(m_deCall);
+ ui->dxGridEntry->setText(m_deGrid);
+ ui->txFirstCheckBox->setChecked(m_txFirst);
+ genStdMsgs("-22");
+ setTxMsg(3);
+ if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx
+ if(m_transmitting) m_restart=true;
+ return;
+ }
+
+ if(m_mode=="Q65") {
+ if(!bCtrl) { //Do not reset m_freqNominal if CTRL was down
+ double kHz=w[1].toDouble();
+ int nMHz=m_freqNominal/1000000;
+ m_freqNominal=(nMHz*1000 + kHz)* 1000;
+ }
+ m_deCall=w[3];
+ m_deGrid=w[4];
+ m_txFirst=(w[5]=="0");
+// ui->TxFreqSpinBox->setValue(1500);
+ } else {
+ m_deCall=w[0];
+ m_deGrid=w[1];
+ ui->RxFreqSpinBox->setValue(w[4].toInt());
+ m_txFirst = (w[5]=="0");
+ }
m_bDoubleClicked=true; //### needed?
ui->dxCallEntry->setText(m_deCall);
ui->dxGridEntry->setText(m_deGrid);
- genStdMsgs(w[3]); //### real SNR would be better here?
- ui->RxFreqSpinBox->setValue(w[4].toInt());
+ if(m_mode=="Q65") {
+ ui->rptSpinBox->setValue(w[2].toInt());
+ genStdMsgs(w[2]);
+ } else {
+ genStdMsgs(w[3]);
+ }
setTxMsg(1);
- 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;
@@ -3732,6 +3911,8 @@ void MainWindow::readFromStdout() //readFromStdout
bool bAvgMsg=false;
int navg=0;
+// qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
+// double fTR=float((ms%int(1000.0*m_TRperiod)))/int(1000.0*m_TRperiod);
if(line_read.indexOf("<DecodeFinished>") >= 0) {
m_bDecoded = line_read.mid(20).trimmed().toInt() > 0;
int n=line_read.trimmed().size();
@@ -3791,6 +3972,7 @@ void MainWindow::readFromStdout() //readFromStdout
}
m_tBlankLine = line_read.left(ntime);
}
+// if(m_mode=="FT8" && fTR>0.6 && fTR<0.75) decodeDone(); // Clear a hung decoder status
}
if ("FST4W" == m_mode)
{
@@ -3972,6 +4154,7 @@ void MainWindow::readFromStdout() //readFromStdout
if((abs(audioFreq - m_wideGraph->rxFreq()) <= 10) and
!m_config.enable_VHF_features()) bDisplayRight=true;
}
+ if(m_mode=="Q65" and !bAvgMsg) bDisplayRight=false;
if (bDisplayRight) {
// This msg is within 10 hertz of our tuned frequency, or a JT4 or JT65 avg,
@@ -4003,7 +4186,8 @@ void MainWindow::readFromStdout() //readFromStdout
hound_reply ();
}
} else {
- QStringList w=decodedtext.string().mid(24).split(" ",SkipEmptyParts);
+ QString text = decodedtext.string().replace("<","").replace(">",""); // needed for MSHV multistream messages
+ QStringList w=text.mid(24).split(" ",SkipEmptyParts);
if(decodedtext.string().contains("/")) w.append(" +00"); //Add a dummy report
if(w.size()>=3) {
QString foxCall=w.at(1);
@@ -4019,6 +4203,8 @@ void MainWindow::readFromStdout() //readFromStdout
m_rptSent=decodedtext.string().mid(7,3);
m_nFoxFreq=decodedtext.string().mid(16,4).toInt();
hound_reply ();
+ } else {
+ if (text.contains(m_config.my_callsign() + " " + m_hisCall) && !text.contains("73 ")) processMessage(decodedtext0); // needed for MSHV multistream messages
}
}
}
@@ -4109,7 +4295,7 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler
|| message_words.contains (ui->dxCallEntry->text ())
|| message_words.contains (Radio::base_callsign (ui->dxCallEntry->text ()))
|| message_words.contains ("DE")))
- || !message.isStandardMessage ()); // free text 73/RR73
+ || (!message.isStandardMessage () && m_mode != "MSK144")); // free text 73/RR73 except for MSK
auto const& w = msg_no_hash.split(" ",SkipEmptyParts);
QString w2;
@@ -4322,8 +4508,8 @@ void MainWindow::guiUpdate()
if(m_mode=="FT8" and SpecOp::FOX==m_specOp) {
// Don't allow Fox mode in any of the default FT8 sub-bands.
- qint32 ft8Freq[]={1840000,3573000,7074000,10136000,14074000,18100000,21074000,24915000,28074000,50313000,70154000};
- for(int i=0; i<11; i++) {
+ QVector<qint32> ft8Freq = {1840000,3573000,7074000,10136000,14074000,18100000,21074000,24915000,28074000,50313000,70154000};
+ for(int i=0; i<ft8Freq.length()-1; i++) {
int kHzdiff=m_freqNominal - ft8Freq[i];
if(qAbs(kHzdiff) < 3000 ) {
m_bTxTime=false;
@@ -4768,13 +4954,14 @@ void MainWindow::guiUpdate()
}
}
- if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4" || "Q65" == m_mode) {
+ if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4" or m_mode=="Q65") {
if(ui->txrb1->isEnabled() and
(SpecOp::NA_VHF==m_specOp or
SpecOp::FIELD_DAY==m_specOp or
SpecOp::RTTY==m_specOp or
SpecOp::WW_DIGI==m_specOp or
- SpecOp::ARRL_DIGI==m_specOp) ) {
+ SpecOp::ARRL_DIGI==m_specOp or
+ SpecOp::Q65_PILEUP==m_specOp)) {
//We're in a contest-like mode other than EU_VHF: start QSO with Tx2.
ui->tx1->setEnabled(false);
ui->txb1->setEnabled(false);
@@ -4787,16 +4974,34 @@ void MainWindow::guiUpdate()
}
if(m_mode=="Echo" and !m_monitoring and !m_auto and !m_diskData) m_echoRunning=false;
+ if(m_mode=="Q65") {
+ mem_qmap.lock();
+ int n=0;
+ if(m_decoderBusy) n=1;
+ ipc_qmap[3]=n;
+ n=0;
+ if(m_transmitting) n=1;
+ ipc_qmap[4]=n;
+ if(ipc_qmap[0] > 0) { //ndecodes
+ memcpy(&qmapcom, (char*)ipc_qmap, sizeof(qmapcom)); //Fetch the new decode(s)
+ readWidebandDecodes();
+ }
+ mem_qmap.unlock();
+ }
+
//Once per second (onesec)
if(nsec != m_sec0) {
-// qDebug() << "AAA" << nsec << m_bFastMode << m_bFast9;
+// qDebug() << "AAA" << nsec%60 << int(m_specOp);
if(m_mode=="FST4") chk_FST4_freq_range();
m_currentBand=m_config.bands()->find(m_freqNominal);
if( SpecOp::HOUND == m_specOp ) {
qint32 tHound=QDateTime::currentMSecsSinceEpoch()/1000 - m_tAutoOn;
//To keep calling Fox, Hound must reactivate Enable Tx at least once every 2 minutes
- if(tHound >= 120 and m_ntx==1) auto_tx_mode(false);
+ if(tHound >= 120 and m_ntx==1) {
+ auto_tx_mode(false);
+ statusUpdate ();
+ }
}
progressBar.setVisible(true);
@@ -5400,7 +5605,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
or bEU_VHF_w2 or (m_QSOProgress==CALLING))) {
if(message_words.at(4).contains(grid_regexp) and SpecOp::EU_VHF!=m_specOp) {
if((SpecOp::NA_VHF==m_specOp or SpecOp::WW_DIGI==m_specOp or
- SpecOp::ARRL_DIGI==m_specOp )
+ SpecOp::ARRL_DIGI==m_specOp or SpecOp::Q65_PILEUP==m_specOp)
and bContestOK) {
setTxMsg(3);
m_QSOProgress=ROGER_REPORT;
@@ -5764,7 +5969,7 @@ void MainWindow::genCQMsg ()
QString t=ui->tx6->text();
QStringList tlist=t.split(" ");
if((m_mode=="FT4" or m_mode=="FT8" or m_mode=="MSK144" || "Q65" == m_mode) and
- SpecOp::NONE != m_specOp and
+ SpecOp::NONE != m_specOp and SpecOp::HOUND != m_specOp and SpecOp::Q65_PILEUP != m_specOp and
( tlist.at(1)==my_callsign or
tlist.at(2)==my_callsign ) and
stdCall(my_callsign)) {
@@ -5888,6 +6093,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
if(SpecOp::NA_VHF==m_specOp) sent=my_grid;
if(SpecOp::WW_DIGI==m_specOp) sent=my_grid;
if(SpecOp::ARRL_DIGI==m_specOp) sent=my_grid;
+ if(SpecOp::Q65_PILEUP==m_specOp) sent=my_grid;
if(SpecOp::FIELD_DAY==m_specOp) sent=m_config.Field_Day_Exchange();
if(SpecOp::RTTY==m_specOp) {
sent=rst + m_config.RTTY_Exchange();
@@ -6312,9 +6518,25 @@ void MainWindow::on_RoundRobin_currentTextChanged(QString text)
ui->sbTxPercent->setEnabled (text == tr ("Random"));
}
+void MainWindow::mousePressEvent(QMouseEvent *event)
+{
+ if(ui->q65Button->hasFocus() && (event->button() & Qt::RightButton)) {
+ m_specOp=m_config.special_op_id();
+ if (m_specOp==SpecOp::Q65_PILEUP) {
+ m_config.setSpecial_None();
+ ui->tx1->setEnabled(true);
+ ui->txb1->setEnabled(true);
+ } else {
+ m_config.setSpecial_Q65_Pileup();
+ }
+ m_specOp=m_config.special_op_id();
+ on_actionQ65_triggered();
+ }
+}
void MainWindow::on_dxCallEntry_textChanged (QString const& call)
{
+ set_dateTimeQSO (-1); // reset the QSO start time when DXCall changes
m_hisCall = call;
ui->dxGridEntry->clear();
statusChanged();
@@ -6479,16 +6701,26 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call,
}
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);
- updateRate();
+ if(m_mode=="Q65") {
+ m_score++;
+ m_EMEworked[call]=true;
+ if(m_specOp==SpecOp::Q65_PILEUP) {
+ rm_q3list_(const_cast<char *> (m_deCall.toLatin1().constData()), m_deCall.size());
+ refreshPileupList();
+ }
+ m_ActiveStationsWidget->setRate(m_score);
+ } else {
+ 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);
+ updateRate();
+ }
}
m_xSent.clear ();
@@ -6597,6 +6829,7 @@ void MainWindow::displayWidgets(qint64 n)
b=m_mode.startsWith("FST4");
ui->sbNB->setVisible(b);
genStdMsgs (m_rpt, true);
+ configActiveStations();
}
void MainWindow::on_actionFST4_triggered()
@@ -6788,7 +7021,6 @@ void MainWindow::on_actionFT8_triggered()
}
if(SpecOp::HOUND == m_specOp) {
ui->houndButton->setChecked(true);
- ui->houndButton->setStyleSheet("background-color: #ff0000;");
ui->txFirstCheckBox->setChecked(false);
ui->txFirstCheckBox->setEnabled(false);
ui->cbAutoSeq->setEnabled(false);
@@ -6809,10 +7041,8 @@ void MainWindow::on_actionFT8_triggered()
} else {
if (!(keep_frequency)) switch_mode (Modes::FT8);
}
-
if(m_specOp != SpecOp::HOUND) {
ui->houndButton->setChecked(false);
- ui->houndButton->setStyleSheet("");
}
m_specOp=m_config.special_op_id();
@@ -6822,15 +7052,16 @@ void MainWindow::on_actionFT8_triggered()
if(SpecOp::EU_VHF==m_specOp) t0="EU VHF";
if(SpecOp::FIELD_DAY==m_specOp) t0="Field Day";
if(SpecOp::RTTY==m_specOp) t0="FT RU";
- if(SpecOp::WW_DIGI==m_specOp) t0="WW_DIGI";
- if(SpecOp::ARRL_DIGI==m_specOp) t0="ARRL_DIGI";
+ if(SpecOp::WW_DIGI==m_specOp) t0="WW Digi";
+ if(SpecOp::ARRL_DIGI==m_specOp) t0="ARRL Digi";
+ if(SpecOp::Q65_PILEUP==m_specOp) t0="Q65 Pileup";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {
ui->labDXped->setVisible(true);
ui->labDXped->setText(t0);
}
- on_contest_log_action_triggered();
+ if(m_specOp!=SpecOp::Q65_PILEUP) on_contest_log_action_triggered();
}
if((SpecOp::FOX==m_specOp or SpecOp::HOUND==m_specOp) and !m_config.split_mode() and !m_bWarnedSplit) {
@@ -6842,6 +7073,7 @@ void MainWindow::on_actionFT8_triggered()
m_bWarnedSplit=true;
}
statusChanged();
+ configActiveStations();
}
void MainWindow::on_actionJT4_triggered()
@@ -7049,7 +7281,6 @@ void MainWindow::on_actionQ65_triggered()
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();
m_specOp=m_config.special_op_id();
if(m_specOp!=SpecOp::NONE and m_specOp!=SpecOp::FOX and m_specOp!=SpecOp::HOUND) {
@@ -7058,17 +7289,24 @@ void MainWindow::on_actionQ65_triggered()
if(SpecOp::EU_VHF==m_specOp) t0="EU VHF";
if(SpecOp::FIELD_DAY==m_specOp) t0="Field Day";
if(SpecOp::RTTY==m_specOp) t0="FT RU";
- if(SpecOp::WW_DIGI==m_specOp) t0="WW_DIGI";
- if(SpecOp::ARRL_DIGI==m_specOp) t0="ARRL_DIGI";
+ if(SpecOp::WW_DIGI==m_specOp) t0="WW Digi";
+ if(SpecOp::ARRL_DIGI==m_specOp) t0="ARRL Digi";
+ if(SpecOp::Q65_PILEUP==m_specOp) t0="Q65 Pileup";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {
ui->labDXped->setVisible(true);
ui->labDXped->setText(t0);
}
- on_contest_log_action_triggered();
+ if(m_specOp!=SpecOp::Q65_PILEUP) {
+ on_contest_log_action_triggered();
+ } else {
+ if(ui->txrb1->isChecked()) on_txb2_clicked();
+ ui->tx1->setEnabled(true);
+ ui->txb1->setEnabled(true);
+ }
}
-
+ statusChanged();
}
void MainWindow::on_actionMSK144_triggered()
@@ -7244,6 +7482,12 @@ void MainWindow::on_actionFreqCal_triggered()
void MainWindow::switch_mode (Mode mode)
{
+ if (m_mode != "Q65" && m_specOp==SpecOp::Q65_PILEUP) {
+ m_config.setSpecial_None();
+ m_specOp=m_config.special_op_id();
+ ui->tx1->setEnabled(true);
+ ui->txb1->setEnabled(true);
+ }
m_fastGraph->setMode(m_mode);
m_config.frequencies ()->filter (m_config.region (), mode, true); // filter on current time
auto const& row = m_config.frequencies ()->best_working_frequency (m_freqNominal);
@@ -7436,6 +7680,17 @@ void MainWindow::on_actionErase_ALL_TXT_triggered() //Erase ALL.TXT
}
}
+void MainWindow::on_actionErase_list_of_Q65_callers_triggered()
+{
+ int ret = MessageBox::query_message (this, tr ("Confirm Erase"),
+ tr ("Are you sure you want to erase the list of Q65 callers?"));
+ if(ret==MessageBox::Yes) {
+ QFile f {m_config.writeable_data_dir ().absoluteFilePath ("tsil.3q")};
+ f.remove();
+ }
+}
+
+
void MainWindow::on_reset_cabrillo_log_action_triggered ()
{
if (MessageBox::Yes == MessageBox::query_message (this, tr ("Confirm Reset"),
@@ -7447,8 +7702,12 @@ 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_EMECall.clear(); //ditto for EME calls
m_score=0;
- if (m_ActiveStationsWidget) m_ActiveStationsWidget->setScore(0);
+ if (m_ActiveStationsWidget) {
+ m_ActiveStationsWidget->setScore(0);
+ if(m_mode=="Q65") m_ActiveStationsWidget->setRate(0);
+ }
}
}
@@ -7527,6 +7786,8 @@ void MainWindow::on_bandComboBox_activated (int index)
m_bandEdited = true;
band_changed (frequency);
m_wideGraph->setRxBand (m_config.bands ()->find (frequency));
+ m_specOp=m_config.special_op_id();
+ if (m_specOp==SpecOp::HOUND) auto_tx_mode(false);
}
void MainWindow::band_changed (Frequency f)
@@ -7572,6 +7833,8 @@ void MainWindow::band_changed (Frequency f)
}
setRig (f);
setXIT (ui->TxFreqSpinBox->value ());
+ m_specOp=m_config.special_op_id();
+ if (m_specOp==SpecOp::FOX) FoxReset("BandChange"); // when changing bands, don't preserve the Fox queues
}
}
@@ -7819,7 +8082,7 @@ void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const&
if(m_lastDialFreq != m_freqNominal and m_ActiveStationsWidget != NULL) {
m_recentCall.clear();
- m_ActiveStationsWidget->erase();
+ if(m_mode!="Q65") m_ActiveStationsWidget->erase();
}
m_lastDialFreq = m_freqNominal;
@@ -8455,6 +8718,7 @@ void MainWindow::locationChange (QString const& location)
if (m_config.my_grid () != grid) {
m_config.set_location (grid);
genStdMsgs (m_rpt, false);
+ pskSetLocal ();
statusUpdate ();
}
} else {
@@ -9171,6 +9435,112 @@ void MainWindow::write_transmit_entry (QString const& file_name)
}
}
+void MainWindow::readWidebandDecodes()
+{
+ if(m_ActiveStationsWidget==NULL) return;
+ int nhr=0;
+ int nmin=0;
+ int nsnr=0;
+ while(m_fetched < qmapcom.ndecodes) {
+ QString line=QString::fromLatin1(qmapcom.result[m_fetched]);
+ m_fetched++;
+ nhr=line.mid(0,2).toInt();
+ nmin=line.mid(2,2).toInt();
+ double frx=line.mid(4,9).toDouble();
+ double fsked=line.mid(13,7).toDouble();
+ QString msg=line.mid(34,-1);
+ int i1=msg.indexOf(" ");
+ int i2=i1 +1 + msg.mid(i1+1,-1).indexOf(" ");
+ QString dxcall=msg.mid(i1+1,i2-i1-1);
+ if(stdCall(dxcall)) {
+ QString w3=msg.mid(i2+1,-1);
+ nsnr=line.mid(29,3).toInt();
+ m_EMECall[dxcall].frx=frx;
+ m_EMECall[dxcall].fsked=fsked;
+ m_EMECall[dxcall].nsnr=nsnr;
+ m_EMECall[dxcall].t=60*nhr + nmin;
+ if(w3.contains(grid_regexp)) m_EMECall[dxcall].grid4=w3;
+ bool bCQ=line.contains(" CQ ");
+ m_EMECall[dxcall].ready2call=(bCQ or line.contains(" 73") or line.contains(" RR73"));
+ Frequency frequency = (m_freqNominal/1000000) * 1000000 + int(fsked*1000.0);
+ bool bFromDisk=qmapcom.nQDecoderDone==2;
+ if(!bFromDisk and (m_EMECall[dxcall].grid4.contains(grid_regexp) or bCQ)) {
+ qDebug() << "To PSKreporter:" << dxcall << m_EMECall[dxcall].grid4 << frequency << m_mode << nsnr;
+ if (!m_psk_Reporter.addRemoteStation (dxcall, m_EMECall[dxcall].grid4, frequency, m_mode, nsnr)) {
+ showStatusMessage (tr ("Spotting to PSK Reporter unavailable"));
+ }
+ }
+ }
+ }
+
+ if (m_config.spot_to_psk_reporter ()) {
+ m_psk_Reporter.sendReport(); // Upload any queued spots
+ }
+
+// Update "m_wEMECall" by reading qmap_decodes.txt
+ QMap<QString,EMECall>::iterator i;
+ QString t="";
+ QString t1;
+ QString dxcall;
+ QString dxgrid4;
+ QStringList list;
+ float f[100];
+ int indx[100];
+ int maxAge=m_ActiveStationsWidget->maxAge();
+
+ m_ActiveStationsWidget->setClickOK(false);
+ int k=0;
+
+ for(i=m_EMECall.begin(); i!=m_EMECall.end(); i++) {
+ bool bSkip=false;
+ if(m_ActiveStationsWidget->wantedOnly() and m_EMEworked[i.key()]) bSkip=true;
+ if(m_ActiveStationsWidget->readyOnly() and !i->ready2call) bSkip=true;
+ if(!bSkip) {
+ int snr=i->nsnr;
+ int odd=1 - (i->t)%2;
+ int age=60*nhr + nmin - (i->t);
+ char c2[3]={32,32,0};
+ if(age<0) age += 1440;
+ if(age<=maxAge) {
+ dxcall=(i.key()+" ").left(8);
+ dxgrid4=(i->grid4+"... ").left(4);
+ if(!m_EMEworked[dxcall.trimmed()]) c2[0]=35; //# for not in log
+ if(i->ready2call) c2[1]=42; //* for ready to call
+ t1=t1.asprintf("%7.3f %5.1f %+03d %8s %4s %3d %3d %2s\n",i->frx,i->fsked,snr,dxcall.toLatin1().constData(),
+ dxgrid4.toLatin1().constData(),odd,age,c2);
+ f[k]=i->fsked;
+ list.append(t1);
+ k++;
+ }
+ m_ActiveStationsWidget->setClickOK(true);
+ }
+ }
+
+ if(k>0) {
+ t1="";
+ int kz=k;
+ indexx_(f,&kz,indx);
+ for(int k=0; k<kz; k++) {
+ int j=indx[k]-1;
+ t1=t1.asprintf("%2d. ",k+1);
+ t1+=list[j];
+ m_ready2call[k]=list[j];
+ t+=t1;
+ }
+ }
+
+ if(m_ActiveStationsWidget != NULL) {
+ m_ActiveStationsWidget->erase();
+ m_ActiveStationsWidget->displayRecentStations(m_mode,t);
+ m_ActiveStationsWidget->setClickOK(true);
+ }
+ if(ipc_qmap[2]!=0) {
+ m_fetched=0;
+ ipc_qmap[0]=0;
+ ipc_qmap[2]=0;
+ }
+}
+
// -------------------------- Code for FT8 DXpedition Mode ---------------------------
void MainWindow::hound_reply ()
@@ -9207,6 +9577,21 @@ void MainWindow::on_sbMax_dB_valueChanged(int n)
t = t.asprintf(" Max_dB %d",m_max_dB);
writeFoxQSO(t);
}
+void MainWindow::FoxReset(QString reason="")
+{
+ QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
+ f.remove();
+ ui->decodedTextBrowser->setText("");
+ ui->houndQueueTextBrowser->setText("");
+ ui->foxTxListTextBrowser->setText("");
+
+ m_houndQueue.clear();
+ m_foxQSO.clear();
+ m_foxQSOinProgress.clear();
+ m_discard_decoded_hounds_this_cycle = true; // discard decoded messages until the next cycle
+ if (reason != "") writeFoxQSO(" " + reason);
+ writeFoxQSO(" Reset");
+}
void MainWindow::on_pbFoxReset_clicked()
{
@@ -9214,16 +9599,7 @@ void MainWindow::on_pbFoxReset_clicked()
auto button = MessageBox::query_message (this, tr ("Confirm Reset"),
tr ("Are you sure you want to clear the QSO queues?"));
if(button == MessageBox::Yes) {
- QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
- f.remove();
- ui->decodedTextBrowser->setText("");
- ui->houndQueueTextBrowser->setText("");
- ui->foxTxListTextBrowser->setText("");
-
- m_houndQueue.clear();
- m_foxQSO.clear();
- m_foxQSOinProgress.clear();
- writeFoxQSO(" Reset");
+ FoxReset();
}
}
@@ -9347,6 +9723,7 @@ void MainWindow::selectHound(QString line, bool bTopQueue)
* <Enter> is equivalent to double-clicking on the top-most line.
*/
if(line.length()==0) return;
+ if(line.length() < 6) return;
QString houndCall=line.split(" ",SkipEmptyParts).at(0);
// Don't add a call already enqueued or in QSO
@@ -9391,6 +9768,15 @@ void MainWindow::houndCallers()
* Distance, Age, and Continent) to a list, sort the list by specified criteria,
* and display the top N_Hounds entries in the left text window.
*/
+ // if frequency was changed in the middle of an interval, there's a flag set to ignore the decodes. Reset it here
+ //
+
+ if (m_discard_decoded_hounds_this_cycle)
+ {
+ m_discard_decoded_hounds_this_cycle = false; //
+ return; // don't use these decodes
+ }
+
QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
QTextStream s(&f);
@@ -9606,26 +9992,33 @@ list2Done:
}
if(hc1!="") {
- // Log this QSO!
- auto QSO_time = QDateTime::currentDateTimeUtc ();
- m_hisCall=hc1;
- m_hisGrid=m_foxQSO[hc1].grid;
- m_rptSent=m_foxQSO[hc1].sent;
- m_rptRcvd=m_foxQSO[hc1].rcvd;
- if (!m_foxLogWindow) on_fox_log_action_triggered ();
- if (m_logBook.fox_log ()->add_QSO (QSO_time, m_hisCall, m_hisGrid, m_rptSent, m_rptRcvd, m_lastBand))
+ auto already_logged = m_loggedByFox[hc1].contains(m_lastBand + " "); // already logged this call on this band?
+
+ if (!already_logged) { // Log this QSO!
+ auto QSO_time = QDateTime::currentDateTimeUtc ();
+ m_hisCall=hc1;
+ m_hisGrid=m_foxQSO[hc1].grid;
+ m_rptSent=m_foxQSO[hc1].sent;
+ m_rptRcvd=m_foxQSO[hc1].rcvd;
+ if (!m_foxLogWindow) on_fox_log_action_triggered ();
+ if (m_logBook.fox_log ()->add_QSO (QSO_time, m_hisCall, m_hisGrid, m_rptSent, m_rptRcvd, m_lastBand))
+ {
+ writeFoxQSO (QString {" Log: %1 %2 %3 %4 %5"}.arg (m_hisCall).arg (m_hisGrid)
+ .arg (m_rptSent).arg (m_rptRcvd).arg (m_lastBand));
+ on_logQSOButton_clicked ();
+ QTimer::singleShot (13000, [=] {
+ m_foxQSOinProgress.removeOne(hc1); //Remove from In Progress window
+ updateFoxQSOsInProgressDisplay(); //Update InProgress display after Tx is complete
+ });
+ }
+ m_loggedByFox[hc1] += (m_lastBand + " ");
+ }
+ else
{
- writeFoxQSO (QString {" Log: %1 %2 %3 %4 %5"}.arg (m_hisCall).arg (m_hisGrid)
- .arg (m_rptSent).arg (m_rptRcvd).arg (m_lastBand));
- on_logQSOButton_clicked ();
- m_foxRateQueue.enqueue (now); //Add present time in seconds
- //to Rate queue.
- QTimer::singleShot (13000, [=] {
- m_foxQSOinProgress.removeOne(hc1); //Remove from In Progress window
- updateFoxQSOsInProgressDisplay(); //Update InProgress display after Tx is complete
- });
+ // note that this is a duplicate
+ writeFoxQSO(QString{" Dup: %1 %2 %3 %4 %5"}.arg(m_hisCall).arg(m_hisGrid)
+ .arg(m_rptSent).arg(m_rptRcvd).arg(m_lastBand));
}
- m_loggedByFox[hc1] += (m_lastBand + " ");
}
if(i<n2 and fm=="") {
@@ -9675,19 +10068,21 @@ Transmit:
}
}
- while(!m_foxRateQueue.isEmpty()) {
- qint64 age = now - m_foxRateQueue.head();
- if(age < 3600) break;
- m_foxRateQueue.dequeue();
- }
if (m_foxLogWindow)
{
- m_foxLogWindow->rate (m_foxRateQueue.size ());
+ update_foxLogWindow_rate();
m_foxLogWindow->queued (m_foxQSOinProgress.count ());
}
updateFoxQSOsInProgressDisplay();
}
+void MainWindow::update_foxLogWindow_rate()
+{
+ if (m_foxLogWindow) {
+ m_foxLogWindow->rate(m_logBook.fox_log()->rate());
+ }
+}
+
void MainWindow::rm_tb4(QString houndCall)
{
if(houndCall=="") return;
@@ -9842,6 +10237,7 @@ void MainWindow::foxTest()
return;
}
+
QTextStream s(&f);
QTextStream sdiag(&fdiag);
@@ -9901,14 +10297,14 @@ void MainWindow::foxTest()
m_houndQueue.swap(tmpQueue);
}
if(line.contains("Rx:")) {
- msg=line.mid(43);
+ msg=line.mid(37+6);
t=msg.mid(24);
int i0=t.indexOf(" ");
hc1=t.mid(i0+1);
int i1=hc1.indexOf(" ");
hc1=hc1.mid(0,i1);
int i2=qMax(msg.indexOf("R+"),msg.indexOf("R-"));
- if(i2>20) {
+ if(i2>10) {
rptRcvd=msg.mid(i2,4);
foxRxSequencer(msg,hc1,rptRcvd);
}
@@ -10021,15 +10417,16 @@ void MainWindow::chkFT4()
if(SpecOp::EU_VHF==m_specOp) t0="EU VHF";
if(SpecOp::FIELD_DAY==m_specOp) t0="Field Day";
if(SpecOp::RTTY==m_specOp) t0="FT RU";
- if(SpecOp::WW_DIGI==m_specOp) t0="WW_DIGI";
- if(SpecOp::ARRL_DIGI==m_specOp) t0="ARRL_DIGI";
+ if(SpecOp::WW_DIGI==m_specOp) t0="WW Digi";
+ if(SpecOp::ARRL_DIGI==m_specOp) t0="ARRL Digi";
+ if(SpecOp::Q65_PILEUP==m_specOp) t0="Q65 Pileup";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {
ui->labDXped->setVisible(true);
ui->labDXped->setText(t0);
}
- on_contest_log_action_triggered();
+ if(m_specOp!=SpecOp::Q65_PILEUP) on_contest_log_action_triggered();
}
if (SpecOp::HOUND == m_specOp or SpecOp::FOX == m_specOp) {
ui->labDXped->setVisible(false);
@@ -10061,6 +10458,17 @@ void MainWindow::set_mode (QString const& mode)
else if ("Echo" == mode) on_actionEcho_triggered ();
}
+void MainWindow::configActiveStations()
+{
+ if(m_ActiveStationsWidget!=NULL and (m_mode=="Q65" or m_mode=="FT4" or m_mode=="FT8")) {
+ if(m_specOp==SpecOp::Q65_PILEUP) {
+ m_ActiveStationsWidget->displayRecentStations("Q65-pileup","");
+ } else {
+ m_ActiveStationsWidget->displayRecentStations(m_mode,"");
+ }
+ }
+}
+
void MainWindow::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)
@@ -10173,10 +10581,11 @@ QString MainWindow::WSPR_message()
void MainWindow::on_houndButton_clicked (bool checked)
{
if (checked) {
- ui->houndButton->setStyleSheet("background-color: #ff0000;");
m_config.setSpecial_Hound();
+ ui->tx1->setVisible(true);
+ ui->tx1->setEnabled(true);
+ ui->txb1->setEnabled(true);
} else {
- ui->houndButton->setStyleSheet("");
m_config.setSpecial_None();
keep_frequency = true;
QTimer::singleShot (250, [=] {keep_frequency = false;});
@@ -10187,8 +10596,6 @@ void MainWindow::on_houndButton_clicked (bool checked)
void MainWindow::on_ft8Button_clicked()
{
- ui->houndButton->setChecked(false);
- ui->houndButton->setStyleSheet("");
if(m_specOp==SpecOp::HOUND) {
m_config.setSpecial_None();
m_specOp=m_config.special_op_id();
@@ -10198,8 +10605,6 @@ void MainWindow::on_ft8Button_clicked()
void MainWindow::on_ft4Button_clicked()
{
- ui->houndButton->setChecked(false);
- ui->houndButton->setStyleSheet("");
if(m_specOp==SpecOp::HOUND) {
m_config.setSpecial_None();
m_specOp=m_config.special_op_id();
@@ -10209,8 +10614,6 @@ void MainWindow::on_ft4Button_clicked()
void MainWindow::on_msk144Button_clicked()
{
- ui->houndButton->setChecked(false);
- ui->houndButton->setStyleSheet("");
if(m_specOp==SpecOp::HOUND) {
m_config.setSpecial_None();
m_specOp=m_config.special_op_id();
@@ -10220,8 +10623,6 @@ void MainWindow::on_msk144Button_clicked()
void MainWindow::on_q65Button_clicked()
{
- ui->houndButton->setChecked(false);
- ui->houndButton->setStyleSheet("");
if(m_specOp==SpecOp::HOUND) {
m_config.setSpecial_None();
m_specOp=m_config.special_op_id();
@@ -10231,8 +10632,6 @@ void MainWindow::on_q65Button_clicked()
void MainWindow::on_jt65Button_clicked()
{
- ui->houndButton->setChecked(false);
- ui->houndButton->setStyleSheet("");
if(m_specOp==SpecOp::HOUND) {
m_config.setSpecial_None();
m_specOp=m_config.special_op_id();
diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h
index b8b9b020..8c067e4c 100755
--- a/widgets/mainwindow.h
+++ b/widgets/mainwindow.h
@@ -167,6 +167,7 @@ private slots:
void on_actionQSG_FST4_triggered();
void on_actionQSG_Q65_triggered();
void on_actionQSG_X250_M3_triggered();
+ void on_actionQuick_Start_Guide_to_WSJT_X_2_7_and_QMAP_triggered();
void on_actionOnline_User_Guide_triggered();
void on_actionLocal_User_Guide_triggered();
void on_actionWide_Waterfall_triggered();
@@ -211,6 +212,7 @@ private slots:
void on_txb6_clicked();
void on_lookupButton_clicked();
void on_addButton_clicked();
+ void mousePressEvent(QMouseEvent *event) override;
void on_dxCallEntry_textChanged (QString const&);
void on_dxGridEntry_textChanged (QString const&);
void on_dxCallEntry_editingFinished();
@@ -234,6 +236,7 @@ private slots:
void on_reset_cabrillo_log_action_triggered ();
void on_actionErase_wsjtx_log_adi_triggered();
void on_actionErase_WSPR_hashtable_triggered();
+ void on_actionErase_list_of_Q65_callers_triggered();
void on_actionExport_Cabrillo_log_triggered();
void startTx2();
void startP1();
@@ -326,12 +329,13 @@ private slots:
void on_sbF_High_valueChanged(int n);
void chk_FST4_freq_range();
void on_pbFoxReset_clicked();
+ void FoxReset(QString reason);
void on_comboBoxHoundSort_activated (int index);
void not_GA_warning_message ();
void checkMSK144ContestType();
void on_pbBestSP_clicked();
void on_RoundRobin_currentTextChanged(QString text);
- void setTxMsg(int n);
+ void setTxMsg(int n);
bool stdCall(QString const& w);
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
@@ -373,6 +377,8 @@ private:
void setColorHighlighting();
void chkFT4();
bool elide_tx1_not_allowed () const;
+ void readWidebandDecodes();
+ void configActiveStations();
QProcessEnvironment const& m_env;
NetworkAccessManager m_network_manager;
@@ -508,6 +514,7 @@ private:
qint32 m_score=0;
qint32 m_fDop=0;
qint32 m_echoSec0=0;
+ qint32 m_fetched=0;
bool m_btxok; //True if OK to transmit
bool m_diskData;
@@ -564,6 +571,7 @@ private:
bool m_bBestSPArmed=false;
bool m_bOK_to_chk=false;
bool m_bSentReport=false;
+ bool m_discard_decoded_hounds_this_cycle=false; // if something changes, like frequency, discard decoded messages that may be in-flight.
SpecOp m_specOp;
@@ -665,6 +673,7 @@ private:
QString m_deCall;
QString m_deGrid;
QString m_ready2call[50];
+ QString m_callers[50];
QSet<QString> m_pfx;
QSet<QString> m_sfx;
@@ -701,6 +710,20 @@ private:
};
QMap<QString,ActiveCall> m_activeCall; //Key = callsign, value = grid4, az, points for ARRL_DIGI
+ struct EMECall
+ {
+ QString grid4;
+ double frx;
+ double fsked;
+ qint32 nsnr;
+ qint32 t;
+ bool worked;
+ bool ready2call;
+ };
+ QMap<QString,EMECall> m_EMECall;
+
+ QMap<QString,bool> m_EMEworked;
+
struct RecentCall
{
qint64 dialFreq;
@@ -722,7 +745,6 @@ private:
QQueue<QString> m_houndQueue; //Selected Hounds available for starting a QSO
QQueue<QString> m_foxQSOinProgress; //QSOs in progress: Fox has sent a report
- QQueue<qint64> m_foxRateQueue;
QDateTime m_dateTimeQSOOn;
QDateTime m_dateTimeLastTX;
@@ -842,12 +864,15 @@ private:
void foxTxSequencer();
void foxGenWaveform(int i,QString fm);
void writeFoxQSO (QString const& msg);
+ void update_foxLogWindow_rate();
void to_jt9(qint32 n, qint32 istart, qint32 idone);
bool is77BitMode () const;
void cease_auto_Tx_after_QSO ();
Q_SLOT void ARRL_Digi_Display();
void ARRL_Digi_Update(DecodedText dt);
void activeWorked(QString call, QString band);
+ void read_log();
+ void refreshPileupList();
};
extern int killbyname(const char* progName);
diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui
index 790add73..7a2909ed 100755
--- a/widgets/mainwindow.ui
+++ b/widgets/mainwindow.ui
@@ -1287,21 +1287,27 @@ When not checked you can view the calibration results.</string>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,6,0">
<item>
<widget class="QPushButton" name="pbR2T">
<property name="sizePolicy">
- <sizepolicy hsizetype="Ignored" vsizetype="Fixed">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
- <width>35</width>
+ <width>15</width>
<height>0</height>
</size>
</property>
+ <property name="maximumSize">
+ <size>
+ <width>35</width>
+ <height>16777215</height>
+ </size>
+ </property>
<property name="toolTip">
<string>Set Tx frequency to Rx Frequency</string>
</property>
@@ -1315,6 +1321,18 @@ When not checked you can view the calibration results.</string>
</item>
<item>
<widget class="HintedSpinBox" name="sbFtol">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
<property name="toolTip">
<string>Frequency tolerance (Hz)</string>
</property>
@@ -1338,17 +1356,23 @@ When not checked you can view the calibration results.</string>
<item>
<widget class="QPushButton" name="pbT2R">
<property name="sizePolicy">
- <sizepolicy hsizetype="Ignored" vsizetype="Fixed">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
- <width>35</width>
+ <width>15</width>
<height>0</height>
</size>
</property>
+ <property name="maximumSize">
+ <size>
+ <width>35</width>
+ <height>16777215</height>
+ </size>
+ </property>
<property name="toolTip">
<string>Set Rx frequency to Tx Frequency</string>
</property>
@@ -1611,6 +1635,9 @@ When not checked you can view the calibration results.</string>
<property name="toolTip">
<string>Maximum drift rate in units of symbol rate per transmission.</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
<property name="prefix">
<string>Max Drift </string>
</property>
@@ -2893,6 +2920,11 @@ QLabel[oob=&quot;true&quot;] {
<property name="toolTip">
<string>Toggle FT8 hound mode On/Off</string>
</property>
+ <property name="styleSheet">
+ <string notr="true">QPushButton:checked {
+ background-color: red;
+}</string>
+ </property>
<property name="text">
<string>H</string>
</property>
@@ -2981,8 +3013,11 @@ QLabel[oob=&quot;true&quot;] {
<height>16777215</height>
</size>
</property>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
<property name="toolTip">
- <string>Switch to Q65 mode</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Switch to Q65 mode. Right-click to toggle Q65 Pileup mode On/Off.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Q65</string>
@@ -3166,6 +3201,7 @@ QPushButton[state=&quot;ok&quot;] {
<addaction name="actionErase_ALL_TXT"/>
<addaction name="actionErase_wsjtx_log_adi"/>
<addaction name="actionErase_WSPR_hashtable"/>
+ <addaction name="actionErase_list_of_Q65_callers"/>
<addaction name="reset_cabrillo_log_action"/>
<addaction name="actionExport_Cabrillo_log"/>
<addaction name="actionOpen_log_directory"/>
@@ -3229,6 +3265,7 @@ QPushButton[state=&quot;ok&quot;] {
<addaction name="actionQSG_FST4"/>
<addaction name="actionQSG_Q65"/>
<addaction name="actionQSG_X250_M3"/>
+ <addaction name="actionQuick_Start_Guide_to_WSJT_X_2_7_and_QMAP"/>
<addaction name="download_samples_action"/>
<addaction name="separator"/>
<addaction name="actionKeyboard_shortcuts"/>
@@ -3805,6 +3842,16 @@ QPushButton[state=&quot;ok&quot;] {
<string>Active Stations</string>
</property>
</action>
+ <action name="actionQuick_Start_Guide_to_WSJT_X_2_7_and_QMAP">
+ <property name="text">
+ <string>Quick-Start Guide to WSJT-X 2.7 and QMAP</string>
+ </property>
+ </action>
+ <action name="actionErase_list_of_Q65_callers">
+ <property name="text">
+ <string>Erase list of Q65 callers</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp
index b237d5cb..4ed6cd28 100755
--- a/widgets/plotter.cpp
+++ b/widgets/plotter.cpp
@@ -280,27 +280,28 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
painter2D.drawText(x1-4,y,"73");
}
- if(bRed and m_bQ65_Sync) { //Plot the Q65 red/orange sync curves
+ if(bRed and m_bQ65_Sync) { //Plot the Q65 orange (current) and red (average) sync curves
int k=0;
int k2=0;
std::ifstream f;
f.open(m_redFile.toLatin1());
if(f) {
int x,y;
- float freq,xdt,smin,smax,sync,sync2;
+ float freq,xdt,smin,smax,sync_avg,sync_current;
f >> xdt >> smin >> smax;
if(f) {
for(int i=0; i<99999; i++) {
- f >> freq >> sync >> sync2;
+ f >> freq >> sync_avg >> sync_current;
if(!f or f.eof() or k>=MAX_SCREENSIZE or k2>=MAX_SCREENSIZE) break;
x=XfromFreq(freq);
- if(sync > -99.0 and (smin!=0.0 or smax != 0.0)) {
- y=m_h2*(0.9 - 0.09*gain2d*sync) - m_plot2dZero - 10;
- LineBuf2[k2].setX(x); //Red sync curve
+ // Plot the red curve only if we have averaged 2 or more Rx sequences.
+ if(sync_avg > -99.0 and (smin!=0.0 or smax != 0.0)) {
+ y=m_h2*(0.9 - 0.09*gain2d*gain2d*sync_avg) - m_plot2dZero - 10;
+ LineBuf2[k2].setX(x); //Red sync curve (average)
LineBuf2[k2].setY(y);
k2++;
}
- y=m_h2*(0.9 - 0.09*gain2d*sync2) - m_plot2dZero;
+ y=m_h2*(0.9 - 0.09*gain2d*gain2d*sync_current) - m_plot2dZero;
LineBuf3[k].setX(x); //Orange sync curve
LineBuf3[k].setY(y);
k++;