mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-10 06:22:15 -05:00
Contest modes force 77-bit messages. Fix a bug I introduced in auto-seq. Code cleanup.
This commit is contained in:
parent
4d35c669d6
commit
7482f27220
@ -448,6 +448,7 @@ private:
|
||||
Q_SLOT void on_cbHound_clicked (bool);
|
||||
Q_SLOT void on_cbx2ToneSpacing_clicked(bool);
|
||||
Q_SLOT void on_cbx4ToneSpacing_clicked(bool);
|
||||
Q_SLOT void on_rbNone_toggled(bool);
|
||||
|
||||
// typenames used as arguments must match registered type names :(
|
||||
Q_SIGNAL void start_transceiver (unsigned seqeunce_number) const;
|
||||
@ -2468,6 +2469,12 @@ void Configuration::impl::on_cbHound_clicked (bool checked)
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::impl::on_rbNone_toggled(bool b)
|
||||
{
|
||||
// if(!b) ui_->cbGenerate77->setChecked(true);
|
||||
ui_->cbGenerate77->setChecked(!b);
|
||||
}
|
||||
|
||||
void Configuration::impl::on_cbx2ToneSpacing_clicked(bool b)
|
||||
{
|
||||
if(b) ui_->cbx4ToneSpacing->setChecked(false);
|
||||
|
@ -3081,7 +3081,7 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler
|
||||
w34=message_words.at(4);
|
||||
}
|
||||
}
|
||||
bool bEUvhf=(nrpt>=520001 and nrpt<=594000);
|
||||
bool bEU_VHF_w2=(nrpt>=520001 and nrpt<=594000);
|
||||
if (m_auto
|
||||
&& (m_QSOProgress==REPLYING or (!ui->tx1->isEnabled () and m_QSOProgress==REPORT))
|
||||
&& qAbs (ui->TxFreqSpinBox->value () - df) <= int (stop_tolerance)
|
||||
@ -3096,7 +3096,7 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler
|
||||
&& !m_sentFirst73 // not finished QSO
|
||||
&& ((message_words.at (1).contains (m_baseCall)
|
||||
// being called and not already in a QSO
|
||||
&& (message_words.at(2).contains(Radio::base_callsign(ui->dxCallEntry->text())) or bEUvhf))
|
||||
&& (message_words.at(2).contains(Radio::base_callsign(ui->dxCallEntry->text())) or bEU_VHF_w2))
|
||||
// type 2 compound replies
|
||||
|| (within_tolerance &&
|
||||
(acceptable_73 ||
|
||||
@ -4201,19 +4201,25 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||
nrpt=w34.toInt();
|
||||
w34=message_words.at(4);
|
||||
}
|
||||
bool bEUvhf=(nrpt>=520001 and nrpt<=594000);
|
||||
if(bEUvhf and m_nContest!=EU_VHF) {
|
||||
bool bEU_VHF_w2=(nrpt>=520001 and nrpt<=594000);
|
||||
if(bEU_VHF_w2 and m_nContest!=EU_VHF) {
|
||||
//### Should be in EU VHF Contest mode ??? ###
|
||||
MessageBox::information_message (this, tr ("Should you switch to EU VHF Contest mode?"));
|
||||
}
|
||||
// qDebug() << "aa1" << m_nContest << m_QSOProgress << bEUvhf << message.string();
|
||||
if (message_words.size () > 3 // enough fields for a normal message
|
||||
|
||||
if(message_words.size () > 3 // enough fields for a normal message
|
||||
&& (message_words.at(1).contains(m_baseCall) || "DE" == message_words.at(1))
|
||||
&& (message_words.at(2).contains(qso_partner_base_call) or bEUvhf)) {
|
||||
if(message_words.at (3).contains (grid_regexp) and m_nContest==NA_VHF) {
|
||||
&& (message_words.at(2).contains(qso_partner_base_call) or bEU_VHF_w2)) {
|
||||
|
||||
if(message_words.at(3).contains(grid_regexp)) {
|
||||
if(m_nContest==NA_VHF){
|
||||
gen_msg=setTxMsg(3);
|
||||
m_QSOProgress=ROGER_REPORT;
|
||||
} else if(w34.contains (grid_regexp) and m_nContest==EU_VHF) {
|
||||
} else {
|
||||
gen_msg=setTxMsg(2);
|
||||
m_QSOProgress=REPORT;
|
||||
}
|
||||
} else if(w34.contains(grid_regexp) and m_nContest==EU_VHF) {
|
||||
if(nrpt==0) {
|
||||
gen_msg=setTxMsg(2);
|
||||
m_QSOProgress=REPORT;
|
||||
@ -4226,8 +4232,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||
m_QSOProgress=ROGER_REPORT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// no grid on end of msg
|
||||
} else { // no grid on end of msg
|
||||
QString r=message_words.at (3);
|
||||
if(m_QSOProgress >= ROGER_REPORT && (r=="RRR" || r.toInt()==73 || "RR73" == r)) {
|
||||
if(ui->tabWidget->currentIndex()==1) {
|
||||
@ -4278,6 +4283,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||
if ((message_words.size () > 4 && message_words.at (1).contains (m_baseCall) && message_words.at (4) == "OOO")) {
|
||||
// EME short code report or MSK144/FT8 contest mode reply, send back Tx3
|
||||
m_ntx=3;
|
||||
qDebug() << "dd";
|
||||
m_QSOProgress = ROGER_REPORT;
|
||||
ui->txrb3->setChecked (true);
|
||||
if (ui->tabWidget->currentIndex () == 1) {
|
||||
@ -4316,21 +4322,18 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||
gen_msg = 5;
|
||||
m_ntx=7;
|
||||
m_gen_message_is_cq = false;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
m_ntx=5;
|
||||
ui->txrb5->setChecked(true);
|
||||
}
|
||||
m_QSOProgress = SIGNOFF;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// treat like a CQ/QRZ
|
||||
if (ui->tx1->isEnabled ()) {
|
||||
m_ntx = 1;
|
||||
m_QSOProgress = REPLYING;
|
||||
ui->txrb1->setChecked (true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
m_ntx=2;
|
||||
m_QSOProgress = REPORT;
|
||||
ui->txrb2->setChecked (true);
|
||||
@ -4347,21 +4350,17 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||
gen_msg = 5;
|
||||
if (ui->rbGenMsg->isChecked ()) m_ntx=7;
|
||||
m_gen_message_is_cq = false;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
m_ntx=5;
|
||||
ui->txrb5->setChecked(true);
|
||||
}
|
||||
m_QSOProgress = SIGNOFF;
|
||||
}
|
||||
else // just work them
|
||||
{
|
||||
} else {// just work them
|
||||
if (ui->tx1->isEnabled ()) {
|
||||
m_ntx = 1;
|
||||
m_QSOProgress = REPLYING;
|
||||
ui->txrb1->setChecked (true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
m_ntx=2;
|
||||
m_QSOProgress = REPORT;
|
||||
ui->txrb2->setChecked (true);
|
||||
@ -5081,7 +5080,8 @@ void MainWindow::displayWidgets(qint64 n)
|
||||
if(i==32) ui->cbCQonly->setVisible(b);
|
||||
j=j>>1;
|
||||
}
|
||||
b=m_config.bEU_VHF_Contest() or (m_config.bRTTYroundup() and m_config.RTTYExchange()=="DX");
|
||||
b=m_config.bEU_VHF_Contest() or (m_config.bRTTYroundup() and
|
||||
(m_config.RTTYExchange()=="#" or m_config.RTTYExchange()=="DX"));
|
||||
ui->sbSerialNumber->setVisible(b);
|
||||
m_lastCallsign.clear (); // ensures Tx5 is updated for new modes
|
||||
genStdMsgs (m_rpt, true);
|
||||
|
Loading…
Reference in New Issue
Block a user