New convention for setting frequency of Hound's R+rpt message. Also, save/restore the mainwindow splitter setting.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8619 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2018-04-18 14:04:52 +00:00
parent 1b469eea4a
commit f27103642e
2 changed files with 19 additions and 5 deletions

View File

@ -1051,6 +1051,7 @@ void MainWindow::writeSettings()
m_settings->setValue("pwrBandTuneMemory",m_pwrBandTuneMemory);
m_settings->setValue ("FT8AP", ui->actionEnable_AP_FT8->isChecked ());
m_settings->setValue ("JT65AP", ui->actionEnable_AP_JT65->isChecked ());
m_settings->setValue("SplitterState",ui->splitter->saveState());
{
QList<QVariant> coeffs; // suitable for QSettings
for (auto const& coeff : m_phaseEqCoefficients)
@ -1140,6 +1141,7 @@ void MainWindow::readSettings()
m_pwrBandTuneMemory=m_settings->value("pwrBandTuneMemory").toHash();
ui->actionEnable_AP_FT8->setChecked (m_settings->value ("FT8AP", false).toBool());
ui->actionEnable_AP_JT65->setChecked (m_settings->value ("JT65AP", false).toBool());
ui->splitter->restoreState(m_settings->value("SplitterState").toByteArray());
{
auto const& coeffs = m_settings->value ("PhaseEqualizationCoefficients"
, QList<QVariant> {0., 0., 0., 0., 0.}).toList ();
@ -2976,8 +2978,8 @@ void MainWindow::readFromStdout() //readFromStdout
m_rptSent=decodedtext.string().mid(7,3);
//### Select TX3, set random TxFreq in [300-900], and Force Auto ON. ###
ui->txrb3->setChecked(true);
int fTx = 300.0 + 600.0*double(qrand())/RAND_MAX;
ui->TxFreqSpinBox->setValue(fTx);
m_nFoxFreq=decodedtext.string().mid(16,4).toInt();
m_nSentFoxRrpt=1;
if(!m_auto) auto_tx_mode(true);
}
} else {
@ -2996,8 +2998,8 @@ void MainWindow::readFromStdout() //readFromStdout
m_rptSent=decodedtext.string().mid(7,3);
//### Select TX3, set random TxFreq in [300-900], and Force Auto ON. ###
ui->txrb3->setChecked(true);
int fTx = 300.0 + 600.0*double(qrand())/RAND_MAX;
ui->TxFreqSpinBox->setValue(fTx);
m_nFoxFreq=decodedtext.string().mid(16,4).toInt();
m_nSentFoxRrpt=1;
if(!m_auto) auto_tx_mode(true);
}
}
@ -6164,6 +6166,17 @@ void MainWindow::transmit (double snr)
if(m_config.x2ToneSpacing()) toneSpacing=2*12000.0/1920.0;
if(m_config.x4ToneSpacing()) toneSpacing=4*12000.0/1920.0;
if(m_config.bFox() and !m_tune) toneSpacing=-1;
if(m_config.bHound()) {
if(m_ntx==1) m_nSentFoxRrpt=1;
if(m_ntx==3) {
if(m_nSentFoxRrpt==1) {
ui->TxFreqSpinBox->setValue(m_nFoxFreq);
} else {
ui->TxFreqSpinBox->setValue(m_nFoxFreq+300);
}
m_nSentFoxRrpt++;
}
}
Q_EMIT sendMessage (NUM_FT8_SYMBOLS,
1920.0, ui->TxFreqSpinBox->value () - m_XIT,
toneSpacing, m_soundOutput, m_config.audio_output_channel (),

View File

@ -437,7 +437,8 @@ private:
qint32 m_maxFoxWait=3; //Max wait time for expected Hound replies
qint32 m_foxCQtime=10; //CQs at least every 5 minutes
qint32 m_tFoxTxSinceCQ=999; //Fox Tx cycles since most recent CQ
qint32 m_nFoxFreq; //Audio freq at which Hound received a call from Fox
qint32 m_nSentFoxRrpt=0; //Serial number for next R+rpt Hound will send to Fox
bool m_btxok; //True if OK to transmit
bool m_diskData;