mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
Fix various fake split mode issues
Merged from wsjtx-1.4 branch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4573 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
d9bc8f5dff
commit
20c7046a90
@ -111,7 +111,7 @@ void DXLabSuiteCommanderTransceiver::do_ptt (bool on)
|
|||||||
|
|
||||||
update_PTT (on);
|
update_PTT (on);
|
||||||
|
|
||||||
do_frequency (state ().frequency ()); // gets Commander synchronized
|
// do_frequency (state ().frequency ()); // gets Commander synchronized
|
||||||
}
|
}
|
||||||
|
|
||||||
void DXLabSuiteCommanderTransceiver::do_frequency (Frequency f)
|
void DXLabSuiteCommanderTransceiver::do_frequency (Frequency f)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
EmulateSplitTransceiver::EmulateSplitTransceiver (std::unique_ptr<Transceiver> wrapped)
|
EmulateSplitTransceiver::EmulateSplitTransceiver (std::unique_ptr<Transceiver> wrapped)
|
||||||
: wrapped_ {std::move (wrapped)}
|
: wrapped_ {std::move (wrapped)}
|
||||||
, frequency_ {0, 0}
|
, frequency_ {0, 0}
|
||||||
|
, pre_tx_frequency_ {0}
|
||||||
, tx_ {false}
|
, tx_ {false}
|
||||||
{
|
{
|
||||||
// Connect update signal of wrapped Transceiver object instance to ours.
|
// Connect update signal of wrapped Transceiver object instance to ours.
|
||||||
@ -52,8 +53,11 @@ void EmulateSplitTransceiver::ptt (bool on) noexcept
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Save TX state for future frequency change requests.
|
// Save TX state for future frequency change requests.
|
||||||
if ((tx_ = on))
|
if (on)
|
||||||
{
|
{
|
||||||
|
// save the Rx frequency
|
||||||
|
pre_tx_frequency_ = frequency_[0];
|
||||||
|
|
||||||
// Switch to other frequency if we have one i.e. client wants
|
// Switch to other frequency if we have one i.e. client wants
|
||||||
// split operation).
|
// split operation).
|
||||||
wrapped_->frequency (frequency_[frequency_[1] ? 1 : 0]);
|
wrapped_->frequency (frequency_[frequency_[1] ? 1 : 0]);
|
||||||
@ -67,8 +71,10 @@ void EmulateSplitTransceiver::ptt (bool on) noexcept
|
|||||||
wrapped_->ptt (false);
|
wrapped_->ptt (false);
|
||||||
|
|
||||||
// Switch to RX frequency.
|
// Switch to RX frequency.
|
||||||
wrapped_->frequency (frequency_[0]);
|
wrapped_->frequency (pre_tx_frequency_);
|
||||||
|
pre_tx_frequency_ = 0;
|
||||||
}
|
}
|
||||||
|
tx_ = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmulateSplitTransceiver::handle_update (TransceiverState state)
|
void EmulateSplitTransceiver::handle_update (TransceiverState state)
|
||||||
@ -79,9 +85,9 @@ void EmulateSplitTransceiver::handle_update (TransceiverState state)
|
|||||||
|
|
||||||
// Change to reflect emulated state, we don't want to report the
|
// Change to reflect emulated state, we don't want to report the
|
||||||
// shifted frequency when transmitting.
|
// shifted frequency when transmitting.
|
||||||
if (tx_)
|
if (pre_tx_frequency_)
|
||||||
{
|
{
|
||||||
state.frequency (frequency_[0]);
|
state.frequency (pre_tx_frequency_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,6 +46,7 @@ private:
|
|||||||
|
|
||||||
std::unique_ptr<Transceiver> wrapped_;
|
std::unique_ptr<Transceiver> wrapped_;
|
||||||
Frequency frequency_[2]; // [0] <- RX, [1] <- other
|
Frequency frequency_[2]; // [0] <- RX, [1] <- other
|
||||||
|
Frequency pre_tx_frequency_; // return to this on switching to Rx
|
||||||
bool tx_;
|
bool tx_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2846,13 +2846,8 @@ void MainWindow::on_cbPlus2kHz_toggled(bool checked)
|
|||||||
|
|
||||||
void MainWindow::handle_transceiver_update (Transceiver::TransceiverState s)
|
void MainWindow::handle_transceiver_update (Transceiver::TransceiverState s)
|
||||||
{
|
{
|
||||||
static bool prior_ptt {false};
|
|
||||||
|
|
||||||
if (!s.ptt () && prior_ptt)
|
transmitDisplay (false);
|
||||||
{
|
|
||||||
transmitDisplay (false);
|
|
||||||
}
|
|
||||||
prior_ptt = s.ptt ();
|
|
||||||
|
|
||||||
if ((s.frequency () - m_dialFreq) || s.split () != m_splitMode)
|
if ((s.frequency () - m_dialFreq) || s.split () != m_splitMode)
|
||||||
{
|
{
|
||||||
@ -3046,44 +3041,48 @@ void MainWindow::pskSetLocal ()
|
|||||||
|
|
||||||
void MainWindow::transmitDisplay (bool transmitting)
|
void MainWindow::transmitDisplay (bool transmitting)
|
||||||
{
|
{
|
||||||
if (transmitting)
|
|
||||||
{
|
|
||||||
signalMeter->setValue(0);
|
|
||||||
|
|
||||||
if (m_monitoring)
|
if (transmitting == m_transmitting)
|
||||||
|
{
|
||||||
|
if (transmitting)
|
||||||
{
|
{
|
||||||
monitor (false);
|
signalMeter->setValue(0);
|
||||||
|
|
||||||
|
if (m_monitoring)
|
||||||
|
{
|
||||||
|
monitor (false);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_btxok=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_btxok=true;
|
auto QSY_allowed = !transmitting || m_config.tx_QSY_allowed () || !m_config.split_mode ();
|
||||||
}
|
if (ui->cbTxLock->isChecked ())
|
||||||
|
|
||||||
auto QSY_allowed = !transmitting || m_config.tx_QSY_allowed () || !m_config.split_mode ();
|
|
||||||
if (ui->cbTxLock->isChecked ())
|
|
||||||
{
|
|
||||||
ui->RxFreqSpinBox->setEnabled (QSY_allowed);
|
|
||||||
ui->pbT2R->setEnabled (QSY_allowed);
|
|
||||||
}
|
|
||||||
ui->TxFreqSpinBox->setEnabled (QSY_allowed);
|
|
||||||
ui->pbR2T->setEnabled (QSY_allowed);
|
|
||||||
ui->cbTxLock->setEnabled (QSY_allowed);
|
|
||||||
|
|
||||||
// only allow +2kHz when not transmitting or if TX QSYs are allowed
|
|
||||||
ui->cbPlus2kHz->setEnabled (!transmitting || m_config.tx_QSY_allowed ());
|
|
||||||
|
|
||||||
// the following are always disallowed in transmit
|
|
||||||
ui->menuMode->setEnabled (!transmitting);
|
|
||||||
ui->bandComboBox->setEnabled (!transmitting);
|
|
||||||
if (!transmitting)
|
|
||||||
{
|
|
||||||
if ("JT9+JT65" == m_mode)
|
|
||||||
{
|
{
|
||||||
// allow mode switch in Rx when in dual mode
|
ui->RxFreqSpinBox->setEnabled (QSY_allowed);
|
||||||
ui->pbTxMode->setEnabled (true);
|
ui->pbT2R->setEnabled (QSY_allowed);
|
||||||
|
}
|
||||||
|
ui->TxFreqSpinBox->setEnabled (QSY_allowed);
|
||||||
|
ui->pbR2T->setEnabled (QSY_allowed);
|
||||||
|
ui->cbTxLock->setEnabled (QSY_allowed);
|
||||||
|
|
||||||
|
// only allow +2kHz when not transmitting or if TX QSYs are allowed
|
||||||
|
ui->cbPlus2kHz->setEnabled (!transmitting || m_config.tx_QSY_allowed ());
|
||||||
|
|
||||||
|
// the following are always disallowed in transmit
|
||||||
|
ui->menuMode->setEnabled (!transmitting);
|
||||||
|
ui->bandComboBox->setEnabled (!transmitting);
|
||||||
|
if (!transmitting)
|
||||||
|
{
|
||||||
|
if ("JT9+JT65" == m_mode)
|
||||||
|
{
|
||||||
|
// allow mode switch in Rx when in dual mode
|
||||||
|
ui->pbTxMode->setEnabled (true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->pbTxMode->setEnabled (false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui->pbTxMode->setEnabled (false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user