diff --git a/Configuration.cpp b/Configuration.cpp index 1c9ba69ab..64a26b62a 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -536,6 +536,7 @@ private: bool tx_QSY_allowed_; bool spot_to_psk_reporter_; bool monitor_off_at_startup_; + bool monitor_last_used_; bool log_as_RTTY_; bool report_in_comments_; bool prompt_to_log_; @@ -599,6 +600,7 @@ bool Configuration::id_after_73 () const {return m_->id_after_73_;} bool Configuration::tx_QSY_allowed () const {return m_->tx_QSY_allowed_;} bool Configuration::spot_to_psk_reporter () const {return m_->spot_to_psk_reporter_;} bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;} +bool Configuration::monitor_last_used () const {return m_->monitor_last_used_;} bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;} bool Configuration::report_in_comments () const {return m_->report_in_comments_;} bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;} @@ -1008,6 +1010,7 @@ void Configuration::impl::initialise_models () ui_->tx_QSY_check_box->setChecked (tx_QSY_allowed_); ui_->psk_reporter_check_box->setChecked (spot_to_psk_reporter_); ui_->monitor_off_check_box->setChecked (monitor_off_at_startup_); + ui_->monitor_last_used_check_box->setChecked (monitor_last_used_); ui_->log_as_RTTY_check_box->setChecked (log_as_RTTY_); ui_->report_in_comments_check_box->setChecked (report_in_comments_); ui_->prompt_to_log_check_box->setChecked (prompt_to_log_); @@ -1165,6 +1168,7 @@ void Configuration::impl::read_settings () jt9w_max_dt_ = settings_->value ("DTmax", 5.).toFloat (); monitor_off_at_startup_ = settings_->value ("MonitorOFF", false).toBool (); + monitor_last_used_ = settings_->value ("MonitorLastUsed", false).toBool (); spot_to_psk_reporter_ = settings_->value ("PSKReporter", false).toBool (); id_after_73_ = settings_->value ("After73", false).toBool (); tx_QSY_allowed_ = settings_->value ("TxQSYAllowed", false).toBool (); @@ -1249,6 +1253,7 @@ void Configuration::impl::write_settings () settings_->setValue ("DTmin", jt9w_min_dt_); settings_->setValue ("DTmax", jt9w_max_dt_); settings_->setValue ("MonitorOFF", monitor_off_at_startup_); + settings_->setValue ("MonitorLastUsed", monitor_last_used_); settings_->setValue ("PSKReporter", spot_to_psk_reporter_); settings_->setValue ("After73", id_after_73_); settings_->setValue ("TxQSYAllowed", tx_QSY_allowed_); @@ -1596,6 +1601,7 @@ void Configuration::impl::accept () id_after_73_ = ui_->CW_id_after_73_check_box->isChecked (); tx_QSY_allowed_ = ui_->tx_QSY_check_box->isChecked (); monitor_off_at_startup_ = ui_->monitor_off_check_box->isChecked (); + monitor_last_used_ = ui_->monitor_last_used_check_box->isChecked (); jt9w_bw_mult_ = ui_->jt9w_bandwidth_mult_combo_box->currentText ().toUInt (); jt9w_min_dt_ = static_cast (ui_->jt9w_min_dt_double_spin_box->value ()); jt9w_max_dt_ = static_cast (ui_->jt9w_max_dt_double_spin_box->value ()); diff --git a/Configuration.hpp b/Configuration.hpp index a5d06feb9..fc239c001 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -91,6 +91,7 @@ public: bool tx_QSY_allowed () const; bool spot_to_psk_reporter () const; bool monitor_off_at_startup () const; + bool monitor_last_used () const; bool log_as_RTTY () const; bool report_in_comments () const; bool prompt_to_log () const; diff --git a/Configuration.ui b/Configuration.ui index 6dcd57aae..908dba149 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -226,17 +226,6 @@ Behavior - - - - Turns off automatic transmissions after sending a 73 or any other free -text message. - - - Di&sable Tx after sending 73 - - - @@ -247,16 +236,14 @@ text message. - - + + - Don't start decoding until the monitor button is clicked. + Turns off automatic transmissions after sending a 73 or any other free +text message. - Mon&itor off at startup - - - false + Di&sable Tx after sending 73 @@ -270,13 +257,16 @@ text message. - - + + - <html><head/><body><p>Some rigs are not able to process CAT commands while transmitting. This means that if you are operating in split mode you may have to uncheck this option.</p></body></html> + Don't start decoding until the monitor button is clicked. - Allow Tx frequency changes while transmitting + Mon&itor off at startup + + + false @@ -339,6 +329,26 @@ quiet period when decoding is done. + + + + <html><head/><body><p>Some rigs are not able to process CAT commands while transmitting. This means that if you are operating in split mode you may have to uncheck this option.</p></body></html> + + + Allow Tx frequency changes while transmitting + + + + + + + <html><head/><body><p>Check this if you wish to automatically return to the last monitored frequency when monitor is enabled, leave it unchecked if you wish to have the current rig frequency maintained.</p></body></html> + + + Monitor returns to last used frequency + + + @@ -1950,7 +1960,9 @@ soundcard changes font_push_button decoded_text_font_push_button monitor_off_check_box + monitor_last_used_check_box quick_call_check_box + tx_QSY_check_box disable_TX_on_73_check_box watchdog_check_box CW_id_after_73_check_box @@ -2002,7 +2014,11 @@ soundcard changes psk_reporter_check_box frequencies_table_view stations_table_view - configuration_dialog_button_box + pbCQmsg + pbMyCall + pbTxMsg + pbNewDXCC + pbNewCall @@ -2072,12 +2088,12 @@ soundcard changes - - - - + + + + diff --git a/mainwindow.cpp b/mainwindow.cpp index bf736d7a8..e3149ea5c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -700,10 +700,18 @@ void MainWindow::on_monitorButton_clicked (bool checked) { m_diskData = false; // no longer reading WAV files - // put rig back where it was when last in control - Q_EMIT m_config.transceiver_frequency (m_lastMonitoredFrequency); - qsy (m_lastMonitoredFrequency); - setXIT (ui->TxFreqSpinBox->value ()); + Frequency operating_frequency {m_dialFreq}; + if (m_config.monitor_last_used ()) + { + // put rig back where it was when last in control + operating_frequency = m_lastMonitoredFrequency; + Q_EMIT m_config.transceiver_frequency (operating_frequency); + } + qsy (operating_frequency); + if (m_config.monitor_last_used ()) + { + setXIT (ui->TxFreqSpinBox->value ()); + } } Q_EMIT m_config.sync_transceiver (true, checked); // gets