Merge branch 'release-2.3.0' into develop

This commit is contained in:
Bill Somerville 2020-12-30 21:47:24 +00:00
commit 1583eb34ce
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
9 changed files with 44 additions and 16 deletions

View File

@ -569,7 +569,8 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con
, bool watchdog_timeout, QString const& sub_mode , bool watchdog_timeout, QString const& sub_mode
, bool fast_mode, quint8 special_op_mode , bool fast_mode, quint8 special_op_mode
, quint32 frequency_tolerance, quint32 tr_period , quint32 frequency_tolerance, quint32 tr_period
, QString const& configuration_name) , QString const& configuration_name
, QString const& tx_message)
{ {
if (m_->server_port_ && !m_->server_.isNull ()) if (m_->server_port_ && !m_->server_.isNull ())
{ {
@ -578,8 +579,9 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con
out << f << mode.toUtf8 () << dx_call.toUtf8 () << report.toUtf8 () << tx_mode.toUtf8 () out << f << mode.toUtf8 () << dx_call.toUtf8 () << report.toUtf8 () << tx_mode.toUtf8 ()
<< tx_enabled << transmitting << decoding << rx_df << tx_df << de_call.toUtf8 () << tx_enabled << transmitting << decoding << rx_df << tx_df << de_call.toUtf8 ()
<< de_grid.toUtf8 () << dx_grid.toUtf8 () << watchdog_timeout << sub_mode.toUtf8 () << de_grid.toUtf8 () << dx_grid.toUtf8 () << watchdog_timeout << sub_mode.toUtf8 ()
<< fast_mode << special_op_mode << frequency_tolerance << tr_period << configuration_name.toUtf8 (); << fast_mode << special_op_mode << frequency_tolerance << tr_period << configuration_name.toUtf8 ()
TRACE_UDP ("frequency:" << f << "mode:" << mode << "DX:" << dx_call << "report:" << report << "Tx mode:" << tx_mode << "tx_enabled:" << tx_enabled << "Tx:" << transmitting << "decoding:" << decoding << "Rx df:" << rx_df << "Tx df:" << tx_df << "DE:" << de_call << "DE grid:" << de_grid << "DX grid:" << dx_grid << "w/d t/o:" << watchdog_timeout << "sub_mode:" << sub_mode << "fast mode:" << fast_mode << "spec op mode:" << special_op_mode << "frequency tolerance:" << frequency_tolerance << "T/R period:" << tr_period << "configuration name:" << configuration_name); << tx_message.toUtf8 ();
TRACE_UDP ("frequency:" << f << "mode:" << mode << "DX:" << dx_call << "report:" << report << "Tx mode:" << tx_mode << "tx_enabled:" << tx_enabled << "Tx:" << transmitting << "decoding:" << decoding << "Rx df:" << rx_df << "Tx df:" << tx_df << "DE:" << de_call << "DE grid:" << de_grid << "DX grid:" << dx_grid << "w/d t/o:" << watchdog_timeout << "sub_mode:" << sub_mode << "fast mode:" << fast_mode << "spec op mode:" << special_op_mode << "frequency tolerance:" << frequency_tolerance << "T/R period:" << tr_period << "configuration name:" << configuration_name << "Tx message:" << tx_message);
m_->send_message (out, message); m_->send_message (out, message);
} }
} }

View File

@ -63,7 +63,8 @@ public:
, quint32 rx_df, quint32 tx_df, QString const& de_call, QString const& de_grid , quint32 rx_df, quint32 tx_df, QString const& de_call, QString const& de_grid
, QString const& dx_grid, bool watchdog_timeout, QString const& sub_mode , QString const& dx_grid, bool watchdog_timeout, QString const& sub_mode
, bool fast_mode, quint8 special_op_mode, quint32 frequency_tolerance , bool fast_mode, quint8 special_op_mode, quint32 frequency_tolerance
, quint32 tr_period, QString const& configuration_name); , quint32 tr_period, QString const& configuration_name
, QString const& tx_message);
Q_SLOT void decode (bool is_new, QTime time, qint32 snr, float delta_time, quint32 delta_frequency Q_SLOT void decode (bool is_new, QTime time, qint32 snr, float delta_time, quint32 delta_frequency
, QString const& mode, QString const& message, bool low_confidence , QString const& mode, QString const& message, bool low_confidence
, bool off_air); , bool off_air);

View File

@ -160,6 +160,7 @@
* Frequency Tolerance quint32 * Frequency Tolerance quint32
* T/R Period quint32 * T/R Period quint32
* Configuration Name utf8 * Configuration Name utf8
* Tx Message utf8
* *
* WSJT-X sends this status message when various internal state * WSJT-X sends this status message when various internal state
* changes to allow the server to track the relevant state of each * changes to allow the server to track the relevant state of each
@ -183,7 +184,8 @@
* when the Tx watchdog is set or reset, * when the Tx watchdog is set or reset,
* when the frequency tolerance is changed, * when the frequency tolerance is changed,
* when the T/R period is changed, * when the T/R period is changed,
* when the configuration name changes. * when the configuration name changes,
* when the message being transmitted changes.
* *
* The Special operation mode is an enumeration that indicates the * The Special operation mode is an enumeration that indicates the
* setting selected in the WSJT-X "Settings->Advanced->Special * setting selected in the WSJT-X "Settings->Advanced->Special

View File

@ -147,6 +147,7 @@ ClientWidget::ClientWidget (QAbstractItemModel * decodes_model, QAbstractItemMod
, mode_line_edit_ {new QLineEdit {this}} , mode_line_edit_ {new QLineEdit {this}}
, frequency_tolerance_spin_box_ {new QSpinBox {this}} , frequency_tolerance_spin_box_ {new QSpinBox {this}}
, tx_mode_label_ {new QLabel {this}} , tx_mode_label_ {new QLabel {this}}
, tx_message_label_ {new QLabel {this}}
, submode_line_edit_ {new QLineEdit {this}} , submode_line_edit_ {new QLineEdit {this}}
, fast_mode_check_box_ {new QCheckBox {this}} , fast_mode_check_box_ {new QCheckBox {this}}
, tr_period_spin_box_ {new QSpinBox {this}} , tr_period_spin_box_ {new QSpinBox {this}}
@ -302,6 +303,7 @@ ClientWidget::ClientWidget (QAbstractItemModel * decodes_model, QAbstractItemMod
// set up status area // set up status area
status_bar_->addPermanentWidget (de_label_); status_bar_->addPermanentWidget (de_label_);
status_bar_->addPermanentWidget (tx_mode_label_); status_bar_->addPermanentWidget (tx_mode_label_);
status_bar_->addPermanentWidget (tx_message_label_);
status_bar_->addPermanentWidget (frequency_label_); status_bar_->addPermanentWidget (frequency_label_);
status_bar_->addPermanentWidget (tx_df_label_); status_bar_->addPermanentWidget (tx_df_label_);
status_bar_->addPermanentWidget (report_label_); status_bar_->addPermanentWidget (report_label_);
@ -400,7 +402,7 @@ void ClientWidget::update_status (ClientKey const& key, Frequency f, QString con
, QString const& de_call, QString const& de_grid, QString const& dx_grid , QString const& de_call, QString const& de_grid, QString const& dx_grid
, bool watchdog_timeout, QString const& submode, bool fast_mode , bool watchdog_timeout, QString const& submode, bool fast_mode
, quint8 special_op_mode, quint32 frequency_tolerance, quint32 tr_period , quint8 special_op_mode, quint32 frequency_tolerance, quint32 tr_period
, QString const& configuration_name) , QString const& configuration_name, QString const& tx_message)
{ {
if (key == key_) if (key == key_)
{ {
@ -427,8 +429,8 @@ void ClientWidget::update_status (ClientKey const& key, Frequency f, QString con
update_spin_box (frequency_tolerance_spin_box_, frequency_tolerance update_spin_box (frequency_tolerance_spin_box_, frequency_tolerance
, quint32_max == frequency_tolerance ? QString {"n/a"} : QString {}); , quint32_max == frequency_tolerance ? QString {"n/a"} : QString {});
update_line_edit (submode_line_edit_, submode, false); update_line_edit (submode_line_edit_, submode, false);
tx_mode_label_->setText (QString {"Tx Mode: %1"} tx_mode_label_->setText (tx_mode.isEmpty () || tx_mode == mode ? "" : "Tx Mode: (" + tx_mode + ')');
.arg (tx_mode.isEmpty () || tx_mode == mode ? "" : '(' + tx_mode + ')')); tx_message_label_->setText (tx_message.isEmpty () ? "" : "Tx Msg: " + tx_message.trimmed ());
frequency_label_->setText ("QRG: " + Radio::pretty_frequency_MHz_string (f)); frequency_label_->setText ("QRG: " + Radio::pretty_frequency_MHz_string (f));
update_line_edit (dx_call_line_edit_, dx_call); update_line_edit (dx_call_line_edit_, dx_call);
update_line_edit (dx_grid_line_edit_, dx_grid); update_line_edit (dx_grid_line_edit_, dx_grid);

View File

@ -52,7 +52,7 @@ public:
, QString const& de_call, QString const& de_grid, QString const& dx_grid , QString const& de_call, QString const& de_grid, QString const& dx_grid
, bool watchdog_timeout, QString const& sub_mode, bool fast_mode , bool watchdog_timeout, QString const& sub_mode, bool fast_mode
, quint8 special_op_mode, quint32 frequency_tolerance, quint32 tr_period , quint8 special_op_mode, quint32 frequency_tolerance, quint32 tr_period
, QString const& configuration_name); , QString const& configuration_name, QString const& tx_message);
Q_SLOT void decode_added (bool is_new, ClientKey const& key, QTime, qint32 snr Q_SLOT void decode_added (bool is_new, ClientKey const& key, QTime, qint32 snr
, float delta_time, quint32 delta_frequency, QString const& mode , float delta_time, quint32 delta_frequency, QString const& mode
, QString const& message, bool low_confidence, bool off_air); , QString const& message, bool low_confidence, bool off_air);
@ -122,6 +122,7 @@ private:
QLineEdit * mode_line_edit_; QLineEdit * mode_line_edit_;
QSpinBox * frequency_tolerance_spin_box_; QSpinBox * frequency_tolerance_spin_box_;
QLabel * tx_mode_label_; QLabel * tx_mode_label_;
QLabel * tx_message_label_;
QLineEdit * submode_line_edit_; QLineEdit * submode_line_edit_;
QCheckBox * fast_mode_check_box_; QCheckBox * fast_mode_check_box_;
QSpinBox * tr_period_spin_box_; QSpinBox * tr_period_spin_box_;

View File

@ -243,9 +243,11 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
quint32 frequency_tolerance {quint32_max}; quint32 frequency_tolerance {quint32_max};
quint32 tr_period {quint32_max}; quint32 tr_period {quint32_max};
QByteArray configuration_name; QByteArray configuration_name;
QByteArray tx_message;
in >> f >> mode >> dx_call >> report >> tx_mode >> tx_enabled >> transmitting >> decoding in >> f >> mode >> dx_call >> report >> tx_mode >> tx_enabled >> transmitting >> decoding
>> rx_df >> tx_df >> de_call >> de_grid >> dx_grid >> watchdog_timeout >> sub_mode >> rx_df >> tx_df >> de_call >> de_grid >> dx_grid >> watchdog_timeout >> sub_mode
>> fast_mode >> special_op_mode >> frequency_tolerance >> tr_period >> configuration_name; >> fast_mode >> special_op_mode >> frequency_tolerance >> tr_period >> configuration_name
>> tx_message;
if (check_status (in) != Fail) if (check_status (in) != Fail)
{ {
Q_EMIT self_->status_update (client_key, f, QString::fromUtf8 (mode) Q_EMIT self_->status_update (client_key, f, QString::fromUtf8 (mode)
@ -256,7 +258,8 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
, QString::fromUtf8 (dx_grid), watchdog_timeout , QString::fromUtf8 (dx_grid), watchdog_timeout
, QString::fromUtf8 (sub_mode), fast_mode , QString::fromUtf8 (sub_mode), fast_mode
, special_op_mode, frequency_tolerance, tr_period , special_op_mode, frequency_tolerance, tr_period
, QString::fromUtf8 (configuration_name)); , QString::fromUtf8 (configuration_name)
, QString::fromUtf8 (tx_message));
} }
} }
break; break;

View File

@ -97,7 +97,7 @@ public:
, QString const& de_call, QString const& de_grid, QString const& dx_grid , QString const& de_call, QString const& de_grid, QString const& dx_grid
, bool watchdog_timeout, QString const& sub_mode, bool fast_mode , bool watchdog_timeout, QString const& sub_mode, bool fast_mode
, quint8 special_op_mode, quint32 frequency_tolerance, quint32 tr_period , quint8 special_op_mode, quint32 frequency_tolerance, quint32 tr_period
, QString const& configuration_name); , QString const& configuration_name, QString const& tx_message);
Q_SIGNAL void client_closed (ClientKey const&); Q_SIGNAL void client_closed (ClientKey const&);
Q_SIGNAL void decode (bool is_new, ClientKey const&, QTime time, qint32 snr, float delta_time Q_SIGNAL void decode (bool is_new, ClientKey const&, QTime time, qint32 snr, float delta_time
, quint32 delta_frequency, QString const& mode, QString const& message , quint32 delta_frequency, QString const& mode, QString const& message

View File

@ -59,7 +59,7 @@ public:
, QString const& /*de_call*/, QString const& /*de_grid*/, QString const& /*dx_grid*/ , QString const& /*de_call*/, QString const& /*de_grid*/, QString const& /*dx_grid*/
, bool /* watchdog_timeout */, QString const& sub_mode, bool /*fast_mode*/ , bool /* watchdog_timeout */, QString const& sub_mode, bool /*fast_mode*/
, quint8 /*special_op_mode*/, quint32 /*frequency_tolerance*/, quint32 /*tr_period*/ , quint8 /*special_op_mode*/, quint32 /*frequency_tolerance*/, quint32 /*tr_period*/
, QString const& /*configuration_name*/) , QString const& /*configuration_name*/, QString const& /*tx_message*/)
{ {
if (key == key_) if (key == key_)
{ {

View File

@ -3577,7 +3577,16 @@ void MainWindow::readFromStdout() //readFromStdout
decodedtext.deCallAndGrid(/*out*/deCall,grid); decodedtext.deCallAndGrid(/*out*/deCall,grid);
{ {
auto t = Radio::base_callsign (ui->dxCallEntry->text ()); auto t = Radio::base_callsign (ui->dxCallEntry->text ());
if ((t == deCall || ui->dxCallEntry->text () == deCall || !t.size ()) && rpt.size ()) m_rptRcvd = rpt; auto const& dx_call = decodedtext.call ();
if (rpt.size () // report in message
&& (m_baseCall == Radio::base_callsign (dx_call) // for us
|| "DE" == dx_call) // probably for us
&& (t == deCall // DX station base call is QSO partner
|| ui->dxCallEntry->text () == deCall // DX station full call is QSO partner
|| !t.size ())) // not in QSO
{
m_rptRcvd = rpt;
}
} }
// extract details and send to PSKreporter // extract details and send to PSKreporter
int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged; int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
@ -4164,7 +4173,14 @@ void MainWindow::guiUpdate()
} }
} }
m_currentMessage = QString::fromLatin1(msgsent); {
auto temp = m_currentMessage;
m_currentMessage = QString::fromLatin1(msgsent);
if (m_currentMessage != temp) // check if tx message changed
{
statusUpdate ();
}
}
m_bCallingCQ = CALLING == m_QSOProgress m_bCallingCQ = CALLING == m_QSOProgress
|| m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "}); || m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "});
if(m_mode=="FT8" or m_mode=="FT4") { if(m_mode=="FT8" or m_mode=="FT4") {
@ -8389,7 +8405,8 @@ void MainWindow::statusUpdate () const
m_hisGrid, m_tx_watchdog, m_hisGrid, m_tx_watchdog,
submode != QChar::Null ? QString {submode} : QString {}, m_bFastMode, submode != QChar::Null ? QString {submode} : QString {}, m_bFastMode,
static_cast<quint8> (m_config.special_op_id ()), static_cast<quint8> (m_config.special_op_id ()),
ftol, tr_period, m_multi_settings->configuration_name ()); ftol, tr_period, m_multi_settings->configuration_name (),
m_currentMessage);
} }
void MainWindow::childEvent (QChildEvent * e) void MainWindow::childEvent (QChildEvent * e)