mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 11:31:51 -05:00
Add Tx watchdog status to UDP Status message
Thanks to Mike W9MDB for contributing this patch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6892 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
42bdbf0de7
commit
73ac2ebc39
@ -337,7 +337,8 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con
|
||||
, QString const& report, QString const& tx_mode
|
||||
, bool tx_enabled, bool transmitting, bool decoding
|
||||
, qint32 rx_df, qint32 tx_df, QString const& de_call
|
||||
, QString const& de_grid, QString const& dx_grid)
|
||||
, QString const& de_grid, QString const& dx_grid
|
||||
, bool watchdog_timeout)
|
||||
{
|
||||
if (m_->server_port_ && !m_->server_string_.isEmpty ())
|
||||
{
|
||||
@ -345,7 +346,7 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con
|
||||
NetworkMessage::Builder out {&message, NetworkMessage::Status, m_->id_, m_->schema_};
|
||||
out << f << mode.toUtf8 () << dx_call.toUtf8 () << report.toUtf8 () << tx_mode.toUtf8 ()
|
||||
<< tx_enabled << transmitting << decoding << rx_df << tx_df << de_call.toUtf8 ()
|
||||
<< de_grid.toUtf8 () << dx_grid.toUtf8 ();
|
||||
<< de_grid.toUtf8 () << dx_grid.toUtf8 () << watchdog_timeout;
|
||||
m_->send_message (out, message);
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
Q_SLOT void status_update (Frequency, QString const& mode, QString const& dx_call, QString const& report
|
||||
, QString const& tx_mode, bool tx_enabled, bool transmitting, bool decoding
|
||||
, qint32 rx_df, qint32 tx_df, QString const& de_call, QString const& de_grid
|
||||
, QString const& dx_grid);
|
||||
, QString const& dx_grid, bool watchdog_timeout);
|
||||
Q_SLOT void decode (bool is_new, QTime time, qint32 snr, float delta_time, quint32 delta_frequency
|
||||
, QString const& mode, QString const& message);
|
||||
Q_SLOT void WSPR_decode (bool is_new, QTime time, qint32 snr, float delta_time, Frequency
|
||||
|
@ -203,15 +203,16 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
|
||||
QByteArray de_call;
|
||||
QByteArray de_grid;
|
||||
QByteArray dx_grid;
|
||||
bool watchdog_timeout {false};
|
||||
in >> f >> mode >> dx_call >> report >> tx_mode >> tx_enabled >> transmitting >> decoding
|
||||
>> rx_df >> tx_df >> de_call >> de_grid >> dx_grid;
|
||||
>> rx_df >> tx_df >> de_call >> de_grid >> dx_grid >> watchdog_timeout;
|
||||
if (check_status (in) != Fail)
|
||||
{
|
||||
Q_EMIT self_->status_update (id, f, QString::fromUtf8 (mode), QString::fromUtf8 (dx_call)
|
||||
, QString::fromUtf8 (report), QString::fromUtf8 (tx_mode)
|
||||
, tx_enabled, transmitting, decoding, rx_df, tx_df
|
||||
, QString::fromUtf8 (de_call), QString::fromUtf8 (de_grid)
|
||||
, QString::fromUtf8 (dx_grid));
|
||||
, QString::fromUtf8 (dx_grid), watchdog_timeout);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -63,7 +63,8 @@ public:
|
||||
Q_SIGNAL void status_update (QString const& id, Frequency, QString const& mode, QString const& dx_call
|
||||
, QString const& report, QString const& tx_mode, bool tx_enabled
|
||||
, bool transmitting, bool decoding, qint32 rx_df, qint32 tx_df
|
||||
, 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);
|
||||
Q_SIGNAL void client_closed (QString const& id);
|
||||
Q_SIGNAL void decode (bool is_new, QString const& id, QTime time, qint32 snr, float delta_time
|
||||
, quint32 delta_frequency, QString const& mode, QString const& message);
|
||||
|
@ -194,7 +194,8 @@ ClientWidget::ClientWidget (QAbstractItemModel * decodes_model, QAbstractItemMod
|
||||
void ClientWidget::update_status (QString const& id, Frequency f, QString const& mode, QString const& /*dx_call*/
|
||||
, QString const& report, QString const& tx_mode, bool tx_enabled
|
||||
, bool transmitting, bool decoding, qint32 rx_df, qint32 tx_df
|
||||
, 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)
|
||||
{
|
||||
if (id == id_)
|
||||
{
|
||||
@ -211,6 +212,7 @@ void ClientWidget::update_status (QString const& id, Frequency f, QString const&
|
||||
auto_off_button_->setEnabled (tx_enabled);
|
||||
halt_tx_button_->setEnabled (transmitting);
|
||||
update_dynamic_property (mode_label_, "decoding", decoding);
|
||||
update_dynamic_property (tx_df_label_, "watchdog_timeout", watchdog_timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
Q_SLOT void update_status (QString const& id, Frequency f, QString const& mode, QString const& dx_call
|
||||
, QString const& report, QString const& tx_mode, bool tx_enabled
|
||||
, bool transmitting, bool decoding, qint32 rx_df, qint32 tx_df
|
||||
, 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);
|
||||
Q_SLOT void decode_added (bool /*is_new*/, QString const& client_id, QTime /*time*/, qint32 /*snr*/
|
||||
, float /*delta_time*/, quint32 /*delta_frequency*/, QString const& /*mode*/
|
||||
, QString const& /*message*/);
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
Q_SLOT void update_status (QString const& id, Frequency f, QString const& /*mode*/, QString const& /*dx_call*/
|
||||
, QString const& /*report*/, QString const& /*tx_mode*/, bool /*tx_enabled*/
|
||||
, bool /*transmitting*/, bool /*decoding*/, qint32 /*rx_df*/, qint32 /*tx_df*/
|
||||
, 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 */)
|
||||
{
|
||||
if (id == id_)
|
||||
{
|
||||
|
@ -7,3 +7,7 @@
|
||||
[decoding="true"] {
|
||||
background-color: cyan
|
||||
}
|
||||
|
||||
[watchdog_timeout="true"] {
|
||||
background-color: red
|
||||
}
|
@ -5717,13 +5717,14 @@ void MainWindow::statusUpdate () const
|
||||
{
|
||||
if (ui)
|
||||
{
|
||||
bool watchdog_timeout = !m_mode.startsWith("WSPR") && m_config.watchdog () && m_repeatMsg >= m_config.watchdog ();
|
||||
m_messageClient->status_update (m_freqNominal, m_mode, m_hisCall,
|
||||
QString::number (ui->rptSpinBox->value ()),
|
||||
m_modeTx, ui->autoButton->isChecked (),
|
||||
m_transmitting, m_decoderBusy,
|
||||
ui->RxFreqSpinBox->value (), ui->TxFreqSpinBox->value (),
|
||||
m_config.my_callsign (), m_config.my_grid (),
|
||||
m_hisGrid);
|
||||
m_hisGrid, watchdog_timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user