Merge branch 'feat-Q65-special-ops' into release-2.5.0

This commit is contained in:
Bill Somerville 2021-09-03 17:24:50 +01:00
commit 201c646bc5
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
4 changed files with 59 additions and 36 deletions

View File

@ -735,7 +735,7 @@ bool Configuration::monitor_last_used () const {return m_->rig_is_dummy_ || m_->
bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;}
bool Configuration::report_in_comments () const {return m_->report_in_comments_;}
bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;}
bool Configuration::autoLog() const {return m_->autoLog_;}
bool Configuration::autoLog() const {return m_->autoLog_ && m_->bSpecialOp_;}
bool Configuration::decodes_from_top () const {return m_->decodes_from_top_;}
bool Configuration::insert_blank () const {return m_->insert_blank_;}
bool Configuration::DXCC () const {return m_->DXCC_;}

View File

@ -23,7 +23,7 @@ DecodedText::DecodedText (QString const& the_string)
, is_standard_ {false}
{
// discard appended AP info
clean_string_.replace (QRegularExpression {R"(^(.*?)(?:\?\s)?a[0-9].*$)"}, "\\1");
clean_string_.replace (QRegularExpression {R"(^(.*?)(?:\?\s)?(?:a|q)[0-9].*$)"}, "\\1");
// qDebug () << "DecodedText: the_string:" << the_string << "Nbsp pos:" << the_string.indexOf (QChar::Nbsp);
if (message_.length() >= 1)

View File

@ -4019,33 +4019,10 @@ void MainWindow::guiUpdate()
&m_currentMessageType, 22, 22);
if(m_mode=="JT65") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, 22, 22);
if(m_mode=="Q65") {
int i3=-1;
int n3=-1;
genq65_(message,&ichk,msgsent,const_cast<int *>(itone),&i3,&n3,37,37);
int nsps=1800;
if(m_TRperiod==30) nsps=3600;
if(m_TRperiod==60) nsps=7200;
if(m_TRperiod==120) nsps=16000;
if(m_TRperiod==300) nsps=41472;
int nsps4=4*nsps; //48000 Hz sampling
int nsym=85;
float fsample=48000.0;
int nwave=(nsym+2)*nsps4;
int icmplx=0;
int hmod=1;
float f0=ui->TxFreqSpinBox->value()-m_XIT;
genwave_(const_cast<int *>(itone),&nsym,&nsps4,&nwave,
&fsample,&hmod,&f0,&icmplx,foxcom_.wave,foxcom_.wave);
}
if(m_mode=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
22, 22);
if(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4"
or m_mode=="FST4" or m_mode=="FST4W") {
char MyCall[6];
char MyGrid[6];
::memcpy(MyCall, (m_config.my_callsign()+" ").toLatin1(), sizeof MyCall);
::memcpy(MyGrid, (m_config.my_grid()+" ").toLatin1(), sizeof MyGrid);
or m_mode=="FST4" or m_mode=="FST4W" || "Q65" == m_mode) {
if(m_mode=="MSK144") {
genmsk_128_90_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, 37, 37);
@ -4137,6 +4114,25 @@ void MainWindow::guiUpdate()
QString t = QString::fromStdString(message).trimmed();
}
if(m_mode=="Q65") {
int i3=-1;
int n3=-1;
genq65_(message,&ichk,msgsent,const_cast<int *>(itone),&i3,&n3,37,37);
int nsps=1800;
if(m_TRperiod==30) nsps=3600;
if(m_TRperiod==60) nsps=7200;
if(m_TRperiod==120) nsps=16000;
if(m_TRperiod==300) nsps=41472;
int nsps4=4*nsps; //48000 Hz sampling
int nsym=85;
float fsample=48000.0;
int nwave=(nsym+2)*nsps4;
int icmplx=0;
int hmod=1;
float f0=ui->TxFreqSpinBox->value()-m_XIT;
genwave_(const_cast<int *>(itone),&nsym,&nsps4,&nwave,
&fsample,&hmod,&f0,&icmplx,foxcom_.wave,foxcom_.wave);
}
if(SpecOp::EU_VHF==m_config.special_op_id()) {
if(m_ntx==2) m_xSent=ui->tx2->text().right(13);
@ -4206,9 +4202,13 @@ void MainWindow::guiUpdate()
{
logQSOTimer.start(0);
}
else
{
cease_auto_Tx_after_QSO ();
}
}
bool b=(m_mode=="FT8" or m_mode=="FT4") and ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked ();
bool b=("FT8"==m_mode or "FT4"==m_mode or "Q65"==m_mode) and ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked ();
if(is_73 and (m_config.disable_TX_on_73() or b)) {
m_nextCall=""; //### Temporary: disable use of "TU;" messages;
if(m_nextCall!="") {
@ -4316,7 +4316,7 @@ void MainWindow::guiUpdate()
}
}
if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4") {
if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4" || "Q65" == m_mode) {
if(ui->txrb1->isEnabled() and
(SpecOp::NA_VHF==m_config.special_op_id() or
SpecOp::FIELD_DAY==m_config.special_op_id() or
@ -4993,7 +4993,12 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
m_nextCall=""; //### Temporary: disable use of "TU;" message
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
logQSOTimer.start(0);
if (m_config.prompt_to_log() || m_config.autoLog()) {
logQSOTimer.start(0);
}
else {
cease_auto_Tx_after_QSO ();
}
ui->tx3->setText(ui->tx3->text().remove("TU; "));
useNextCall();
QString t="TU; " + ui->tx3->text();
@ -5004,7 +5009,12 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
&& SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()
&& ("RR73" == word_3 || 73 == word_3_as_number))
{
logQSOTimer.start(0);
if (m_config.prompt_to_log() || m_config.autoLog()) {
logQSOTimer.start(0);
}
else {
cease_auto_Tx_after_QSO ();
}
m_ntx=6;
ui->txrb6->setChecked(true);
}
@ -5022,7 +5032,12 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
}
else if (ROGERS == m_QSOProgress)
{
logQSOTimer.start(0);
if (m_config.prompt_to_log() || m_config.autoLog()) {
logQSOTimer.start(0);
}
else {
cease_auto_Tx_after_QSO ();
}
m_ntx=6;
ui->txrb6->setChecked(true);
}
@ -5046,7 +5061,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
}
} else if((m_QSOProgress >= REPORT
|| (m_QSOProgress >= REPLYING &&
(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4")))
(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4" || "Q65" == m_mode)))
&& word_3.startsWith ('R')) {
m_ntx=4;
m_QSOProgress = ROGERS;
@ -5268,7 +5283,7 @@ void MainWindow::genCQMsg ()
QString t=ui->tx6->text();
QStringList tlist=t.split(" ");
if((m_mode=="FT4" or m_mode=="FT8" or m_mode=="MSK144") and
if((m_mode=="FT4" or m_mode=="FT8" or m_mode=="MSK144" || "Q65" == m_mode) and
SpecOp::NONE != m_config.special_op_id() and
( tlist.at(1)==my_callsign or
tlist.at(2)==my_callsign ) and
@ -5726,7 +5741,7 @@ void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
//### Check this stuff ###
if(itype==7 and m_config.enable_VHF_features() and m_mode=="JT65") shortMsg=true;
if(m_mode=="MSK144" and t.mid(0,1)=="<") text=false;
if((m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4") and
if((m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4" || "Q65" == m_mode) and
SpecOp::NA_VHF==m_config.special_op_id()) {
int i0=t.trimmed().length()-7;
if(t.mid(i0,3)==" R ") text=false;
@ -5856,7 +5871,7 @@ void MainWindow::on_genStdMsgsPushButton_clicked() //genStdMsgs button
genStdMsgs(m_rpt);
}
void MainWindow::on_logQSOButton_clicked() //Log QSO button
void MainWindow::cease_auto_Tx_after_QSO ()
{
if (SpecOp::FOX != m_config.special_op_id ()
&& ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked ())
@ -5866,6 +5881,11 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
// to be a robot.
auto_tx_mode (false);
}
}
void MainWindow::on_logQSOButton_clicked() //Log QSO button
{
cease_auto_Tx_after_QSO ();
if (!m_hisCall.size ()) {
MessageBox::warning_message (this, tr ("Warning: DX Call field is empty."));
@ -6030,7 +6050,7 @@ void MainWindow::displayWidgets(qint64 n)
}
ui->pbBestSP->setVisible(m_mode=="FT4");
b=false;
if(m_mode=="FT4" or m_mode=="FT8") {
if(m_mode=="FT4" or m_mode=="FT8" || "Q65" == m_mode) {
b=SpecOp::EU_VHF==m_config.special_op_id() or
( SpecOp::RTTY==m_config.special_op_id() and
(m_config.RTTY_Exchange()=="DX" or m_config.RTTY_Exchange()=="#") );
@ -6451,6 +6471,8 @@ void MainWindow::on_actionQ65_triggered()
if(SpecOp::NA_VHF==m_config.special_op_id()) t0="NA VHF";
if(SpecOp::EU_VHF==m_config.special_op_id()) t0="EU VHF";
if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0="Field Day";
if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY";
if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI";
if(t0=="") {
ui->labDXped->setVisible(false);
} else {

View File

@ -779,6 +779,7 @@ private:
void writeFoxQSO (QString const& msg);
void to_jt9(qint32 n, qint32 istart, qint32 idone);
bool is77BitMode () const;
void cease_auto_Tx_after_QSO ();
};
extern int killbyname(const char* progName);