diff --git a/Configuration.cpp b/Configuration.cpp index 86710dd..19f1459 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -645,6 +645,7 @@ private: bool autoreply_confirmation_; bool heartbeat_anywhere_; bool heartbeat_qso_pause_; + bool heartbeat_ack_snr_; bool relay_disabled_; bool monitor_off_at_startup_; bool monitor_last_used_; @@ -812,6 +813,7 @@ bool Configuration::autoreply_on_at_startup () const { bool Configuration::autoreply_confirmation() const { return m_->autoreply_confirmation_; } bool Configuration::heartbeat_anywhere() const { return m_->heartbeat_anywhere_;} bool Configuration::heartbeat_qso_pause() const { return m_->heartbeat_qso_pause_;} +bool Configuration::heartbeat_ack_snr() const { return m_->heartbeat_ack_snr_;} bool Configuration::relay_off() const { return m_->relay_disabled_; } bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;} bool Configuration::monitor_last_used () const {return m_->rig_is_dummy_ || m_->monitor_last_used_;} @@ -1543,6 +1545,7 @@ void Configuration::impl::initialize_models () ui_->autoreply_confirmation_check_box->setChecked (autoreply_confirmation_); ui_->heartbeat_anywhere_check_box->setChecked(heartbeat_anywhere_); ui_->heartbeat_qso_pause_check_box->setChecked(heartbeat_qso_pause_); + ui_->heartbeat_ack_snr_check_box->setChecked(heartbeat_ack_snr_); ui_->relay_disabled_check_box->setChecked(relay_disabled_); ui_->monitor_off_check_box->setChecked (monitor_off_at_startup_); ui_->monitor_last_used_check_box->setChecked (monitor_last_used_); @@ -1963,6 +1966,7 @@ void Configuration::impl::read_settings () autoreply_confirmation_ = settings_->value ("AutoreplyConfirmation", false).toBool (); heartbeat_anywhere_ = settings_->value("BeaconAnywhere", false).toBool(); heartbeat_qso_pause_ = settings_->value("HeartbeatQSOPause", true).toBool(); + heartbeat_ack_snr_ = settings_->value("HeartbeatAckSNR", false).toBool(); relay_disabled_ = settings_->value ("RelayOFF", false).toBool (); monitor_off_at_startup_ = settings_->value ("MonitorOFF", false).toBool (); monitor_last_used_ = settings_->value ("MonitorLastUsed", false).toBool (); @@ -2178,6 +2182,7 @@ void Configuration::impl::write_settings () settings_->setValue ("AutoreplyConfirmation", autoreply_confirmation_); settings_->setValue ("BeaconAnywhere", heartbeat_anywhere_); settings_->setValue ("HeartbeatQSOPause", heartbeat_qso_pause_); + settings_->setValue ("HeartbeatAckSNR", heartbeat_ack_snr_); settings_->setValue ("RelayOFF", relay_disabled_); settings_->setValue ("MonitorOFF", monitor_off_at_startup_); settings_->setValue ("MonitorLastUsed", monitor_last_used_); @@ -2813,6 +2818,7 @@ void Configuration::impl::accept () autoreply_confirmation_ = ui_->autoreply_confirmation_check_box->isChecked (); heartbeat_anywhere_ = ui_->heartbeat_anywhere_check_box->isChecked(); heartbeat_qso_pause_ = ui_->heartbeat_qso_pause_check_box->isChecked(); + heartbeat_ack_snr_ = ui_->heartbeat_ack_snr_check_box->isChecked(); relay_disabled_ = ui_->relay_disabled_check_box->isChecked(); monitor_off_at_startup_ = ui_->monitor_off_check_box->isChecked (); monitor_last_used_ = ui_->monitor_last_used_check_box->isChecked (); diff --git a/Configuration.hpp b/Configuration.hpp index 324cb21..bac47b5 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -143,6 +143,7 @@ public: bool autoreply_confirmation () const; bool heartbeat_anywhere() const; bool heartbeat_qso_pause() const; + bool heartbeat_ack_snr() const; bool relay_off() const; bool monitor_off_at_startup () const; bool monitor_last_used () const; diff --git a/Configuration.ui b/Configuration.ui index a2b2a4c..a818316 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -206,7 +206,9 @@ - false + + false + HB Message: @@ -221,7 +223,9 @@ - false + + false + HB <MYGRID4> @@ -870,6 +874,13 @@ text message. + + + + Send SNR report when acknowledging heartbeats + + + @@ -878,7 +889,7 @@ text message. - Never ACK heartbeats from these callsigns (comma separated): + Never acknowledge heartbeats from these callsigns (comma separated): diff --git a/mainwindow.cpp b/mainwindow.cpp index e587824..61e13f6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -8166,13 +8166,10 @@ void MainWindow::sendHeartbeat(){ processTxQueue(); } -#define SEND_SNR_IN_ACK 0 void MainWindow::sendHeartbeatAck(QString to, int snr, QString extra){ -#if SEND_SNR_IN_ACK - auto message = QString("%1 ACK %2 %3").arg(to).arg(Varicode::formatSNR(snr)).arg(extra).trimmed(); -#else - auto message = QString("%1 ACK %2").arg(to).arg(extra).trimmed(); -#endif + auto message = m_config.heartbeat_ack_snr() ? + QString("%1 SNR %2 %3").arg(to).arg(Varicode::formatSNR(snr)).arg(extra).trimmed() : + QString("%1 ACK %2").arg(to).arg(extra).trimmed(); auto f = m_config.heartbeat_anywhere() ? -1 : findFreeFreqOffset(500, 1000, 50);