mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-01 13:44:08 -04:00
Add the Tx message to the UDP Status(1) message
Thanks to Morgan (sri no other attribution given) for the initial contribution this change is based on.
This commit is contained in:
@@ -147,6 +147,7 @@ ClientWidget::ClientWidget (QAbstractItemModel * decodes_model, QAbstractItemMod
|
||||
, mode_line_edit_ {new QLineEdit {this}}
|
||||
, frequency_tolerance_spin_box_ {new QSpinBox {this}}
|
||||
, tx_mode_label_ {new QLabel {this}}
|
||||
, tx_message_label_ {new QLabel {this}}
|
||||
, submode_line_edit_ {new QLineEdit {this}}
|
||||
, fast_mode_check_box_ {new QCheckBox {this}}
|
||||
, tr_period_spin_box_ {new QSpinBox {this}}
|
||||
@@ -302,6 +303,7 @@ ClientWidget::ClientWidget (QAbstractItemModel * decodes_model, QAbstractItemMod
|
||||
// set up status area
|
||||
status_bar_->addPermanentWidget (de_label_);
|
||||
status_bar_->addPermanentWidget (tx_mode_label_);
|
||||
status_bar_->addPermanentWidget (tx_message_label_);
|
||||
status_bar_->addPermanentWidget (frequency_label_);
|
||||
status_bar_->addPermanentWidget (tx_df_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
|
||||
, bool watchdog_timeout, QString const& submode, bool fast_mode
|
||||
, 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_)
|
||||
{
|
||||
@@ -427,8 +429,8 @@ void ClientWidget::update_status (ClientKey const& key, Frequency f, QString con
|
||||
update_spin_box (frequency_tolerance_spin_box_, frequency_tolerance
|
||||
, quint32_max == frequency_tolerance ? QString {"n/a"} : QString {});
|
||||
update_line_edit (submode_line_edit_, submode, false);
|
||||
tx_mode_label_->setText (QString {"Tx Mode: %1"}
|
||||
.arg (tx_mode.isEmpty () || tx_mode == mode ? "" : '(' + tx_mode + ')'));
|
||||
tx_mode_label_->setText (tx_mode.isEmpty () || tx_mode == mode ? "" : "Tx 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));
|
||||
update_line_edit (dx_call_line_edit_, dx_call);
|
||||
update_line_edit (dx_grid_line_edit_, dx_grid);
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
, QString const& de_call, QString const& de_grid, QString const& dx_grid
|
||||
, bool watchdog_timeout, QString const& sub_mode, bool fast_mode
|
||||
, 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
|
||||
, float delta_time, quint32 delta_frequency, QString const& mode
|
||||
, QString const& message, bool low_confidence, bool off_air);
|
||||
@@ -122,6 +122,7 @@ private:
|
||||
QLineEdit * mode_line_edit_;
|
||||
QSpinBox * frequency_tolerance_spin_box_;
|
||||
QLabel * tx_mode_label_;
|
||||
QLabel * tx_message_label_;
|
||||
QLineEdit * submode_line_edit_;
|
||||
QCheckBox * fast_mode_check_box_;
|
||||
QSpinBox * tr_period_spin_box_;
|
||||
|
||||
@@ -243,9 +243,11 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
|
||||
quint32 frequency_tolerance {quint32_max};
|
||||
quint32 tr_period {quint32_max};
|
||||
QByteArray configuration_name;
|
||||
QByteArray tx_message;
|
||||
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
|
||||
>> 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)
|
||||
{
|
||||
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 (sub_mode), fast_mode
|
||||
, special_op_mode, frequency_tolerance, tr_period
|
||||
, QString::fromUtf8 (configuration_name));
|
||||
, QString::fromUtf8 (configuration_name)
|
||||
, QString::fromUtf8 (tx_message));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
, QString const& de_call, QString const& de_grid, QString const& dx_grid
|
||||
, bool watchdog_timeout, QString const& sub_mode, bool fast_mode
|
||||
, 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 decode (bool is_new, ClientKey const&, QTime time, qint32 snr, float delta_time
|
||||
, quint32 delta_frequency, QString const& mode, QString const& message
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
, QString const& /*de_call*/, QString const& /*de_grid*/, QString const& /*dx_grid*/
|
||||
, bool /* watchdog_timeout */, QString const& sub_mode, bool /*fast_mode*/
|
||||
, 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_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user