Make WSPR band hopping tuneup Tx dependent on Enable Tx button state

Tuneup is  now only  possible with  Tx Enable  checked, if  no message
transmission is required with  tuneup transmissions then Tx percentage
zero must be selected along with Enable Tx.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5713 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2015-07-11 22:49:56 +00:00
parent be48da5b3f
commit f0058d7716
3 changed files with 8 additions and 7 deletions

View File

@ -297,7 +297,7 @@ void WSPRBandHopping::set_tx_percent (int new_value)
}
// determine the parameters of the hop, if any
auto WSPRBandHopping::next_hop () -> Hop
auto WSPRBandHopping::next_hop (bool tx_enabled) -> Hop
{
auto const& now = QDateTime::currentDateTimeUtc ();
auto const& date = now.date ();
@ -322,7 +322,7 @@ auto WSPRBandHopping::next_hop () -> Hop
band_index = next_hopping_band();
tx_next = next_is_tx ();
tx_next = next_is_tx () && tx_enabled;
int frequencies_index {-1};
auto const& frequencies = m_->configuration_->frequencies ();
@ -422,14 +422,15 @@ auto WSPRBandHopping::next_hop () -> Hop
return {
periods[period_index]
, frequencies_index
, frequencies_index
, frequencies_index >= 0 // new band
, frequencies_index >= 0 // new band
&& tx_enabled // transmit is allowed
&& !tx_next // not going to Tx anyway
&& m_->bands_[4].testBit (band_index) // tune up required
&& !m_->bands_[5].testBit (band_index) // not an Rx only band
, frequencies_index >= 0 // new band
, frequencies_index >= 0 // new band
&& tx_next // Tx scheduled
&& !m_->bands_[5].testBit (band_index) // not an Rx only band
};

View File

@ -71,7 +71,7 @@ public:
bool tx_next_;
};
// return the next band parameters
Hop next_hop ();
Hop next_hop (bool tx_enabled);
// determine if the next period should be a transmit period
bool next_is_tx ();

View File

@ -4209,11 +4209,11 @@ void MainWindow::WSPR_scheduling ()
{
m_WSPR_tx_next = false;
if (ui->band_hopping_group_box->isChecked ()) {
auto hop_data = m_WSPR_band_hopping.next_hop ();
// qDebug () << "hop data: period:" << hop_data.period_name_
// << "frequencies index:" << hop_data.frequencies_index_
// << "tune:" << hop_data.tune_required_
// << "tx:" << hop_data.tx_next_;
auto hop_data = m_WSPR_band_hopping.next_hop (m_auto);
m_WSPR_tx_next = hop_data.tx_next_;
if (hop_data.frequencies_index_ >= 0) { // new band
ui->bandComboBox->setCurrentIndex (hop_data.frequencies_index_);