mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
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:
parent
1c8d8f749c
commit
ca5a1ed348
@ -297,7 +297,7 @@ void WSPRBandHopping::set_tx_percent (int new_value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// determine the parameters of the hop, if any
|
// 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& now = QDateTime::currentDateTimeUtc ();
|
||||||
auto const& date = now.date ();
|
auto const& date = now.date ();
|
||||||
@ -322,7 +322,7 @@ auto WSPRBandHopping::next_hop () -> Hop
|
|||||||
|
|
||||||
band_index = next_hopping_band();
|
band_index = next_hopping_band();
|
||||||
|
|
||||||
tx_next = next_is_tx ();
|
tx_next = next_is_tx () && tx_enabled;
|
||||||
|
|
||||||
int frequencies_index {-1};
|
int frequencies_index {-1};
|
||||||
auto const& frequencies = m_->configuration_->frequencies ();
|
auto const& frequencies = m_->configuration_->frequencies ();
|
||||||
@ -422,14 +422,15 @@ auto WSPRBandHopping::next_hop () -> Hop
|
|||||||
return {
|
return {
|
||||||
periods[period_index]
|
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
|
&& !tx_next // not going to Tx anyway
|
||||||
&& m_->bands_[4].testBit (band_index) // tune up required
|
&& m_->bands_[4].testBit (band_index) // tune up required
|
||||||
&& !m_->bands_[5].testBit (band_index) // not an Rx only band
|
&& !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
|
&& tx_next // Tx scheduled
|
||||||
&& !m_->bands_[5].testBit (band_index) // not an Rx only band
|
&& !m_->bands_[5].testBit (band_index) // not an Rx only band
|
||||||
};
|
};
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
bool tx_next_;
|
bool tx_next_;
|
||||||
};
|
};
|
||||||
// return the next band parameters
|
// return the next band parameters
|
||||||
Hop next_hop ();
|
Hop next_hop (bool tx_enabled);
|
||||||
// determine if the next period should be a transmit period
|
// determine if the next period should be a transmit period
|
||||||
bool next_is_tx ();
|
bool next_is_tx ();
|
||||||
|
|
||||||
|
@ -4209,11 +4209,11 @@ void MainWindow::WSPR_scheduling ()
|
|||||||
{
|
{
|
||||||
m_WSPR_tx_next = false;
|
m_WSPR_tx_next = false;
|
||||||
if (ui->band_hopping_group_box->isChecked ()) {
|
if (ui->band_hopping_group_box->isChecked ()) {
|
||||||
auto hop_data = m_WSPR_band_hopping.next_hop ();
|
|
||||||
// qDebug () << "hop data: period:" << hop_data.period_name_
|
// qDebug () << "hop data: period:" << hop_data.period_name_
|
||||||
// << "frequencies index:" << hop_data.frequencies_index_
|
// << "frequencies index:" << hop_data.frequencies_index_
|
||||||
// << "tune:" << hop_data.tune_required_
|
// << "tune:" << hop_data.tune_required_
|
||||||
// << "tx:" << hop_data.tx_next_;
|
// << "tx:" << hop_data.tx_next_;
|
||||||
|
auto hop_data = m_WSPR_band_hopping.next_hop (m_auto);
|
||||||
m_WSPR_tx_next = hop_data.tx_next_;
|
m_WSPR_tx_next = hop_data.tx_next_;
|
||||||
if (hop_data.frequencies_index_ >= 0) { // new band
|
if (hop_data.frequencies_index_ >= 0) { // new band
|
||||||
ui->bandComboBox->setCurrentIndex (hop_data.frequencies_index_);
|
ui->bandComboBox->setCurrentIndex (hop_data.frequencies_index_);
|
||||||
|
Loading…
Reference in New Issue
Block a user