mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-24 11:40:31 -05:00
Only accept CQ calls with listening frequency when QRG between 10kHz and 999kHz
Thanks to Mike, W9MDB, for this contribution. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8571 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
62fa418b90
commit
e19c93a3cd
@ -4020,21 +4020,6 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_bFastMode or m_mode=="FT8") {
|
|
||||||
auto i1=message.string ().indexOf(" CQ ");
|
|
||||||
if(i1>10) {
|
|
||||||
bool ok;
|
|
||||||
Frequency kHz {message.string ().mid (i1+4,3).toUInt (&ok)};
|
|
||||||
if(ok && kHz >= 10 && kHz <= 999) {
|
|
||||||
if (m_config.is_transceiver_online ()) {
|
|
||||||
//QSY Freq for answering CQ nnn
|
|
||||||
setRig (m_freqNominal / 1000000 * 1000000 + 1000 * kHz);
|
|
||||||
ui->decodedTextBrowser2->displayQSY (QString {"QSY %1"}.arg (m_freqNominal / 1e6, 7, 'f', 3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Skip the rest if no decoded text extracted
|
//Skip the rest if no decoded text extracted
|
||||||
int frequency = message.frequencyOffset();
|
int frequency = message.frequencyOffset();
|
||||||
if (message.isTX()) {
|
if (message.isTX()) {
|
||||||
@ -4047,6 +4032,20 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for CQ with listening frequency
|
||||||
|
if (parts.size () >= 7
|
||||||
|
&& (m_bFastMode || m_mode=="FT8")
|
||||||
|
&& "CQ" == parts[5]
|
||||||
|
&& m_config.is_transceiver_online ()) {
|
||||||
|
bool ok;
|
||||||
|
auto kHz = parts[6].toUInt (&ok);
|
||||||
|
if (ok && kHz >= 10 && kHz <= 999) {
|
||||||
|
// QSY Freq for answering CQ nnn
|
||||||
|
setRig (m_freqNominal / 1000000 * 1000000 + 1000 * kHz);
|
||||||
|
ui->decodedTextBrowser2->displayQSY (QString {"QSY %1"}.arg (m_freqNominal / 1e6, 7, 'f', 3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int nmod = message.timeInSeconds () % (2*m_TRperiod);
|
int nmod = message.timeInSeconds () % (2*m_TRperiod);
|
||||||
m_txFirst=(nmod!=0);
|
m_txFirst=(nmod!=0);
|
||||||
ui->txFirstCheckBox->setChecked(m_txFirst);
|
ui->txFirstCheckBox->setChecked(m_txFirst);
|
||||||
|
Loading…
Reference in New Issue
Block a user