Merge branch 'feat-ft2' of bitbucket.org:k1jt/wsjtx into feat-ft2

This commit is contained in:
Steve Franke 2019-03-09 09:13:32 -06:00
commit d69283b9b6
2 changed files with 32 additions and 29 deletions

View File

@ -1384,7 +1384,7 @@ void MainWindow::dataSink(qint64 frames)
if(m_monitoring || m_diskData) { if(m_monitoring || m_diskData) {
m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData); m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData);
} }
if(m_mode=="FT4") ft4Data(k); if(m_mode=="FT4") ft4_rx(k);
if(m_mode=="MSK144" or m_mode=="FT4") return; if(m_mode=="MSK144" or m_mode=="FT4") return;
fixStop(); fixStop();
@ -3851,20 +3851,20 @@ void MainWindow::guiUpdate()
} }
} }
switch (m_ntx) switch (m_ntx)
{ {
case 1: m_QSOProgress = REPLYING; break; case 1: m_QSOProgress = REPLYING; break;
case 2: m_QSOProgress = REPORT; break; case 2: m_QSOProgress = REPORT; break;
case 3: m_QSOProgress = ROGER_REPORT; break; case 3: m_QSOProgress = ROGER_REPORT; break;
case 4: m_QSOProgress = ROGERS; break; case 4: m_QSOProgress = ROGERS; break;
case 5: m_QSOProgress = SIGNOFF; break; case 5: m_QSOProgress = SIGNOFF; break;
case 6: m_QSOProgress = CALLING; break; case 6: m_QSOProgress = CALLING; break;
default: break; // determined elsewhere default: break; // determined elsewhere
}
m_transmitting = true;
transmitDisplay (true);
statusUpdate ();
} }
m_transmitting = true;
transmitDisplay (true);
statusUpdate ();
}
if(!m_btxok && m_btxok0 && g_iptt==1) stopTx(); if(!m_btxok && m_btxok0 && g_iptt==1) stopTx();
@ -4272,6 +4272,7 @@ void MainWindow::on_txb6_clicked()
void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers) void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers)
{ {
if(m_mode=="FT4" and m_inQSOwith!="") return;
set_dateTimeQSO(-1); // reset our QSO start time set_dateTimeQSO(-1); // reset our QSO start time
m_decodedText2=true; m_decodedText2=true;
doubleClickOnCall(modifiers); doubleClickOnCall(modifiers);
@ -4280,6 +4281,7 @@ void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers)
void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers) void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers)
{ {
if(m_mode=="FT4" and m_inQSOwith!="") return;
QTextCursor cursor; QTextCursor cursor;
if(m_mode=="ISCAT") { if(m_mode=="ISCAT") {
MessageBox::information_message (this, MessageBox::information_message (this,
@ -4375,7 +4377,6 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
hiscall+="/P"; hiscall+="/P";
ui->dxCallEntry->setText(hiscall); ui->dxCallEntry->setText(hiscall);
} }
bool is_73 = message_words.filter (QRegularExpression {"^(73|RR73)$"}).size (); bool is_73 = message_words.filter (QRegularExpression {"^(73|RR73)$"}).size ();
if (!is_73 and !message.isStandardMessage() and !message.string().contains("<")) { if (!is_73 and !message.isStandardMessage() and !message.string().contains("<")) {
qDebug () << "Not processing message - hiscall:" << hiscall << "hisgrid:" << hisgrid qDebug () << "Not processing message - hiscall:" << hiscall << "hisgrid:" << hisgrid
@ -4534,6 +4535,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
} else { } else {
m_bTUmsg=false; m_bTUmsg=false;
m_nextCall=""; //### Temporary: disable use of "TU;" message m_nextCall=""; //### Temporary: disable use of "TU;" message
if(SpecOp::RTTY == m_config.special_op_id() and m_nextCall!="") { if(SpecOp::RTTY == m_config.special_op_id() and m_nextCall!="") {
// We're in RTTY contest and have "nextCall" queued up: send a "TU; ..." message // We're in RTTY contest and have "nextCall" queued up: send a "TU; ..." message
logQSOTimer.start(0); logQSOTimer.start(0);
@ -4740,6 +4742,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
// i.e. compound version of same base call // i.e. compound version of same base call
ui->dxCallEntry->setText (hiscall); ui->dxCallEntry->setText (hiscall);
} }
if (hisgrid.contains (grid_regexp)) { if (hisgrid.contains (grid_regexp)) {
if(ui->dxGridEntry->text().mid(0,4) != hisgrid) ui->dxGridEntry->setText(hisgrid); if(ui->dxGridEntry->text().mid(0,4) != hisgrid) ui->dxGridEntry->setText(hisgrid);
} }
@ -5458,6 +5461,7 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
m_dateTimeQSOOn, dateTimeQSOOff, m_freqNominal + m_dateTimeQSOOn, dateTimeQSOOff, m_freqNominal +
ui->TxFreqSpinBox->value(), m_noSuffix, m_xSent, m_xRcvd, ui->TxFreqSpinBox->value(), m_noSuffix, m_xSent, m_xRcvd,
m_cabrilloLog.data ()); m_cabrilloLog.data ());
m_inQSOwith="";
} }
void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
@ -5605,7 +5609,7 @@ void MainWindow::on_actionFT4_triggered()
ui->label_7->setText("Rx Frequency"); ui->label_7->setText("Rx Frequency");
ui->label_6->setText("Band Activity"); ui->label_6->setText("Band Activity");
ui->decodedTextLabel->setText( " UTC dB DT Freq Message"); ui->decodedTextLabel->setText( " UTC dB DT Freq Message");
displayWidgets(nWidgets("111010000100111000010000100110001")); displayWidgets(nWidgets("011010000100111000010000100110001"));
ui->txrb2->setEnabled(true); ui->txrb2->setEnabled(true);
ui->txrb4->setEnabled(true); ui->txrb4->setEnabled(true);
ui->txrb5->setEnabled(true); ui->txrb5->setEnabled(true);
@ -5616,9 +5620,7 @@ void MainWindow::on_actionFT4_triggered()
ui->txb6->setEnabled(true); ui->txb6->setEnabled(true);
ui->txFirstCheckBox->setEnabled(true); ui->txFirstCheckBox->setEnabled(true);
ui->cbAutoSeq->setEnabled(true); ui->cbAutoSeq->setEnabled(true);
ui->labDXped->setVisible(false);
ui->labDXped->setText(""); ui->labDXped->setText("");
ui->labDXped->setVisible(false); ui->labDXped->setVisible(false);
if (SpecOp::RTTY == m_config.special_op_id ()) { if (SpecOp::RTTY == m_config.special_op_id ()) {
ui->labDXped->setVisible(true); ui->labDXped->setVisible(true);
@ -8649,7 +8651,7 @@ void MainWindow::write_all(QString txRx, QString message)
} }
} }
void MainWindow::ft4Data(int k) void MainWindow::ft4_rx(int k)
{ {
static int nhsec0=-1; static int nhsec0=-1;
static bool wrapped=false; static bool wrapped=false;
@ -8734,30 +8736,29 @@ void MainWindow::ft4Data(int k)
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_mode, ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_mode,
m_config.DXCC(),m_logBook,m_currentBand,m_config.ppfx()); m_config.DXCC(),m_logBook,m_currentBand,m_config.ppfx());
//### //Right (Rx Frequency) window
//Right (Rx Frequency) window
int audioFreq=decodedtext.frequencyOffset(); int audioFreq=decodedtext.frequencyOffset();
auto const& parts = decodedtext.string().remove("<").remove(">") auto const& parts = decodedtext.string().remove("<").remove(">")
.split (' ', QString::SkipEmptyParts); .split (' ', QString::SkipEmptyParts);
if (parts.size () > 6) { if(parts.size() > 6) {
auto for_us = parts[5].contains (m_baseCall) auto for_us = parts[5].contains(m_baseCall)
|| ("DE" == parts[5] && qAbs (ui->RxFreqSpinBox->value () - audioFreq) <= 10); || ("DE" == parts[5] && qAbs(ui->TxFreqSpinBox->value() - audioFreq) <= 150);
if(m_baseCall==m_config.my_callsign() and m_baseCall!=parts[5]) for_us=false; if(m_baseCall==m_config.my_callsign() and m_baseCall!=parts[5]) for_us=false;
if(m_bCallingCQ && !m_bAutoReply && for_us && ui->cbFirst->isChecked()) { if(m_bCallingCQ && !m_bAutoReply && for_us && ui->cbFirst->isChecked()) {
m_bDoubleClicked=true; m_bDoubleClicked=true;
m_bAutoReply = true; m_bAutoReply = true;
processMessage(decodedtext);
ui->cbFirst->setStyleSheet(""); ui->cbFirst->setStyleSheet("");
} }
if(for_us or (abs(audioFreq - m_wideGraph->rxFreq()) <= 10)) { if(for_us or ((qAbs(audioFreq - ui->TxFreqSpinBox->value()) <= 150) and parts[5]!="CQ")) {
// This msg is within 10 hertz of our tuned frequency, or contains MyCall // This msg contains MyCall, or is within 150 hertz of our Tx frequency
// (Is that the best logic to use here??)
ui->decodedTextBrowser2->displayDecodedText(decodedtext,m_baseCall, ui->decodedTextBrowser2->displayDecodedText(decodedtext,m_baseCall,
m_mode,m_config.DXCC(),m_logBook,m_currentBand,m_config.ppfx()); m_mode,m_config.DXCC(),m_logBook,m_currentBand,m_config.ppfx());
if(decodedtext.string().trimmed().contains(m_inQSOwith)) processMessage(decodedtext);
m_QSOText = decodedtext.string().trimmed (); m_QSOText = decodedtext.string().trimmed ();
} }
write_all("Rx",decodedtext.string().trimmed()); write_all("Rx",decodedtext.string().trimmed());
} }
//###
} }
nhsec0=nhsec; nhsec0=nhsec;
if(m_diskData and (k > (dec_data.params.kin-istep))) m_startAnother=m_loopall; if(m_diskData and (k > (dec_data.params.kin-istep))) m_startAnother=m_loopall;
@ -8782,6 +8783,7 @@ void MainWindow::ft4_tx(int ntx)
if(m_ntx == 5) ba=ui->tx5->currentText().toLocal8Bit(); if(m_ntx == 5) ba=ui->tx5->currentText().toLocal8Bit();
if(m_ntx == 6) ba=ui->tx6->text().toLocal8Bit(); if(m_ntx == 6) ba=ui->tx6->text().toLocal8Bit();
QString msg = QString::fromLatin1(ba.data()); QString msg = QString::fromLatin1(ba.data());
if(m_ntx==2 or m_ntx==3) m_inQSOwith=m_hisCall;
if(msg.trimmed().length()==0) return; //Don't transmit a blank message, or ... if(msg.trimmed().length()==0) return; //Don't transmit a blank message, or ...
if(m_diskData) return; //... in response to a decode from disk if(m_diskData) return; //... in response to a decode from disk
ba2msg(ba,message); ba2msg(ba,message);

View File

@ -312,7 +312,7 @@ private slots:
void on_comboBoxHoundSort_activated (int index); void on_comboBoxHoundSort_activated (int index);
void not_GA_warning_message (); void not_GA_warning_message ();
void checkMSK144ContestType(); void checkMSK144ContestType();
void ft4Data(int k); void ft4_rx(int k);
void ft4_tx(int ntx); void ft4_tx(int ntx);
int setTxMsg(int n); int setTxMsg(int n);
bool stdCall(QString const& w); bool stdCall(QString const& w);
@ -617,6 +617,7 @@ private:
QString m_nextCall; QString m_nextCall;
QString m_nextGrid; QString m_nextGrid;
QString m_fileDateTime; QString m_fileDateTime;
QString m_inQSOwith;
QSet<QString> m_pfx; QSet<QString> m_pfx;
QSet<QString> m_sfx; QSet<QString> m_sfx;